Skip to content
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

Merged
merged 46 commits into from
Sep 29, 2023

Conversation

blink1073
Copy link
Member

@blink1073 blink1073 commented Sep 25, 2023

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).

.evergreen/run-orchestration.sh Outdated Show resolved Hide resolved
.evergreen/start-orchestration.sh Show resolved Hide resolved
.evergreen/docker/run-local.sh Show resolved Hide resolved
.evergreen/docker/run-local.sh Outdated Show resolved Hide resolved
.evergreen/docker/run-local.sh Outdated Show resolved Hide resolved
.evergreen/docker/ubuntu20.04/test-entrypoint.sh Outdated Show resolved Hide resolved
.evergreen/auth_oidc/start_local_server.sh Outdated Show resolved Hide resolved
.evergreen/start-orchestration.sh Outdated Show resolved Hide resolved
.evergreen/run-orchestration.sh Outdated Show resolved Hide resolved
.evergreen/docker/ubuntu20.04/base-entrypoint.sh Outdated Show resolved Hide resolved
.evergreen/docker/ubuntu20.04/base-entrypoint.sh Outdated Show resolved Hide resolved
blink1073 and others added 6 commits September 26, 2023 10:39
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>
@blink1073
Copy link
Member Author

Note: I am still making some tweaks as I'm testing the Go Driver PR against the changes.

@blink1073
Copy link
Member Author

Okay, all green on both sides.

Copy link
Contributor

@eramongodb eramongodb left a 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.

.evergreen/run-orchestration.sh Outdated Show resolved Hide resolved
.evergreen/run-orchestration.sh Show resolved Hide resolved
.evergreen/config.yml Outdated Show resolved Hide resolved
blink1073 and others added 2 commits September 26, 2023 20:37
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
.evergreen/run-orchestration.sh Outdated Show resolved Hide resolved
.evergreen/run-orchestration.sh Outdated Show resolved Hide resolved
blink1073 and others added 2 commits September 28, 2023 18:03
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
@blink1073
Copy link
Member Author

Thanks for the great review @eramongodb!

@blink1073 blink1073 merged commit f825f86 into mongodb-labs:master Sep 29, 2023
12 checks passed
@blink1073 blink1073 deleted the GODRIVER-2924 branch September 29, 2023 00:52
echo "Finding Python3 binary..."
PYTHON="$(find_python3 2>/dev/null)" || return
echo "Finding Python3 binary... done."
if [ -z "$PYTHON" ];then
Copy link
Contributor

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.

Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants