Joe McDonnell created IMPALA-14498:
--------------------------------------
Summary: critique-gerrit-review.py sometimes fails with unexpected
stderr output
Key: IMPALA-14498
URL: https://issues.apache.org/jira/browse/IMPALA-14498
Project: IMPALA
Issue Type: Bug
Components: Infrastructure
Affects Versions: Impala 5.0.0
Reporter: Joe McDonnell
On Ubuntu 22, I sometimes see bin/jenkins/critique-gerrit-review.py fail with:
{noformat}
Successfully installed argparse-1.4.0 blessings-1.7 flake8-7.1.1
flake8-diff-0.2.2 flake8-unused-arguments-0.0.13 mccabe-0.7.0
pycodestyle-2.12.1 pyflakes-3.2.0 pyparsing-3.1.4 wheel-0.45.1
Traceback (most recent call last):
File
"/var/lib/jenkins/workspace/gerrit-auto-critic-test/Impala/bin/jenkins/critique-gerrit-review.py",
line 490, in <module>
comments = get_flake8_comments(base_revision, revision)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/var/lib/jenkins/workspace/gerrit-auto-critic-test/Impala/bin/jenkins/critique-gerrit-review.py",
line 168, in get_flake8_comments
raise Exception("Did not expect flake8-diff to write to
stderr:\n{0}".format(stderr))
Exception: Did not expect flake8-diff to write to stderr:
2025-10-13 08:11:55,988 flake8diff.utils ERROR b"<unknown>:44: SyntaxWarning:
invalid escape sequence '\\s'\n"{noformat}
I do not see the same issue on Ubuntu 20. This seems to be triggering on lines
that are in a changed file but weren't changed in that review. The example
above is fromĀ [https://gerrit.cloudera.org/#/c/23514/] and it is refering to
[https://github.com/apache/impala/blob/master/tests/common/environ.py#L44] ,
which didn't change.
flake8-diff is 10 years old at this point and hasn't kept pace with recent
python 3 versions. flake8 now has a built-in --diff option that takes a unified
diff from stdin. We should switch.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]