Skip to content

feat(mongo-db): add project and cluster commands with tests - #10170

Merged
VeryEarly merged 3 commits into
Azure:mainfrom
sharmaanuj334:sharmaanuj334/mongodb-projects-clusters
Aug 4, 2026
Merged

feat(mongo-db): add project and cluster commands with tests#10170
VeryEarly merged 3 commits into
Azure:mainfrom
sharmaanuj334:sharmaanuj334/mongodb-projects-clusters

Conversation

@sharmaanuj334

@sharmaanuj334 sharmaanuj334 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes
⚠️ None
⚠️Azure CLI Extensions Breaking Change Test
⚠️mongo-db
rule cmd_name rule_message suggest_message
⚠️ 1011 - SubgroupAdd mongo-db atlas organization project sub group mongo-db atlas organization project added

Description

Add project and cluster CRUD commands to the mongo-db extension under az mongo-db atlas organization project and az mongo-db atlas organization project cluster.

Changes

  • Add project commands: create, show, list, delete, update
  • Add cluster commands: create, show, list, delete, update
  • Add full lifecycle integration test (org create -> project -> cluster -> cleanup)
  • Bump version to 1.1.0b1
  • Add HISTORY.rst changelog entry

Testing

  • Live test: PASSED (305s)
  • Playback test: PASSED (63s)

Related

sharmaanuj334 and others added 3 commits July 31, 2026 16:05
- Generated CLI commands for projects and clusters (2026-03-01-preview)
- Added happy-path tests: create, list, show for projects and clusters
- Added 405 MethodNotAllowed assertions for project/cluster delete
- Fixed project create to send {"properties": {}} in request body
- Updated organization commands to 2026-03-01-preview API version
Copilot AI review requested due to automatic review settings August 2, 2026 21:49
@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi @sharmaanuj334,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Aug 2, 2026
@a0x1ab

a0x1ab commented Aug 2, 2026

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

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.

Pull request overview

This PR expands the mongo-db extension’s MongoDB Atlas surface area by adding AAZ-generated management-plane commands for Organization Projects and Project Clusters, updating the extension version/changelog, and extending scenario tests to cover the new command paths.

Changes:

  • Added az mongo-db atlas organization project and az mongo-db atlas organization project cluster command groups (create/show/list/delete/update/wait) generated from 2026-03-01-preview APIs.
  • Updated extension metadata/versioning (setup.py, azext metadata min core, HISTORY entry).
  • Updated live/playback scenario test to exercise org → project → cluster flows (needs fixes to be CI-safe and aligned with “CRUD”).

Reviewed changes

Copilot reviewed 30 out of 31 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/mongo-db/setup.py Bumps extension version to 1.1.0b1.
src/mongo-db/HISTORY.rst Adds changelog entry for project/cluster commands.
src/mongo-db/azext_mongo_db/tests/latest/test_mongo_db.py Extends scenario coverage to projects/clusters (currently includes hard-coded/PII data and delete-behavior mismatch).
src/mongo-db/azext_mongo_db/azext_metadata.json Raises min CLI core requirement to 2.75.0.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/cluster/_create.py Adds cluster create command implementation.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/cluster/_delete.py Adds cluster delete command implementation.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/cluster/_list.py Adds cluster list-by-project command implementation.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/cluster/_show.py Adds cluster show command implementation.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/cluster/_update.py Adds cluster update command implementation (generic update enabled).
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/cluster/_wait.py Adds cluster wait command implementation.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/cluster/__cmd_group.py Registers the ... project cluster command group.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/cluster/init.py Exports cluster command group/commands.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/_create.py Adds project create command implementation.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/_delete.py Adds project delete command implementation.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/_list.py Adds project list-by-organization command implementation.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/_show.py Adds project show command implementation.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/_update.py Adds project update command implementation (generic update enabled).
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/_wait.py Adds project wait command implementation.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/_cluster_tier_region.py Adds “cluster-tier-region” helper command under project.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/_tier_limit_reached.py Adds “tier-limit-reached” helper command under project.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/__cmd_group.py Registers the ... organization project command group.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/project/init.py Exports project command group/commands.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_create.py Updates org create to 2026-03-01-preview and refreshes help/examples.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_delete.py Updates org delete to 2026-03-01-preview and refreshes help/examples.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_list.py Updates org list to 2026-03-01-preview and refreshes help/examples.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_show.py Updates org show to 2026-03-01-preview and refreshes help/examples.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_wait.py Updates org wait to 2026-03-01-preview.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/__cmd_group.py Updates org command-group help text.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/__cmd_group.py Updates atlas command-group help text.
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/__cmd_group.py Updates top-level mongo-db command-group help text.

Comment on lines 14 to +18
@AllowLargeResponse(size_kb=10240)
@ResourceGroupPreparer(name_prefix='cli_test_mongodb', location="eastus2")
def test_mongo_db(self, resource_group):
def test_mongo_db(self):
self.kwargs.update({
'name': 'MongoDBCLITestOrg2',
'location': 'eastus2',
'subscription': '00000000-0000-0000-0000-000000000000',
'marketplace_subscription_id': '00000000-0000-0000-0000-000000000000',
'publisher_id': 'mongodb',
'offer_id': 'mongodb_atlas_azure_native_prod',
'plan_id': 'private_plan',
'plan_name': 'Pay as You Go (Free) (Private)',
'term_unit': 'P1M',
'term_id': 'gmz7xq9ge3py',
'user_first_name': 'dummy',
'user_last_name': 'dummy',
'user_email': 'test@example.com',
'organization-name': 'MongoDBCLITestOrg2',
'resource_group': 'cli-test-rg'
'name': 'greenTestsRun',
'resource_group': 'sharmaanuTest',
Comment thread src/mongo-db/azext_mongo_db/tests/latest/test_mongo_db.py
Comment on lines +85 to +90
_args_schema.cluster_tier = AAZStrArg(
options=["--cluster-tier"],
arg_group="Properties",
help="Cluster tier (FREE, FLEX, M10, M30).",
enum={"FLEX": "FLEX", "FREE": "FREE", "M10": "M10", "M30": "M30"},
)
Comment on lines +91 to +95
_args_schema.region_name = AAZStrArg(
options=["--region-name"],
arg_group="Properties",
help="Azure region where the cluster is deployed.",
)
Comment thread src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/__cmd_group.py
@yonzhan
yonzhan requested a review from Pan-Qi August 2, 2026 23:33
@yonzhan

yonzhan commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

mongo-db

@VeryEarly VeryEarly assigned VeryEarly and unassigned Pan-Qi Aug 3, 2026
@VeryEarly

Copy link
Copy Markdown

Hi @sharmaanuj334 can you please help provide link of aaz PR: companion PR to Azure/aaz with command model definitions? Thanks

@sharmaanuj334

Copy link
Copy Markdown
Contributor Author

Hi @sharmaanuj334 can you please help provide link of aaz PR: companion PR to Azure/aaz with command model definitions? Thanks

Azure/aaz#1056 @VeryEarly

@VeryEarly
VeryEarly merged commit b277770 into Azure:main Aug 4, 2026
@azclibot

azclibot commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

[Release] Update index.json for extension [ mongo-db-1.1.0b1 ] : https://dev.azure.com/msazure/One/_build/results?buildId=175188610&view=results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants