Repository navigation
DRIVERS-3712 Tag Atlas resources with mongodb-owner/mongodb-env - #932
Conversation
… add verify gates
There was a problem hiding this comment.
🔵 Needs a closer look
Tag injection affects both cluster and serverless creation, but structural tests and placeholder live-run links leave API acceptance and opt-in verification unconfirmed.
No open issues 🎉
What changed in this PR
Implements DRIVERS-3712 by adding policy tags to Atlas deployments created through the shared helper and optional tag verification across Atlas-consuming setups.
Changes:
- Injects
mongodb-ownerandmongodb-envtags, with configurable values. - Adds verification gated by
VERIFY_MONGODB_TAGSto five setup scripts. - Adds structural regression tests and documents tag defaults and overrides.
| File | Description |
|---|---|
.github/scripts/test_tag_verify_atlas.py |
Checks gate presence, endpoint selection, tag injection, and shell syntax. |
.evergreen/auth_oidc/setup.sh |
Adds optional Atlas deployment tag verification. |
.evergreen/auth_oidc/k8s/setup.sh |
Adds optional tag verification for Kubernetes OIDC deployments. |
.evergreen/auth_oidc/gcp/setup.sh |
Adds optional tag verification for GCP OIDC deployments. |
.evergreen/auth_oidc/azure_func/setup.sh |
Adds optional verification using the deployment-type endpoint. |
.evergreen/atlas/setup-atlas-cluster.sh |
Adds optional verification for clusters and serverless instances. |
.evergreen/atlas/README.md |
Documents policy tag defaults and environment-variable overrides. |
.evergreen/atlas/atlas-utils.sh |
Injects policy tags into shared deployment creation requests. |
Review effort: Balanced
|
Assigned |
PavelSafronov
left a comment
There was a problem hiding this comment.
Should .evergreen/serverless/create-instance.sh be updated with a VERIFY_MONGODB_TAGS check?
|
Serverless support was dropped in DRIVERS-3115 |
| MONGODB_URI="mongodb+srv://${DRIVERS_ATLAS_USER}:${DRIVERS_ATLAS_PASSWORD}@${URI}" | ||
|
|
||
| # Verify the cluster's tags when requested (DRIVERS-3712). | ||
| if [ -n "${VERIFY_MONGODB_TAGS:-}" ]; then |
There was a problem hiding this comment.
Nit: this logic repeats 5 times, maybe consolidate it as verify_deployment_tags in atlas-utils.sh?
DRIVERS-3712
Summary
The Atlas deployment setups tag every deployment they create with
mongodb-owner/mongodb-env. WithVERIFY_MONGODB_TAGSset, they verify the tags and fail the task when one is missing.Changes in this PR
VERIFY_MONGODB_TAGSis set; endpoints that serve clusters and serverless instances alike fetch with${DEPLOYMENT_TYPE}.Test Plan
Unit tests:
.github/scripts/test_tag_verify_atlas.py(gate presence in all five setups, the deployment-type endpoint, the tag injection).Red/green patch pair on the MongoDB Python driver; only the tags differ:
verify-tags OK