-
Notifications
You must be signed in to change notification settings - Fork 1.5k
updating mongodb cli to stable version #8918
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
updating mongodb cli to stable version #8918
Conversation
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| mongo-db atlas organization create | cmd mongo-db atlas organization create added parameter mi_system_assigned |
||
| mongo-db atlas organization create | cmd mongo-db atlas organization create added parameter mi_user_assigned |
|
Hi @ajaykumarmehra, |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this 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-previewto2025-06-01across wait, show, list, delete, and create commands - Remove
is_preview=Truefrom all Atlas organization and parent command groups - Introduce
--system-assignedand--user-assignedidentity options in thecreatecommand
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-idwas 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") |
Copilot
AI
Jul 1, 2025
There was a problem hiding this comment.
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.
| _args_schema.mi_system_assigned = AAZStrArg( | ||
| options=["--system-assigned", "--mi-system-assigned"], | ||
| arg_group="Identity", | ||
| help="Set the system managed identity", | ||
| blank="True", |
Copilot
AI
Jul 1, 2025
There was a problem hiding this comment.
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.
| _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", |
CodeGen Tools Feedback CollectionThank 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 |
|
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
@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 |
|
Pls re-record the tests with new API version |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/azp run |
|
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({ |
There was a problem hiding this comment.
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
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
[Release] Update index.json for extension [ mongo-db-1.0.0 ] : https://dev.azure.com/msazure/One/_build/results?buildId=129221058&view=results |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)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.jsonautomatically.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.