Skip to content

[MCC] New Version Commands For Microsoft Connected Cache #8863

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

Merged
merged 7 commits into from
Jun 25, 2025

Conversation

dcwell
Copy link
Member

@dcwell dcwell commented Jun 14, 2025

…ache.


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 Copilot AI review requested due to automatic review settings June 14, 2025 01:19
Copy link

azure-client-tools-bot-prd bot commented Jun 14, 2025

❌Azure CLI Extensions Breaking Change Test
❌mcc
rule cmd_name rule_message suggest_message
1002 - CmdRemove mcc ent node get-provisioning-details cmd mcc ent node get-provisioning-details removed please confirm cmd mcc ent node get-provisioning-details removed
⚠️ 1001 - CmdAdd mcc ent node get-deployment-details cmd mcc ent node get-deployment-details added

Copy link

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

Copy link

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>

@yonzhan
Copy link
Collaborator

yonzhan commented Jun 14, 2025

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

Copy link

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

Copy link
Contributor

@Copilot 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 MCC extension commands to use the new 2024-11-30-preview API version and adds several new properties and arguments related to provisioning and cache node configuration.

  • Bumped all api-version references to 2024-11-30-preview
  • Added new schema fields (drive_configuration, proxy_url_configuration, tlsCertificateProvisioningKey, creationMethod, currentTlsCertificate, etc.) and removed deprecated ones (proxy_url, update_cycle_type)
  • Introduced a new --creation-method argument and cleaned up related arg groups

Reviewed Changes

Copilot reviewed 32 out of 32 changed files in this pull request and generated 1 comment.

File Description
src/mcc/azext_mcc/aaz/latest/mcc/isp/node/_get_provisioning_details.py Version bump and new provisioning schema fields (drive_configuration, proxy_url_configuration, TLS).
src/mcc/azext_mcc/aaz/latest/mcc/ent/resource/_list.py Version bump, swapped list-by-subscription vs list-by-resource-group logic, fixed class names.
src/mcc/azext_mcc/aaz/latest/mcc/ent/node/_update.py Added creation_method argument in multiple commands; removed old flags; updated content mappings.
Comments suppressed due to low confidence (3)

src/mcc/azext_mcc/aaz/latest/mcc/isp/node/_get_provisioning_details.py:196

  • You've added drive_configuration, proxy_url_configuration, and tlsCertificateProvisioningKey fields to the provisioning schema—consider adding or updating unit tests to cover serialization and deserialization of these new properties.
properties.drive_configuration = AAZListType(

src/mcc/azext_mcc/aaz/latest/mcc/ent/resource/_list.py:51

  • The original logic distinguished between listing by resource group vs subscription, but here the conditions are inverted and the method calls swapped. Please restore the original intent: use has_value(resource_group) to call the ResourceGroup operation and otherwise call the Subscription operation.
condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True

src/mcc/azext_mcc/aaz/latest/mcc/ent/node/_update.py:76

  • [nitpick] The creation_method argument is duplicated across multiple commands (create, update). Consider extracting it into a shared helper or base argument schema to reduce duplication and improve maintainability.
_args_schema.creation_method = AAZIntArg(

@@ -70,7 +69,7 @@ def _output(self, *args, **kwargs):
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
return result, next_link

class EnterpriseMccCustomersListByResourceGroup(AAZHttpOperation):
class EnterpriseMccCustomersListBySubscription(AAZHttpOperation):
Copy link
Preview

Copilot AI Jun 14, 2025

Choose a reason for hiding this comment

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

The class names for the HTTP handlers were swapped. The URL /providers/Microsoft.ConnectedCache/enterpriseMccCustomers should be implemented by the Subscription class, and the resource-group path by the ResourceGroup class. Please rename them to match their actual endpoints.

Suggested change
class EnterpriseMccCustomersListBySubscription(AAZHttpOperation):
class EnterpriseMccCustomersListByResourceGroup(AAZHttpOperation):

Copilot uses AI. Check for mistakes.

Copy link

github-actions bot commented Jun 14, 2025

@yonzhan yonzhan requested a review from kairu-ms June 14, 2025 09:22
@yonzhan yonzhan requested a review from jsntcy June 14, 2025 09:23
@necusjz
Copy link
Member

necusjz commented Jun 16, 2025

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@necusjz
Copy link
Member

necusjz commented Jun 16, 2025

Hi @dcwell

Release Suggestions

Module: mcc

  • Please log updates into to src/mcc/HISTORY.rst
  • Update VERSION to 1.0.0b3 in src/mcc/setup.py

Notes

@dcwell would you mind update it?

@dcwell
Copy link
Member Author

dcwell commented Jun 16, 2025

Hi @dcwell

Release Suggestions

Module: mcc

  • Please log updates into to src/mcc/HISTORY.rst
  • Update VERSION to 1.0.0b3 in src/mcc/setup.py

Notes

@dcwell would you mind update it?

@necusjz I have updated with the suggested changes.

@necusjz
Copy link
Member

necusjz commented Jun 17, 2025

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

necusjz
necusjz previously approved these changes Jun 17, 2025
@necusjz
Copy link
Member

necusjz commented Jun 17, 2025

@dcwell could you plz provide the link of your pull request in Azure/aaz?

@dcwell
Copy link
Member Author

dcwell commented Jun 24, 2025

@necusjz @kairu-ms Please re-review this PR. I have added more changes based on changing requirements for our product. Latest iteration is final.

Here is the AAZ repo PR associated with this:
Azure/aaz#792

@necusjz
Copy link
Member

necusjz commented Jun 24, 2025

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@necusjz
Copy link
Member

necusjz commented Jun 25, 2025

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@dcwell
Copy link
Member Author

dcwell commented Jun 25, 2025

/azp run

Copy link

Commenter does not have sufficient privileges for PR 8863 in repo Azure/azure-cli-extensions

@necusjz
Copy link
Member

necusjz commented Jun 25, 2025

/azp run

Copy link

Azure Pipelines successfully started running 2 pipeline(s).

necusjz added a commit to Azure/aaz that referenced this pull request Jun 25, 2025
[CLI][Extensions][mcc][v1.0.0b3] AAZ PR Pair for Azure/azure-cli-extensions#8863
@necusjz necusjz changed the title [CLI][Extensions][MCC] New Version Commands For Microsoft Connected C… [MCC] New Version Commands For Microsoft Connected Cache Jun 25, 2025
@necusjz necusjz merged commit 21ed215 into Azure:main Jun 25, 2025
24 checks passed
@azclibot
Copy link
Collaborator

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

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.

5 participants