Skip to content

DRIVERS-3564: Include .evergreen/auth_aws in the uv workspace - #870

Merged
blink1073 merged 2 commits into
mongodb-labs:masterfrom
blink1073:auth_aws-DRIVERS-3564
Oct 2, 2026
Merged

blink1073 merged 2 commits into
mongodb-labs:masterfrom
blink1073:auth_aws-DRIVERS-3564

Conversation

@blink1073

@blink1073 blink1073 commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

DRIVERS-3564

Summary

  • Second in a series of PRs to consolidate the various python subprojects into a single workspace.
  • Migrates .evergreen/auth_aws from the legacy virtualenv mechanism to the uv workspace, following DRIVERS-3564: Include .evergreen/docker in the uv workspace #869.
  • No external behavior change: aws_setup.sh, teardown.sh, and setup-secrets.sh keep their paths and interfaces.

Changes in this PR

  • Adds the drivers-auth-aws workspace member and an auth_aws dependency group (pymongo[aws], pyop) extending the shared boto group; the scripts now run via uv run, and the legacy venv/requirements files are deleted.
  • setup-secrets.sh runs setup_secrets.py via the shared boto group instead of the auth_aws venv.

Test Plan

  • uv lock --check and make lint pass; boto3/pymongo/pyop resolve through the new group.
  • CI's test-aws task exercises aws_setup.sh and teardown.sh end-to-end.

Checklist

Checklist for Author

  • Does the title of the PR reference a JIRA Ticket?
  • Do you fully understand the implementation? (Would you be comfortable explaining how this code works to someone else?)
  • Is all relevant documentation (README or docstring) updated?

Checklist for Reviewer

  • Does the title of the PR reference a JIRA Ticket?
  • Do you fully understand the implementation? (Would you be comfortable explaining how this code works to someone else?)
  • Is all relevant documentation (README or docstring) updated?

Migrate .evergreen/auth_aws from the legacy find-python3/venvcreate
virtualenv mechanism to the repo's uv workspace, following the
.evergreen/docker migration (mongodb-labs#869):

- Add .evergreen/auth_aws/pyproject.toml: minimal 'drivers-auth-aws'
  workspace member (metadata only, no build-system/dependencies).
- Root pyproject.toml: add .evergreen/auth_aws to the workspace members
  and an 'auth_aws' dependency group extending the shared 'boto' group
  with pymongo[aws]~=4.0 (aws_tester.py, the EKS pod self-test) and
  pyop~=3.4.0 (lib/aws_handle_oidc_creds.py, also imported by auth_oidc).
- aws_setup.sh and teardown.sh: replace activate-authawsvenv.sh venv
  activation with ensure_uv plus 'uv run --project "$DRIVERS_TOOLS"
  --group auth_aws'. The root project context is used because
  member-context group resolution empirically fails on uv 0.12.21.
- secrets_handling/setup-secrets.sh: drop the auth_aws venv coupling and
  run setup_secrets.py via the shared 'boto' group (it only needs boto3).
- Delete activate-authawsvenv.sh, requirements.txt,
  requirements-in.txt (pip-compile artifacts).
- Regenerate uv.lock: only the drivers-auth-aws member and auth_aws
  group entries are added, no package churn.
- Docs: extend CONTRIBUTING.md's workspace list; add a 'runs via uv'
  note with rationale to .evergreen/auth_aws/README.md; update
  AGENTS.md's legacy-venv list to auth_oidc, csfle, ocsp; trim the
  stale DRIVERS_TOOLS_PYTHON comment in .evergreen/setup.sh.
@blink1073
blink1073 requested a review from a team as a code owner October 2, 2026 10:22
@blink1073
blink1073 requested review from papafe and a balanced review from Copilot October 2, 2026 10:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The migration consistently follows the established uv workspace pattern and preserves the documented script interfaces.

Review effort: Balanced
Findings: None

What changed in this PR

Migrates auth_aws from its legacy virtual environment into the shared uv workspace while preserving script interfaces.

Changes:

  • Adds the auth_aws workspace package and dependency group.
  • Updates AWS and secrets scripts to execute through uv.
  • Removes legacy activation and requirements files and updates documentation.
File Description
pyproject.toml Registers auth_aws and its dependencies.
uv.lock Locks the new workspace member and dependencies.
CONTRIBUTING.md Documents the expanded workspace.
AGENTS.md Updates legacy-environment guidance.
.evergreen/​setup.sh Removes auth_aws from legacy setup notes.
.evergreen/​secrets_handling/​setup-secrets.sh Runs secret retrieval with uv.
.evergreen/​auth_aws/​aws_setup.sh Runs AWS setup through uv.
.evergreen/​auth_aws/​teardown.sh Runs teardown helpers through uv.
.evergreen/​auth_aws/​pyproject.toml Defines the workspace member.
.evergreen/​auth_aws/​README.md Documents uv-based usage.
.evergreen/​auth_aws/​activate-authawsvenv.sh Removes legacy activation.
.evergreen/​auth_aws/​requirements-in.txt Removes legacy dependency input.
.evergreen/​auth_aws/​requirements.txt Removes legacy pinned dependencies.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@blink1073
blink1073 force-pushed the auth_aws-DRIVERS-3564 branch 2 times, most recently from a7cb5cb to 926bfc4 Compare October 2, 2026 21:17
The C driver sources activate-authawsvenv.sh directly (Node and Ruby also
reference it, via submodule), so keep the activation script working through
the uv workspace: it syncs the auth_aws dependency group into the root
.venv and activates it, preserving the sourced contract (`python` with
pymongo[aws], boto3, and pyop on PATH) instead of the legacy
find-python3.sh/venv-utils.sh mechanism. Document it in the auth_aws README.
@blink1073
blink1073 force-pushed the auth_aws-DRIVERS-3564 branch from 926bfc4 to bd6ba74 Compare October 2, 2026 21:18

@PavelSafronov PavelSafronov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, approving.

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