Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 97562d9

Browse files
authored
Unpin tox version in Beam code base (#26082)
* Update BeamModulePlugin.groovy * add run to the tox cmd * Pin tox upper bound * Revert "Pin tox upper bound" This reverts commit 1502017. * Add /bin/bash to allow list externals * Remove tox versioning * Add comma * Add curl to the allowlist externals * Update sdks/python/tox.ini * Update sdks/python/tox.ini
1 parent ea729df commit 97562d9

5 files changed

Lines changed: 11 additions & 7 deletions

File tree

buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2754,7 +2754,7 @@ class BeamModulePlugin implements Plugin<Project> {
27542754
executable 'sh'
27552755
args '-c', ". ${project.ext.envdir}/bin/activate && " +
27562756
"pip install --retries 10 --upgrade pip && " +
2757-
"pip install --retries 10 --upgrade tox==3.20.1 -r ${project.rootDir}/sdks/python/build-requirements.txt"
2757+
"pip install --retries 10 --upgrade tox -r ${project.rootDir}/sdks/python/build-requirements.txt"
27582758
}
27592759
}
27602760
// Gradle will delete outputs whenever it thinks they are stale. Putting a

sdks/python/apache_beam/io/azure/integration_test/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ COPY sdks/python /app/sdks/python
3232
COPY model /app/model
3333

3434
# This step should look like setupVirtualenv minus virtualenv creation.
35-
RUN pip install --no-cache-dir tox==3.11.1 -r sdks/python/build-requirements.txt
35+
RUN pip install --no-cache-dir tox -r sdks/python/build-requirements.txt
3636

3737
# Add Azurite's self-signed cert to the global CA cert store.
3838
COPY cert.pem /usr/local/share/ca-certificates/azurite.crt

sdks/python/apache_beam/io/hdfs_integration_test/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ COPY sdks/python /app/sdks/python
3030
COPY model /app/model
3131

3232
# This step should look like setupVirtualenv minus virtualenv creation.
33-
RUN pip install --no-cache-dir tox==3.11.1 -r sdks/python/build-requirements.txt
33+
RUN pip install --no-cache-dir tox -r sdks/python/build-requirements.txt
3434

3535
# Run wordcount, and write results to HDFS.
3636
CMD cd sdks/python && tox -e hdfs_integration_test

sdks/python/scripts/run_tox.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ fi
5656
if [[ ! -z $2 ]]; then
5757
SDK_LOCATION="$1"
5858
shift;
59-
tox -c tox.ini --recreate -e "$TOX_ENVIRONMENT" --installpkg "$SDK_LOCATION" -- "$@"
59+
tox -c tox.ini run --recreate -e "$TOX_ENVIRONMENT" --installpkg "$SDK_LOCATION" -- "$@"
6060
else
61-
tox -c tox.ini --recreate -e "$TOX_ENVIRONMENT"
61+
tox -c tox.ini run --recreate -e "$TOX_ENVIRONMENT"
6262
fi
6363

6464
exit_code=$?
6565
# Retry once for the specific exit code 245.
6666
if [[ $exit_code == 245 ]]; then
67-
tox -c tox.ini --recreate -e "$TOX_ENVIRONMENT"
67+
tox -c tox.ini run --recreate -e "$TOX_ENVIRONMENT"
6868
exit_code=$?
6969
fi
7070
exit $exit_code

sdks/python/tox.ini

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ allowlist_externals =
4040
time
4141
bash
4242
rm
43+
/bin/sh
44+
curl
45+
./codecov
46+
chmod
4347
deps =
4448
cython: cython==0.29.33
4549
-r build-requirements.txt
@@ -103,7 +107,7 @@ commands =
103107
deps =
104108
pytest-cov==3.0.0
105109
platform = linux
106-
passenv = GIT_* BUILD_* ghprb* CHANGE_ID BRANCH_NAME JENKINS_* CODECOV_*
110+
passenv = GIT_*,BUILD_*,ghprb*,CHANGE_ID,BRANCH_NAME,JENKINS_*,CODECOV_*
107111
extras = test,gcp,interactive,dataframe,aws
108112
commands =
109113
-rm .coverage

0 commit comments

Comments
 (0)