toolkit/crashreporter/: Make it flake8 compliant
Categories
(Developer Infrastructure :: Lint and Formatting, task)
Tracking
(firefox77 fixed)
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: sumagnadas, Mentored)
References
Details
(Keywords: good-first-bug, Whiteboard: [lang=python])
Attachments
(1 file)
+++ This bug was initially created as a clone of Bug #1622676 +++
Filling as a good first bug to learn workflows.
As the change is easy, it is mostly to learn how to contribute to Firefox.
To work on this, remove this line:
https://searchfox.org/mozilla-central/source/.flake8#55-56
To run the linter:
$ ./mach lint -l flake8 toolkit/crashreporter/
To run the autofix:
$ ./mach lint -l flake8 --fix toolkit/crashreporter/
Then, the remaining thing should be fixed by hand.
Tutorial to contribute:
https://firefox-source-docs.mozilla.org/tools/docs/contribute/how_to_contribute_firefox.html
Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.
Assignee | ||
Comment 1•5 years ago
|
||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
Backed out changeset 78a429af0ec5 (Bug 1622687) for build bustage
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=295439823&repo=autoland&lineNumber=39823
[task 2020-03-30T19:44:08.978Z] 19:44:08 INFO - z:/build/fetches/clang/bin/lld-link.exe -out:TestPoisonArea.exe -pdb:TestPoisonArea.pdb @z:/build/workspace/obj-build/mfbt/tests/TestPoisonArea_exe.list -SUBSYSTEM:CONSOLE,6.01 -STACK:8388608 -LARGEADDRESSAWARE -RELEASE -DEBUG -guard:cf,nolongjmp user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib secur32.lib
[task 2020-03-30T19:44:08.978Z] 19:44:08 INFO - lld-link: warning: ignoring unknown argument '-RELEASE'
[task 2020-03-30T19:44:08.978Z] 19:44:08 INFO - mozmake.EXE[4]: Leaving directory 'z:/build/workspace/obj-build/mfbt/tests'
[task 2020-03-30T19:44:09.250Z] 19:44:09 INFO - mozmake.EXE[4]: Entering directory 'z:/build/workspace/obj-build/browser/app/winlauncher/test'
[task 2020-03-30T19:44:09.250Z] 19:44:09 INFO - z:/build/workspace/obj-build/_virtualenvs/init/Scripts/python.exe z:/build/build/src/config/nsinstall.py -t -m 755 'TestSafeThreadLocal.exe' '../../../../dist/bin'
[task 2020-03-30T19:44:09.250Z] 19:44:09 INFO - mozmake.EXE[4]: Leaving directory 'z:/build/workspace/obj-build/browser/app/winlauncher/test'
[task 2020-03-30T19:44:09.421Z] 19:44:09 INFO - mozmake.EXE[4]: Entering directory 'z:/build/workspace/obj-build/browser/app/winlauncher/test'
[task 2020-03-30T19:44:09.421Z] 19:44:09 INFO - z:/build/workspace/obj-build/_virtualenvs/init/Scripts/python.exe z:/build/build/src/config/nsinstall.py -t -m 755 'TestSameBinary.exe' '../../../../dist/bin'
[task 2020-03-30T19:44:09.421Z] 19:44:09 INFO - mozmake.EXE[4]: Leaving directory 'z:/build/workspace/obj-build/browser/app/winlauncher/test'
[task 2020-03-30T19:44:09.896Z] 19:44:09 INFO - mozmake.EXE[4]: Entering directory 'z:/build/workspace/obj-build/mfbt/tests'
[task 2020-03-30T19:44:09.896Z] 19:44:09 INFO - z:/build/workspace/obj-build/_virtualenvs/init/Scripts/python.exe z:/build/build/src/config/nsinstall.py -t -m 644 'TestAlgorithm.exe' '../../dist/cppunittests'
[task 2020-03-30T19:44:09.896Z] 19:44:09 INFO - mozmake.EXE[4]: Leaving directory 'z:/build/workspace/obj-build/mfbt/tests'
[task 2020-03-30T19:44:09.921Z] 19:44:09 INFO - mozmake.EXE[4]: Entering directory 'z:/build/workspace/obj-build/mfbt/tests'
[task 2020-03-30T19:44:09.921Z] 19:44:09 INFO - z:/build/workspace/obj-build/_virtualenvs/init/Scripts/python.exe z:/build/build/src/config/nsinstall.py -t -m 644 'TestArray.exe' '../../dist/cppunittests'
[task 2020-03-30T19:44:09.921Z] 19:44:09 INFO - mozmake.EXE[4]: Leaving directory 'z:/build/workspace/obj-build/mfbt/tests'
[task 2020-03-30T19:44:10.247Z] 19:44:10 INFO - mozmake.EXE[4]: Entering directory 'z:/build/workspace/obj-build/mfbt/tests'
[task 2020-03-30T19:44:10.247Z] 19:44:10 INFO - z:/build/workspace/obj-build/_virtualenvs/init/Scripts/python.exe z:/build/build/src/config/nsinstall.py -t -m 644 'TestArrayUtils.exe' '../../dist/cppunittests'
[task 2020-03-30T19:44:10.247Z] 19:44:10 INFO - mozmake.EXE[4]: Leaving directory 'z:/build/workspace/obj-build/mfbt/tests'
[task 2020-03-30T19:44:10.407Z] 19:44:10 INFO - mozmake.EXE[4]: Entering directory 'z:/build/workspace/obj-build/mfbt/tests'
[task 2020-03-30T19:44:10.407Z] 19:44:10 INFO - z:/build/workspace/obj-build/_virtualenvs/init/Scripts/python.exe z:/build/build/src/config/nsinstall.py -t -m 644 'TestAtomics.exe' '../../dist/cppunittests'
[task 2020-03-30T19:44:10.407Z] 19:44:10 INFO - mozmake.EXE[4]: Leaving directory 'z:/build/workspace/obj-build/mfbt/tests'
[task 2020-03-30T19:44:11.259Z] 19:44:11 INFO - mozmake.EXE[4]: Entering directory 'z:/build/workspace/obj-build/build/win32/crashinjectdll'
[task 2020-03-30T19:44:11.260Z] 19:44:11 INFO - z:/build/workspace/obj-build/_virtualenvs/init_py3/Scripts/python.exe -m mozbuild.action.dumpsymbols z:/build/workspace/obj-build/build/win32/crashinjectdll/crashinjectdll.dll z:/build/workspace/obj-build/build/win32/crashinjectdll/crashinjectdll.dll_syms.track
[task 2020-03-30T19:44:11.260Z] 19:44:11 ERROR - Traceback (most recent call last):
[task 2020-03-30T19:44:11.260Z] 19:44:11 INFO - File "z:/build/build/src\toolkit\crashreporter\tools\symbolstore.py", line 1024, in <module>
[task 2020-03-30T19:44:11.260Z] 19:44:11 INFO - main()
[task 2020-03-30T19:44:11.260Z] 19:44:11 INFO - File "z:/build/build/src\toolkit\crashreporter\tools\symbolstore.py", line 1003, in main
[task 2020-03-30T19:44:11.260Z] 19:44:11 INFO - file_mapping = make_file_mapping(manifests)
[task 2020-03-30T19:44:11.261Z] 19:44:11 INFO - File "z:/build/build/src\toolkit\crashreporter\tools\symbolstore.py", line 395, in make_file_mapping
[task 2020-03-30T19:44:11.261Z] 19:44:11 INFO - abs_dest = realpath(os.path.join(destination, dst))
[task 2020-03-30T19:44:11.261Z] 19:44:11 INFO - File "z:/build/build/src\toolkit\crashreporter\tools\symbolstore.py", line 275, in realpath
[task 2020-03-30T19:44:11.261Z] 19:44:11 INFO - path = str(path, sys.getfilesystemencoding())
[task 2020-03-30T19:44:11.261Z] 19:44:11 ERROR - TypeError: str() takes at most 1 argument (2 given)
[task 2020-03-30T19:44:11.261Z] 19:44:11 ERROR - Traceback (most recent call last):
[task 2020-03-30T19:44:11.261Z] 19:44:11 INFO - File "C:\mozilla-build\python3\Lib\runpy.py", line 193, in _run_module_as_main
[task 2020-03-30T19:44:11.261Z] 19:44:11 INFO - "__main__", mod_spec)
[task 2020-03-30T19:44:11.261Z] 19:44:11 INFO - File "C:\mozilla-build\python3\Lib\runpy.py", line 85, in _run_code
[task 2020-03-30T19:44:11.261Z] 19:44:11 INFO - exec(code, run_globals)
[task 2020-03-30T19:44:11.261Z] 19:44:11 INFO - File "z:\build\build\src\python\mozbuild\mozbuild\action\dumpsymbols.py", line 106, in <module>
[task 2020-03-30T19:44:11.261Z] 19:44:11 INFO - sys.exit(main(sys.argv[1:]))
[task 2020-03-30T19:44:11.261Z] 19:44:11 INFO - File "z:\build\build\src\python\mozbuild\mozbuild\action\dumpsymbols.py", line 102, in main
[task 2020-03-30T19:44:11.261Z] 19:44:11 INFO - args.count_ctors)
[task 2020-03-30T19:44:11.261Z] 19:44:11 INFO - File "z:\build\build\src\python\mozbuild\mozbuild\action\dumpsymbols.py", line 83, in dump_symbols
[task 2020-03-30T19:44:11.262Z] 19:44:11 INFO - out_files = subprocess.check_output(args, universal_newlines=True)
[task 2020-03-30T19:44:11.262Z] 19:44:11 INFO - File "C:\mozilla-build\python3\Lib\subprocess.py", line 336, in check_output
[task 2020-03-30T19:44:11.262Z] 19:44:11 INFO - **kwargs).stdout
[task 2020-03-30T19:44:11.262Z] 19:44:11 INFO - File "C:\mozilla-build\python3\Lib\subprocess.py", line 418, in run
[task 2020-03-30T19:44:11.262Z] 19:44:11 INFO - output=stdout, stderr=stderr)
[task 2020-03-30T19:44:11.262Z] 19:44:11 INFO - subprocess.CalledProcessError: Command '['z:/build/workspace/obj-build/_virtualenvs/init/Scripts/python.exe', 'z:/build/build/src\\toolkit\\crashreporter\\tools\\symbolstore.py', '-c', '--vcs-info', '-i', '--install-manifest=z:/build/workspace/obj-build\\_build_manifests\\install\\dist_include,z:/build/workspace/obj-build\\dist\\include', '-s', 'z:/build/build/src', 'z:/build/fetches/dump_syms/dump_syms.exe', 'z:/build/workspace/obj-build\\dist\\crashreporter-symbols', 'z:\\build\\workspace\\obj-build\\build\\win32\\crashinjectdll\\crashinjectdll.dll']' returned non-zero exit status 1.
[task 2020-03-30T19:44:11.262Z] 19:44:11 INFO - Running: z:/build/workspace/obj-build/_virtualenvs/init/Scripts/python.exe z:/build/build/src\toolkit\crashreporter\tools\symbolstore.py -c --vcs-info -i --install-manifest=z:/build/workspace/obj-build\_build_manifests\install\dist_include,z:/build/workspace/obj-build\dist\include -s z:/build/build/src z:/build/fetches/dump_syms/dump_syms.exe z:/build/workspace/obj-build\dist\crashreporter-symbols z:\build\workspace\obj-build\build\win32\crashinjectdll\crashinjectdll.dll
[task 2020-03-30T19:44:11.262Z] 19:44:11 INFO - z:/build/build/src/config/rules.mk:738: recipe for target 'crashinjectdll.dll_syms.track' failed
[task 2020-03-30T19:44:11.262Z] 19:44:11 INFO - mozmake.EXE[4]: *** [crashinjectdll.dll_syms.track] Error 1
[task 2020-03-30T19:44:11.262Z] 19:44:11 INFO - mozmake.EXE[4]: Leaving directory 'z:/build/workspace/obj-build/build/win32/crashinjectdll'
[task 2020-03-30T19:44:11.262Z] 19:44:11 INFO - z:/build/build/src/config/recurse.mk:74: recipe for target 'build/win32/crashinjectdll/syms' failed
[task 2020-03-30T19:44:11.262Z] 19:44:11 INFO - mozmake.EXE[3]: *** [build/win32/crashinjectdll/syms] Error 2
[task 2020-03-30T19:44:11.262Z] 19:44:11 INFO - mozmake.EXE[3]: *** Waiting for unfinished jobs....
[task 2020-03-30T19:44:11.341Z] 19:44:11 INFO - mozmake.EXE[4]: Entering directory 'z:/build/workspace/obj-build/build/win32'
[task 2020-03-30T19:44:11.341Z] 19:44:11 INFO - z:/build/workspace/obj-build/_virtualenvs/init_py3/Scripts/python.exe -m mozbuild.action.dumpsymbols z:/build/workspace/obj-build/dist/bin/crashinject.exe z:/build/workspace/obj-build/build/win32/crashinject.exe_syms.track
[task 2020-03-30T19:44:11.341Z] 19:44:11 ERROR - Traceback (most recent call last):
[task 2020-03-30T19:44:11.341Z] 19:44:11 INFO - File "z:/build/build/src\toolkit\crashreporter\tools\symbolstore.py", line 1024, in <module>
[task 2020-03-30T19:44:11.341Z] 19:44:11 INFO - main()
[task 2020-03-30T19:44:11.341Z] 19:44:11 INFO - File "z:/build/build/src\toolkit\crashreporter\tools\symbolstore.py", line 1003, in main
[task 2020-03-30T19:44:11.341Z] 19:44:11 INFO - file_mapping = make_file_mapping(manifests)
[task 2020-03-30T19:44:11.341Z] 19:44:11 INFO - File "z:/build/build/src\toolkit\crashreporter\tools\symbolstore.py", line 395, in make_file_mapping
[task 2020-03-30T19:44:11.341Z] 19:44:11 INFO - abs_dest = realpath(os.path.join(destination, dst))
[task 2020-03-30T19:44:11.342Z] 19:44:11 INFO - File "z:/build/build/src\toolkit\crashreporter\tools\symbolstore.py", line 275, in realpath
[task 2020-03-30T19:44:11.342Z] 19:44:11 INFO - path = str(path, sys.getfilesystemencoding())
[task 2020-03-30T19:44:11.342Z] 19:44:11 ERROR - TypeError: str() takes at most 1 argument (2 given)
[task 2020-03-30T19:44:11.342Z] 19:44:11 ERROR - Traceback (most recent call last):
[task 2020-03-30T19:44:11.342Z] 19:44:11 INFO - File "C:\mozilla-build\python3\Lib\runpy.py", line 193, in _run_module_as_main
[task 2020-03-30T19:44:11.342Z] 19:44:11 INFO - "__main__", mod_spec)
[task 2020-03-30T19:44:11.342Z] 19:44:11 INFO - File "C:\mozilla-build\python3\Lib\runpy.py", line 85, in _run_code
[task 2020-03-30T19:44:11.342Z] 19:44:11 INFO - exec(code, run_globals)
[task 2020-03-30T19:44:11.342Z] 19:44:11 INFO - File "z:\build\build\src\python\mozbuild\mozbuild\action\dumpsymbols.py", line 106, in <module>
[task 2020-03-30T19:44:11.342Z] 19:44:11 INFO - sys.exit(main(sys.argv[1:]))
[task 2020-03-30T19:44:11.342Z] 19:44:11 INFO - File "z:\build\build\src\python\mozbuild\mozbuild\action\dumpsymbols.py", line 102, in main
[task 2020-03-30T19:44:11.342Z] 19:44:11 INFO - args.count_ctors)
[task 2020-03-30T19:44:11.342Z] 19:44:11 INFO - File "z:\build\build\src\python\mozbuild\mozbuild\action\dumpsymbols.py", line 83, in dump_symbols
[task 2020-03-30T19:44:11.342Z] 19:44:11 INFO - out_files = subprocess.check_output(args, universal_newlines=True)
[task 2020-03-30T19:44:11.342Z] 19:44:11 INFO - File "C:\mozilla-build\python3\Lib\subprocess.py", line 336, in check_output
[task 2020-03-30T19:44:11.342Z] 19:44:11 INFO - **kwargs).stdout
[task 2020-03-30T19:44:11.343Z] 19:44:11 INFO - File "C:\mozilla-build\python3\Lib\subprocess.py", line 418, in run
[task 2020-03-30T19:44:11.343Z] 19:44:11 INFO - output=stdout, stderr=stderr)
[task 2020-03-30T19:44:11.343Z] 19:44:11 INFO - subprocess.CalledProcessError: Command '['z:/build/workspace/obj-build/_virtualenvs/init/Scripts/python.exe', 'z:/build/build/src\\toolkit\\crashreporter\\tools\\symbolstore.py', '-c', '--vcs-info', '-i', '--install-manifest=z:/build/workspace/obj-build\\_build_manifests\\install\\dist_include,z:/build/workspace/obj-build\\dist\\include', '-s', 'z:/build/build/src', 'z:/build/fetches/dump_syms/dump_syms.exe', 'z:/build/workspace/obj-build\\dist\\crashreporter-symbols', 'z:\\build\\workspace\\obj-build\\dist\\bin\\crashinject.exe']' returned non-zero exit status 1.
[task 2020-03-30T19:44:11.343Z] 19:44:11 INFO - Running: z:/build/workspace/obj-build/_virtualenvs/init/Scripts/python.exe z:/build/build/src\toolkit\crashreporter\tools\symbolstore.py -c --vcs-info -i --install-manifest=z:/build/workspace/obj-build\_build_manifests\install\dist_include,z:/build/workspace/obj-build\dist\include -s z:/build/build/src z:/build/fetches/dump_syms/dump_syms.exe z:/build/workspace/obj-build\dist\crashreporter-symbols z:\build\workspace\obj-build\dist\bin\crashinject.exe
Comment 4•5 years ago
|
||
Ah, so these files are run as Python2, and our flake8 (I believe) runs as Python3. So the files would have to be converted to Python3 first.
Assignee | ||
Comment 5•5 years ago
|
||
So what now?
Updated•5 years ago
|
Comment 6•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Comment 7•5 years ago
|
||
Backout merged to central: https://hg.mozilla.org/mozilla-central/rev/60dc189e64d2
Comment 9•5 years ago
|
||
bugherder |
Updated•2 years ago
|
Description
•