[ 
https://issues.apache.org/jira/browse/IMPALA-14498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18037578#comment-18037578
 ] 

ASF subversion and git services commented on IMPALA-14498:
----------------------------------------------------------

Commit 75c639c9cd68a1d23ed180862fe8a76a99e21d55 in impala's branch 
refs/heads/master from ttttttz
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=75c639c9c ]

IMPALA-14498: Fix a bug in initial code review checks

When conducting a code review using flake8-diff, it may fail in some code 
sections
due to the use of non-raw strings. This patch modifies one instance to 
successfully
pass the initial code review. Although it is currently working, it may not cover
all instances.

Change-Id: I71889a117c64500bab13928971a2bce063a72cd4
Reviewed-on: http://gerrit.cloudera.org:8080/23656
Reviewed-by: Quanlong Huang <[email protected]>
Tested-by: Quanlong Huang <[email protected]>


> 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
>            Priority: Major
>
> 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]

Reply via email to