[
https://issues.apache.org/jira/browse/IMPALA-13597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17904599#comment-17904599
]
ASF subversion and git services commented on IMPALA-13597:
----------------------------------------------------------
Commit 403519def4a2a38fb2a12be68254037976f05a11 in impala's branch
refs/heads/master from Laszlo Gaal
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=403519def ]
IMPALA-13597: Upgrade critique-gerrit-review.py to Python3
Commit 8e71f5ec8609cc046cf35eb044d91bf34ae9f9c7 has changed the Python
environment for the gerrit-auto-critic script from Python2 to Python3.
Unfortunately the change missed a few Python3-related updates, so the
script started failing in the pre-commit environment.
This patch adds the following updates to the Python3 update:
- changes the virtualenv implementation from virtualenv to the venv
module offered by default in Python3.
- adds pip3 and system_site_packages=True to the venv creation
- bumps the flake8 module to a newer version, as it doesn't have to be
compatible with Python2 any longer.
- extends Popen calls with universal_newlines=True wherever these were
missing.
The patch also fixes a regex search string in test_kudu.py (changes the
regex pattern string to a raw Python string). This is somewhat unrelated
to the Python script change, but it was discovered during testing to
make flake8 emit a badly formatted warning message.
The python3-venv and python3-wheel packages were installed manually on
jenkins.impala.io during testing. These were necessary to eliminate
errors during the scripts initial virtualenv-setup steps.
Tests:
- ran the new script locally
- ran the new script through the precommit process using a test copy of
the gerrit-auto-critic job, test-gerrit-auto-critic.
Change-Id: I5efa035fae38bd42cc3b07f479da2b3983f68252
Reviewed-on: http://gerrit.cloudera.org:8080/22191
Reviewed-by: Riza Suminto <[email protected]>
Reviewed-by: Michael Smith <[email protected]>
Tested-by: Michael Smith <[email protected]>
> Precommit step gerrit-auto-critique fails unconditionally
> ---------------------------------------------------------
>
> Key: IMPALA-13597
> URL: https://issues.apache.org/jira/browse/IMPALA-13597
> Project: IMPALA
> Issue Type: Bug
> Components: Infrastructure
> Affects Versions: Impala 4.5.0
> Reporter: Laszlo Gaal
> Assignee: Laszlo Gaal
> Priority: Blocker
>
> Fast precommit checks run by the upstream Jenkins job gerrit-auto-critic have
> been failing consistenctly since Dec 8th. The failure seems to be caused by
> commit
> https://github.com/apache/impala/commit/8e71f5ec8609cc046cf35eb044d91bf34ae9f9c7
> (IMPALA-13535: Add script to restore stats on PlannerTest), which changed
> the Python version of the gerrit-auto-critic script from Python2 to Python3,
> which is unable to import the virtualenv module (virtualenv works OK with
> Python2).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]