Closed
Bug 1899681
Opened 6 months ago
Closed 5 months ago
[perfdocs] linter fails with "re.error: bad escape \j at position 10960 (line 486, column 111)" on Windows
Categories
(Testing :: Performance, defect, P1)
Tracking
(firefox129 fixed)
RESOLVED
FIXED
129 Branch
Tracking | Status | |
---|---|---|
firefox129 | --- | fixed |
People
(Reporter: ahochheiden, Assigned: ahochheiden)
References
Details
(Whiteboard: [fxp])
Attachments
(1 file)
1:21.20 INFO Found 10 perfdocs directories in ['D:\\mozilla-source\\mozilla-unified\\devtools\\perfdocs', 'D:\\mozilla-source\\mozilla-unified\\dom\\indexedDB\\test\\perfdocs', 'D:\\mozilla-source\\mozilla-unified\\python\\mozperftest\\perfdocs', 'D:\\mozilla-source\\mozilla-unified\\testing\\awsy\\perfdocs', 'D:\\mozilla-source\\mozilla-unified\\testing\\performance\\fxrecord\\perfdocs', 'D:\\mozilla-source\\mozilla-unified\\testing\\performance\\mach-try-perf\\perfdocs', 'D:\\mozilla-source\\mozilla-unified\\testing\\performance\\perf-sheriffing\\perfdocs', 'D:\\mozilla-source\\mozilla-unified\\testing\\performance\\performance-infrastructure\\perfdocs', 'D:\\mozilla-source\\mozilla-unified\\testing\\raptor\\raptor\\perfdocs', 'D:\\mozilla-source\\mozilla-unified\\testing\\talos\\perfdocs']
Traceback (most recent call last):
File "d:\mozilla-source\mozilla-unified\python\mozlint\mozlint\roller.py", line 72, in _run_worker
res = func(paths, config, **lintargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\mozilla-source\mozilla-unified\python\mozlint\mozlint\types.py", line 58, in __call__
return self._lint(paths, config, **lintargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "d:\mozilla-source\mozilla-unified\python\mozlint\mozlint\types.py", line 201, in _lint
func(files, config, logger, **lintargs)
File "D:\mozilla-source\mozilla-unified\tools\lint\perfdocs\__init__.py", line 13, in lint
return perfdocs.run_perfdocs(config, logger=logger, paths=paths, generate=fix)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\mozilla-source\mozilla-unified\tools\lint\perfdocs\perfdocs.py", line 95, in run_perfdocs
generator.generate_perfdocs()
File "D:\mozilla-source\mozilla-unified\tools\lint\perfdocs\generator.py", line 303, in generate_perfdocs
perfdocs_tmpdir = self._create_perfdocs()
^^^^^^^^^^^^^^^^^^^^^^^
File "D:\mozilla-source\mozilla-unified\tools\lint\perfdocs\generator.py", line 187, in _create_perfdocs
framework_docs = self.build_perfdocs_from_tree()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\mozilla-source\mozilla-unified\tools\lint\perfdocs\generator.py", line 130, in build_perfdocs_from_tree
framework_rst = re.sub(
^^^^^^^
File "D:\mozilla-build\python3\Lib\re\__init__.py", line 185, in sub
return _compile(pattern, flags).sub(repl, string, count)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\mozilla-build\python3\Lib\re\__init__.py", line 317, in _subx
template = _compile_repl(template, pattern)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\mozilla-build\python3\Lib\re\__init__.py", line 308, in _compile_repl
return _parser.parse_template(repl, pattern)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\mozilla-build\python3\Lib\re\_parser.py", line 1087, in parse_template
raise s.error('bad escape %s' % this, len(this)) from None
re.error: bad escape \j at position 10960 (line 486, column 111)
A failure occurred in the perfdocs linter.
✖ 1 problem (0 errors, 0 warnings, 1 failure, 0 fixed)
The line is:
* **link searchfox**: `<https://searchfox.org/mozilla-central/source/testing\raptor\raptor\tests\benchmarks\jetstream2.toml#16>`
It's happening because on Windows the manifest_path has backslashes. We can convert it to a Path
and call .as_posix()
on it, and it should yield the same results on Windows and Linux, resolving this issue.
Assignee | ||
Comment 1•6 months ago
|
||
Updated•6 months ago
|
Severity: -- → S3
Priority: -- → P1
Updated•5 months ago
|
Whiteboard: [fxp]
Updated•5 months ago
|
Pushed by ahochheiden@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5be4d65a269f
Fix perfdocs linter on Windows r=perftest-reviewers,sparky
Comment 3•5 months ago
|
||
Backed out 8 changesets (Bug 1899681, Bug 1888570, Bug 1898817) as requested by the dev CLOSED TREE
Failure Log: https://treeherder.mozilla.org/logviewer?job_id=462065796&repo=autoland&lineNumber=890
Backout: https://hg.mozilla.org/integration/autoland/rev/48183268590c481e37309299d130508c7d1dc43e
Flags: needinfo?(ahochheiden)
Pushed by ahochheiden@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/51d6adc261f4
Fix perfdocs linter on Windows r=perftest-reviewers,sparky
Comment 6•5 months ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 5 months ago
status-firefox129:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•