Closed Bug 1753769 Opened 2 years ago Closed 2 years ago

Perma [tier 2] 2:02.07 python/mozlint/test/test_cli.py::test_cli_with_ascii_encoding TEST-UNEXPECTED-FAIL

Categories

(Developer Infrastructure :: Lint and Formatting, defect, P5)

Tracking

(firefox-esr91 unaffected, firefox97 unaffected, firefox98 fixed, firefox99 fixed)

RESOLVED FIXED
99 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox97 --- unaffected
firefox98 --- fixed
firefox99 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: mhentges)

References

(Regression)

Details

(Keywords: intermittent-failure, regression)

Attachments

(1 file)

Filed by: ctuns [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=366786905&repo=autoland
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/UwDgWlrdTt6N81M9icsvyw/runs/0/artifacts/public/logs/live_backing.log


task 2022-02-04T22:05:31.911Z]  2:02.06 tools/lint/test/test_perfdocs.py::test_perfdocs_start_and_fail[perfdocs]
[task 2022-02-04T22:05:31.911Z]  2:02.06 tools/lint/test/test_perfdocs.py::test_perfdocs_start_and_fail[perfdocs]
[task 2022-02-04T22:05:31.911Z]  2:02.07   /builds/worker/checkouts/gecko/taskcluster/gecko_taskgraph/transforms/bouncer_submission.py:187: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
[task 2022-02-04T22:05:31.911Z]  2:02.07     job["name"]
[task 2022-02-04T22:05:31.911Z]  2:02.07 
[task 2022-02-04T22:05:31.911Z]  2:02.07 tools/lint/test/test_perfdocs.py::test_perfdocs_start_and_fail[perfdocs]
[task 2022-02-04T22:05:31.911Z]  2:02.07   /builds/worker/checkouts/gecko/taskcluster/gecko_taskgraph/transforms/bouncer_aliases.py:67: DeprecationWarning: The 'warn' method is deprecated, use 'warning' instead
[task 2022-02-04T22:05:31.911Z]  2:02.07     job["name"]
[task 2022-02-04T22:05:31.911Z]  2:02.07 
[task 2022-02-04T22:05:31.911Z]  2:02.07 -- Docs: https://docs.pytest.org/en/latest/warnings.html
[task 2022-02-04T22:05:31.911Z]  2:02.07 =================== 19 passed, 33 warnings in 85.71 seconds ====================
[task 2022-02-04T22:05:31.912Z]  2:02.07 /builds/worker/checkouts/gecko/python/mozlint/test/test_cli.py
[task 2022-02-04T22:05:31.912Z]  2:02.07 ============================= test session starts ==============================
[task 2022-02-04T22:05:31.912Z]  2:02.07 platform linux -- Python 3.6.9, pytest-4.6.6, py-1.5.4, pluggy-0.13.1 -- /builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/_virtualenvs/python-test/bin/python
[task 2022-02-04T22:05:31.912Z]  2:02.07 rootdir: /builds/worker/checkouts/gecko, inifile: /builds/worker/checkouts/gecko/config/mozunit/mozunit/pytest.ini
[task 2022-02-04T22:05:31.912Z]  2:02.07 collecting ... collected 6 items
[task 2022-02-04T22:05:31.912Z]  2:02.07 
[task 2022-02-04T22:05:31.913Z]  2:02.07 python/mozlint/test/test_cli.py::test_cli_with_ascii_encoding TEST-UNEXPECTED-FAIL
[task 2022-02-04T22:05:31.913Z]  2:02.07 python/mozlint/test/test_cli.py::test_cli_run_with_fix PASSED
[task 2022-02-04T22:05:31.913Z]  2:02.07 python/mozlint/test/test_cli.py::test_cli_run_with_edit PASSED
[task 2022-02-04T22:05:31.913Z]  2:02.07 python/mozlint/test/test_cli.py::test_cli_run_with_setup PASSED
[task 2022-02-04T22:05:31.913Z]  2:02.07 python/mozlint/test/test_cli.py::test_cli_for_exclude_list PASSED
[task 2022-02-04T22:05:31.913Z]  2:02.07 python/mozlint/test/test_cli.py::test_cli_run_with_wrong_linters PASSED
[task 2022-02-04T22:05:31.913Z]  2:02.07 
[task 2022-02-04T22:05:31.913Z]  2:02.07 =================================== FAILURES ===================================
[task 2022-02-04T22:05:31.913Z]  2:02.07 _________________________ test_cli_with_ascii_encoding _________________________
[task 2022-02-04T22:05:31.913Z]  2:02.07 
[task 2022-02-04T22:05:31.913Z]  2:02.07 run = <function run.<locals>.inner at 0x7f862dcb8268>
[task 2022-02-04T22:05:31.913Z]  2:02.07 monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f862db249e8>
[task 2022-02-04T22:05:31.914Z]  2:02.07 capfd = <_pytest.capture.CaptureFixture object at 0x7f862db3fc88>
[task 2022-02-04T22:05:31.914Z]  2:02.07 
[task 2022-02-04T22:05:31.914Z]  2:02.07     def test_cli_with_ascii_encoding(run, monkeypatch, capfd):
[task 2022-02-04T22:05:31.914Z]  2:02.07         cmd = [sys.executable, "runcli.py", "-l=string", "-f=stylish"]
[task 2022-02-04T22:05:31.914Z]  2:02.07         env = os.environ.copy()
[task 2022-02-04T22:05:31.915Z]  2:02.07         env["PYTHONPATH"] = os.pathsep.join(sys.path)
[task 2022-02-04T22:05:31.915Z]  2:02.07         env["PYTHONIOENCODING"] = "ascii"
[task 2022-02-04T22:05:31.915Z]  2:02.07         proc = subprocess.Popen(
[task 2022-02-04T22:05:31.915Z]  2:02.07             cmd,
[task 2022-02-04T22:05:31.915Z]  2:02.07             stdout=subprocess.PIPE,
[task 2022-02-04T22:05:31.915Z]  2:02.07             stderr=subprocess.STDOUT,
[task 2022-02-04T22:05:31.915Z]  2:02.07             cwd=here,
[task 2022-02-04T22:05:31.915Z]  2:02.07             env=env,
[task 2022-02-04T22:05:31.915Z]  2:02.07             universal_newlines=True,
[task 2022-02-04T22:05:31.915Z]  2:02.07         )
[task 2022-02-04T22:05:31.915Z]  2:02.07         out = proc.communicate()[0]
[task 2022-02-04T22:05:31.915Z]  2:02.07 >       assert "Traceback" not in out
[task 2022-02-04T22:05:31.915Z]  2:02.07 E       assert 'Traceback' not in "warning: linting the...'get_changed_files'\n"
[task 2022-02-04T22:05:31.916Z]  2:02.07 E         'Traceback' is contained here:
[task 2022-02-04T22:05:31.916Z]  2:02.07 E           warning: linting the entire repo takes a long time, using --outgoing and --workdir instead. If you want to lint the entire repo, run `./mach lint .`
[task 2022-02-04T22:05:31.916Z]  2:02.07 E           error: '/builds/worker/checkouts/gecko/python/mozlint/test' is not a known repository, can't use --workdir or --outgoing
[task 2022-02-04T22:05:31.916Z]  2:02.07 E           Traceback (most recent call last):
[task 2022-02-04T22:05:31.916Z]  2:02.07 E         ? +++++++++
[task 2022-02-04T22:05:31.916Z]  2:02.07 E             File "runcli.py", line 17, in <module>
[task 2022-02-04T22:05:31.916Z]  2:02.07 E               sys.exit(cli.run(**args))
[task 2022-02-04T22:05:31.917Z]  2:02.07 E             File "/builds/worker/checkouts/gecko/python/mozlint/mozlint/cli.py", line 383, in run
[task 2022-02-04T22:05:31.917Z]  2:02.07 E               paths, outgoing=outgoing, workdir=workdir, rev=rev, num_procs=num_procs
[task 2022-02-04T22:05:31.917Z]  2:02.07 E             File "/builds/worker/checkouts/gecko/python/mozlint/mozlint/roller.py", line 321, in roll
[task 2022-02-04T22:05:31.917Z]  2:02.07 E               vcs_paths.update(self.vcs.get_changed_files("AM", mode=workdir))
[task 2022-02-04T22:05:31.917Z]  2:02.07 E           AttributeError: 'NoneType' object has no attribute 'get_changed_files'
[task 2022-02-04T22:05:31.917Z]  2:02.07 
[task 2022-02-04T22:05:31.917Z]  2:02.07 python/mozlint/test/test_cli.py:50: AssertionError
[task 2022-02-04T22:05:31.918Z]  2:02.07 ====================== 1 failed, 5 passed in 0.64 seconds ======================
[task 2022-02-04T22:05:31.918Z]  2:02.07 /builds/worker/checkouts/gecko/python/mozlint/test/test_roller.py
[task 2022-02-04T22:05:31.918Z]  2:02.07 ============================= test session starts ==============================
[task 2022-02-04T22:05:31.918Z]  2:02.07 platform linux -- Python 3.6.9, pytest-4.6.6, py-1.5.4, pluggy-0.13.1 -- /builds/worker/checkouts/gecko/obj-x86_64-pc-linux-gnu/_virtualenvs/python-test/bin/python
[task 2022-02-04T22:05:31.918Z]  2:02.07 rootdir: /builds/worker/checkouts/gecko, inifile: /builds/worker/checkouts/gecko/config/mozunit/mozunit/pytest.ini
[task 2022-02-04T22:05:31.918Z]  2:02.07 collecting ... collected 29 items
[task 2022-02-04T22:05:31.923Z]  2:02.07 
[task 2022-02-04T22:05:31.923Z]  2:02.07 python/mozlint/test/test_roller.py::test_roll_no_linters_configured PASSED
[task 2022-02-04T22:05:31.923Z]  2:02.07 python/mozlint/test/test_roller.py::test_roll_successful PASSED
[task 2022-02-04T22:05:31.923Z]  2:02.07 python/mozlint/test/test_roller.py::test_roll_from_subdir PASSED
[task 2022-02-04T22:05:31.924Z]  2:02.07 python/mozlint/test/test_roller.py::test_roll_catch_exception PASSED
[task 2022-02-04T22:05:31.924Z]  2:02.07 python/mozlint/test/test_roller.py::test_roll_with_global_excluded_path PASSED
[task 2022-02-04T22:05:31.924Z]  2:02.07 python/mozlint/test/test_roller.py::test_roll_with_local_excluded_path PASSED
[task 2022-02-04T22:05:31.924Z]  2:02.07 python/mozlint/test/test_roller.py::test_roll_with_no_files_to_lint PASSED
[task 2022-02-04T22:05:31.924Z]  2:02.07 python/mozlint/test/test_roller.py::test_roll_with_invalid_extension PASSED
[task 2022-02-04T22:05:31.924Z]  2:02.07 python/mozlint/test/test_roller.py::test_roll_with_failure_code PASSED
[task 2022-02-04T22:05:31.924Z]  2:02.07 python/mozlint/test/test_roller.py::test_roll_warnings PASSED
[task 2022-02-04T22:05:31.924Z]  2:02.07 python/mozlint/test/test_roller.py::test_roll_code_review PASSED
[task 2022-02-04T22:05:31.924Z]  2:02.07 python/mozlint/test/test_roller.py::test_roll_code_review_warnings_disabled PASSED
[task 2022-02-04T22:05:31.924Z]  2:02.07 python/mozlint/test/test_roller.py::test_number_of_jobs[1] PASSED
[task 2022-02-04T22:05:31.924Z]  2:02.07 python/mozlint/test/test_roller.py::test_number_of_jobs[4] PASSED
[task 2022-02-04T22:05:31.924Z]  2:02.07 python/mozlint/test/test_roller.py::test_number_of_jobs[8] PASSED
[task 2022-02-04T22:05:31.924Z]  2:02.07 python/mozlint/test/test_roller.py::test_number_of_jobs[16] PASSED
[task 2022-02-04T22:05:31.924Z]  2:02.07 python/mozlint/test/test_roller.py::test_max_paths_per_job[1-12] PASSED
[task 2022-02-04T22:05:31.924Z]  2:02.07 python/mozlint/test/test_roller.py::test_max_paths_per_job[4-6] PASSED
[task 2022-02-04T22:05:31.925Z]  2:02.07 python/mozlint/test/test_roller.py::test_max_paths_per_job[16-6] PASSED
[task 2022-02-04T22:05:31.925Z]  2:02.07 python/mozlint/test/test_roller.py::test_number_of_jobs_global[1] PASSED
[task 2022-02-04T22:05:31.925Z]  2:02.07 python/mozlint/test/test_roller.py::test_number_of_jobs_global[4] PASSED
[task 2022-02-04T22:05:31.925Z]  2:02.07 python/mozlint/test/test_roller.py::test_number_of_jobs_global[8] PASSED
[task 2022-02-04T22:05:31.925Z]  2:02.07 python/mozlint/test/test_roller.py::test_number_of_jobs_global[16] PASSED
[task 2022-02-04T22:05:31.925Z]  2:02.07 python/mozlint/test/test_roller.py::test_max_paths_per_job_global[1] PASSED
[task 2022-02-04T22:05:31.925Z]  2:02.07 python/mozlint/test/test_roller.py::test_max_paths_per_job_global[4] PASSED
[task 2022-02-04T22:05:31.925Z]  2:02.07 python/mozlint/test/test_roller.py::test_max_paths_per_job_global[16] PASSED
[task 2022-02-04T22:05:31.925Z]  2:02.07 python/mozlint/test/test_roller.py::test_keyboard_interrupt TEST-UNEXPECTED-FAIL
[task 2022-02-04T22:05:31.925Z]  2:02.07 python/mozlint/test/test_roller.py::test_support_files PASSED
[task 2022-02-04T22:05:31.925Z]  2:02.07 python/mozlint/test/test_roller.py::test_setup PASSED

Hello Mitchell, this is the bug we talked about on element. Thanks!

Flags: needinfo?(mhentges)
Summary: Intermittent 2:02.07 python/mozlint/test/test_cli.py::test_cli_with_ascii_encoding TEST-UNEXPECTED-FAIL → Perma [tier 2] 2:02.07 python/mozlint/test/test_cli.py::test_cli_with_ascii_encoding TEST-UNEXPECTED-FAIL
Has Regression Range: --- → yes

The new mozlint behaviour will always lean on the VCS
to only lint changed files.

However, in tests, the VCS is going to be slow and also provide
inconsistent data between tests.
Instead, hardcode a file to lint for each case.

Assignee: nobody → mhentges
Status: NEW → ASSIGNED
Flags: needinfo?(mhentges)
Pushed by mhentges@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3a06c4a39172
"runcli.py" in tests should use explicit paths r=ahal
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch

Set release status flags based on info from the regressing bug 1753701

Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: