Skip to content

Conversation

@ajaykumarmehra
Copy link
Member

@ajaykumarmehra ajaykumarmehra commented Jul 1, 2025


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copilot AI review requested due to automatic review settings July 1, 2025 14:56
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Jul 1, 2025

⚠️Azure CLI Extensions Breaking Change Test
⚠️mongo-db
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd mongo-db atlas organization create cmd mongo-db atlas organization create added parameter mi_system_assigned
⚠️ 1006 - ParaAdd mongo-db atlas organization create cmd mongo-db atlas organization create added parameter mi_user_assigned

@azure-client-tools-bot-prd
Copy link

Hi @ajaykumarmehra,
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.

@yonzhan
Copy link
Collaborator

yonzhan commented Jul 1, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

github-actions bot commented Jul 1, 2025

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Contributor

Copilot AI left a comment

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 updates the MongoDB CLI extension by bumping all Atlas organization commands to the new 2025-06-01 API version, removes preview flags, and adds managed identity support to the create command.

  • Bump API version from 2024-11-18-preview to 2025-06-01 across wait, show, list, delete, and create commands
  • Remove is_preview=True from all Atlas organization and parent command groups
  • Introduce --system-assigned and --user-assigned identity options in the create command

Reviewed Changes

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

Show a summary per file
File Description
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_wait.py Bump api-version and resource version
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_show.py Remove preview flag, bump version and api-version
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_list.py Remove preview flag, bump version, resources, and api-version
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_delete.py Remove preview flag and bump version and api-version
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_create.py Remove preview flag, bump versions, add MI flags, and extend content builder
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/__cmd_group.py Remove is_preview
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/__cmd_group.py Remove is_preview
src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/__cmd_group.py Remove is_preview
Comments suppressed due to low confidence (2)

src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_create.py:66

  • New managed identity arguments (--system-assigned, --user-assigned) should have corresponding unit or integration tests to verify serialization and payload construction.
        _args_schema.mi_system_assigned = AAZStrArg(

src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_create.py:128

  • [nitpick] The default value for --publisher-id was removed, making it required without a fallback. Please confirm this change is intentional or reintroduce the original default ("mongodb") for smoother UX.
        offer_details.publisher_id = AAZStrArg(

_builder.set_prop("properties", AAZObjectType)
_builder.set_prop("tags", AAZDictType, ".tags")

identity = _builder.get(".identity")
Copy link

Copilot AI Jul 1, 2025

Choose a reason for hiding this comment

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

The builder never initializes an identity object, so get(".identity") will return None and the MI fields won't be set. Consider calling _builder.set_prop("identity", AAZObjectType) before accessing its children.

Copilot uses AI. Check for mistakes.
Comment on lines +66 to +70
_args_schema.mi_system_assigned = AAZStrArg(
options=["--system-assigned", "--mi-system-assigned"],
arg_group="Identity",
help="Set the system managed identity",
blank="True",
Copy link

Copilot AI Jul 1, 2025

Choose a reason for hiding this comment

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

The --system-assigned flag represents a boolean state; using AAZStrArg may lead to type mismatches. Consider switching to AAZBoolArg for clarity and correct type handling.

Suggested change
_args_schema.mi_system_assigned = AAZStrArg(
options=["--system-assigned", "--mi-system-assigned"],
arg_group="Identity",
help="Set the system managed identity",
blank="True",
_args_schema.mi_system_assigned = AAZBoolArg(
options=["--system-assigned", "--mi-system-assigned"],
arg_group="Identity",
help="Set the system managed identity",

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Jul 1, 2025

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

@github-actions
Copy link

github-actions bot commented Jul 1, 2025

Hi @ajaykumarmehra

⚠️ Release Requirements

Module: mongo-db

  • ⚠️ Please update VERSION to be 1.0.0b2 in src/mongo-db/setup.py

Notes

@ajaykumarmehra ajaykumarmehra changed the title updating mongodb cli updating mongodb cli to stable version Jul 1, 2025
@yonzhan yonzhan requested review from calvinhzy and evelyn-ys July 1, 2025 22:51
@evelyn-ys
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@evelyn-ys
Copy link
Member

evelyn-ys commented Jul 3, 2025

@ajaykumarmehra You need to update the extension version in setup.py and release notes in HISTORY.rst. Or else the extension won't trigger a release

Pls go through Extension version schema before update

@evelyn-ys
Copy link
Member

Pls re-record the tests with new API version

@github-actions github-actions bot added the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Jul 3, 2025
@evelyn-ys
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@evelyn-ys evelyn-ys added skip-cal-version and removed release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. labels Jul 3, 2025
@evelyn-ys
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@ResourceGroupPreparer(name_prefix='cli_test_mongodb', location="centraluseuap")
@ResourceGroupPreparer(name_prefix='cli_test_mongodb', location="eastus2")
def test_mongo_db(self, resource_group):
self.kwargs.update({
Copy link
Member Author

Choose a reason for hiding this comment

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

update values to dummy values always for pipeline integration tests to pass

@evelyn-ys
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@evelyn-ys
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@evelyn-ys evelyn-ys merged commit 5ee1f18 into Azure:main Jul 3, 2025
24 checks passed
@azclibot
Copy link
Collaborator

azclibot commented Jul 3, 2025

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants