-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GODRIVER-2924 Add docker file support #352
Conversation
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
Note: I am still making some tweaks as I'm testing the Go Driver PR against the changes. |
Okay, all green on both sides. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor suggestions; otherwise, LGTM.
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
Thanks for the great review @eramongodb! |
echo "Finding Python3 binary..." | ||
PYTHON="$(find_python3 2>/dev/null)" || return | ||
echo "Finding Python3 binary... done." | ||
if [ -z "$PYTHON" ];then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this broke builds on Debian 9.2 and Ubuntu 22.04 ARM64 platforms, as evidenced in some recent PHPLIB task failures:
[2023/10/02 16:15:31.844] Using Python3 binary: /usr/bin/python3
[2023/10/02 16:15:31.844] Creating virtual environment 'venv'...
[2023/10/02 16:15:32.507] The virtual environment was not created successfully because ensurepip is not
[2023/10/02 16:15:32.507] available. On Debian/Ubuntu systems, you need to install the python3-venv
[2023/10/02 16:15:32.507] package using the following command.
[2023/10/02 16:15:32.507] apt install python3.10-venv
[2023/10/02 16:15:32.507] You may need to use sudo with that command. After installing the python3-venv
[2023/10/02 16:15:32.507] package, recreate your virtual environment.
[2023/10/02 16:15:32.507] Failing command: /data/mci/94e805c21e4e75a294c6c625f2817e1b/drivers-tools/.evergreen/orchestration/venv/bin/python3
[2023/10/02 16:15:32.535] /usr/bin/python3: No module named virtualenv
[2023/10/02 16:15:32.535] Could not use either venv or virtualenv with /usr/bin/python3 to create a virtual environment at venv!
[2023/10/02 16:15:32.535] Command 'shell.exec' in function 'bootstrap mongo-orchestration' (step 1.1 of 4) failed: shell script encountered problem: exit code 1.
[2023/10/02 16:15:32.535] Finished command 'shell.exec' in function 'bootstrap mongo-orchestration' (step 1.1 of 4) in 9.451190661s.
[2023/10/02 16:15:32.535] Running task commands failed: running command: command failed: shell script encountered problem: exit code 1
[2023/10/02 16:15:32.535] Finished running task commands in 9.451332048s.
[2023/10/02 16:15:32.535] Task completed - FAILURE.
Why does this PR give preference to a $PYTHON
environment variable instead of relying completely on find-python3.sh
? As-is, I think this is likely to omit the functionality in find-python3.sh
that ensures venvs are supported.
I don't believe any other scripts in drivers-evergreen-tools do this. They all seem to rely on find-python3.sh
unconditionally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I overlooked this in my review. I made an unverified assumption that when executed within Docker we want to use a Docker-managed Python executable set via PYTHON
or python|python3
rather than find_python3
(as I thought was suggested by the if [ -n "$BASH" ]; then
check in run-orchestration.sh
). If this is not actually the case, then I am in favor of reverting the Python binary selection to just find_python3
. @blink1073 thoughts?
Used in conjunction with mongodb/mongo-go-driver#1381 to enable a local topology to be run in an isolated environment, or a set of drivers tests to be run in an isolated environment.
Updates OIDC to use the new Dockerfile as a base.
Adds tests for docker and OIDC in EVG (will be added to default PR tasks).