[
https://issues.apache.org/jira/browse/BEAM-9797?focusedWorklogId=426793&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-426793
]
ASF GitHub Bot logged work on BEAM-9797:
----------------------------------------
Author: ASF GitHub Bot
Created on: 24/Apr/20 00:14
Start Date: 24/Apr/20 00:14
Worklog Time Spent: 10m
Work Description: udim commented on a change in pull request #11502:
URL: https://github.com/apache/beam/pull/11502#discussion_r414207242
##########
File path: sdks/java/container/license_scripts/license_script.sh
##########
@@ -15,39 +15,33 @@
# limitations under the License.
set -e
+ROOT_DIR=$(pwd)
+CONTAINER_DIR="$ROOT_DIR/sdks/java/container"
+
# reports are generated at ~/beam/java_third_party_licenses
./gradlew generateLicenseReport --rerun-tasks
-# install packages needed for pull_licenses_java.py
-pip install "beautifulsoup4>=4.9.0,<5.0"
-pip install "future>=0.16.0,<1.0.0"
-pip install "pyyaml>=3.12,<6.0.0"
-pip install "tenacity>=5.0.2,<6.0"
+# pip install 'tox>=3.14.6,<3.15.0'
+pip install --no-cache-dir tox==3.11.1
Review comment:
The solution could be to do something like:
```sh
# Creates a new directory $env_path and installs a virtual environment in it.
env_path=$ROOT_DIR/build/license_scripts_env
virtualenv $env_path --python python3.7
source $env_path/bin/activate
# Install tox, or just install the packages directly. Might be less
complicated to skip using tox in this case.
pip install ...
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 426793)
Time Spent: 1.5h (was: 1h 20m)
> license_script.sh calls pip install/uninstall in local env
> ----------------------------------------------------------
>
> Key: BEAM-9797
> URL: https://issues.apache.org/jira/browse/BEAM-9797
> Project: Beam
> Issue Type: Bug
> Components: build-system
> Reporter: Udi Meiri
> Assignee: Hannah Jiang
> Priority: Major
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> File is:
> https://github.com/apache/beam/blob/master/sdks/java/container/license_scripts/license_script.sh
> The problem is with the code that does pip install and uninstall.
> 1. It is not okay to modify the local environment.
> 2. Running this script in parallel with itself (on Jenkins) has a chance to
> cause a race.
> The solution is to use a tox environment to run this script in. Tox will take
> care of creating a virtualenv with the required dependencies.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)