Skip to content

[MCC] Upgrade az mcc ent commands to the 2026-06-01 API version - #10290

Merged
Ethan Yang (necusjz) merged 3 commits into
Azure:mainfrom
dcwell:feature-mcc-2026-06-01
Sep 3, 2026
Merged

[MCC] Upgrade az mcc ent commands to the 2026-06-01 API version#10290
Ethan Yang (necusjz) merged 3 commits into
Azure:mainfrom
dcwell:feature-mcc-2026-06-01

Conversation

@dcwell

@dcwell Denali Cornwell (dcwell) commented Sep 2, 2026

Copy link
Copy Markdown
Member

🤖 PR Validation — ⚠️ Review suggested

Breaking Changes
⚠️ None
⚠️Azure CLI Extensions Breaking Change Test
⚠️mcc
rule cmd_name rule_message suggest_message
⚠️ 1010 - ParaPropUpdate mcc ent node update cmd mcc ent node update update parameter auto_update_ring: updated property choices from ['Fast', 'Preview', 'Slow'] to ['Beta', 'Stable']
⚠️ 1010 - ParaPropUpdate mcc ent node update cmd mcc ent node update update parameter proxy: updated property choices from ['Disabled', 'Enabled', 'None', 'Required'] to ['Disabled', 'Enabled']

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

Related command

az mcc ent node create|update|delete|show|list|get-deployment-details
az mcc ent resource create|delete|list|wait

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 azdev required)
  • My extension version conforms to the Extension version schema

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.


Summary

Upgrades every az mcc ent command from 2024-11-30-preview to the 2026-06-01
GA API version, and updates the customization layer to match the new API.

Command models: Azure/aaz#1079

mcc 1.0.0b3 -> 1.0.0b4.

Breaking changes

Both are intentional and both are called out in HISTORY.rst.

1. --auto-update-ring now accepts only Stable and Beta.

2026-06-01 renames the customer selectable update rings. Per the swagger, Slow,
Fast and Preview are "Legacy update ring retained for backward compatibility.
This value was used prior to 2026-06-01." Stable replaces Slow and Beta
replaces Fast. MCC is standardising on the new rings, so the legacy values are no
longer offered.

The service still stores the legacy value: sending Stable reads back as Slow,
and sending Beta reads back as Fast. Both pairings were confirmed against the
live service. The extension translates on output so a customer sees the same
vocabulary they typed.

2. --proxy now accepts only Enabled and Disabled.

This one restores behaviour rather than removing it. The generated enum carries the
service values (None/Required) from the ProxyRequired swagger enum, while
pre_operations has always rejected exactly those two values and told the user to
pass Enabled/Disabled instead. In 1.0.0b3 the generated enum happened to carry
all four values, so it worked. After regenerating against 2026-06-01 only the
service values remained, which left every value of --proxy failing — two at
argument parsing, two in validation. The extension now offers only the two customer
facing values and translates them to Required/None before the request is sent.

Fixes

  • --proxy was completely unusable after the API upgrade, as described above.
  • Proxy edits on a node that already had a proxy configured. The instance state
    was compared against Enabled, but the service reports Required, so that branch
    was unreachable. Changing only --proxy-host or only --proxy-port failed, and
    disabling the proxy left the previous proxyUrlConfiguration on the resource.
  • Update ring scheduling. The rule was written as if ring == "Fast" ... else assume Slow, which was true when only three rings existed. With five values, three
    fell through the else, so a node on Stable/Beta/Preview could be moved to a
    scheduled ring without ever being asked for --auto-update-day/week/time. The check
    is now written against the target ring: moving to Stable requires all three,
    moving to Beta rejects all three because that schedule is managed by Microsoft.
  • --auto-update-day accepted 0. The help said 1-7 and the swagger allows 0-7.
    It is now validated to 1-7, matching the existing --auto-update-week guard.
  • show and list leaked service vocabulary. Proxy state and update ring are now
    reported with the same values the commands accept as input.

Other changes

  • Hid --bgp-network-interface, --runtime-account-type and the four
    --open-firewall-port* arguments. These arrived with 2026-06-01, are reserved for
    an upcoming feature, and are not ready for customer use. They were only exposed on
    update; on create they sit under cache_node, which is already hidden.
  • Corrected help for --auto-update-ring, --auto-update-day, --auto-update-week,
    --auto-update-time, --cache-drive and --proxy so it states the behaviour the
    extension actually enforces.
  • Added examples to all nine registered commands. The previous examples lived only in
    the generated Python, so they were lost on the first regeneration; they are now part
    of the command model and survive future regenerations.

Testing

test_mcc was re-recorded live against the 2026-06-01 API and passes in both live
and playback mode. It also now asserts that the proxy state round-trips as Enabled
rather than Required.

  • azdev test mcc — passed (live re-record, then playback)
  • azdev style mcc — pylint and flake8 passed
  • azdev linter --include-whl-extensions mcc — 21/21 rules passed
  • python scripts/ci/test_index.py -q — OK

- Regenerate all az mcc ent commands against 2026-06-01.
- Restrict --auto-update-ring to Stable and Beta; report the new ring
  names even though the service still stores the legacy Slow and Fast.
- Restrict --proxy to Enabled and Disabled and translate to the values
  the service expects. --proxy previously failed for every value.
- Require an install schedule when moving to Stable and reject one when
  moving to Beta.
- Reject 0 for --auto-update-day.
- Hide the arguments reserved for an upcoming feature.
- Correct the help so it matches the enforced behaviour, add examples,
  and re-record the scenario test.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 50dadd04-01f2-4767-883b-69a9a6f8a20d
Copilot AI lite review requested due to automatic review settings September 2, 2026 19:32
@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Denali Cornwell (@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 pyproject.toml (or setup.py, if the extension has not migrated yet) 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.

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.

🟡 Changes recommended

The CLI help for --proxy-host remains inconsistent with validation (URL example includes : which is rejected), so user-facing documentation should be aligned before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR upgrades the az mcc ent command surface in the mcc extension from 2024-11-30-preview to the 2026-06-01 GA API version, and updates the customization layer and tests to align CLI behavior with the new swagger/service semantics (notably update ring and proxy vocabulary translation).

Changes:

  • Bumped extension version to 1.0.0b4 and documented breaking changes/fixes in HISTORY.rst.
  • Regenerated AAZ command modules to target 2026-06-01 and added/updated command examples.
  • Updated the customization layer and scenario test to enforce/validate updated rings/proxy behavior and to present customer-facing aliases in output.
File summaries
File Description
src/mcc/setup.py Bumps extension version to 1.0.0b4.
src/mcc/HISTORY.rst Adds 1.0.0b4 changelog, including breaking changes and fixes.
src/mcc/azext_mcc/tests/latest/test_mcc.py Updates scenario test inputs/asser­tions for new proxy/ring semantics and validates proxy alias in output.
src/mcc/azext_mcc/custom.py Adds ring/proxy translation logic, strengthens validations, hides reserved args, and adjusts help/enums.
src/mcc/azext_mcc/azext_metadata.json Raises minimum Azure CLI core requirement to 2.75.0.
src/mcc/azext_mcc/aaz/latest/mcc/ent/resource/_wait.py Updates API version to 2026-06-01.
src/mcc/azext_mcc/aaz/latest/mcc/ent/resource/_show.py Updates API version to 2026-06-01.
src/mcc/azext_mcc/aaz/latest/mcc/ent/resource/_list.py Updates API version to 2026-06-01 and refreshes examples.
src/mcc/azext_mcc/aaz/latest/mcc/ent/resource/_delete.py Updates API version to 2026-06-01 and refreshes examples.
src/mcc/azext_mcc/aaz/latest/mcc/ent/resource/_create.py Updates API version to 2026-06-01, refreshes example, and adds ISO datetime formatting.
src/mcc/azext_mcc/aaz/latest/mcc/ent/node/_wait.py Updates API version to 2026-06-01 and extends read schema with new fields.
src/mcc/azext_mcc/aaz/latest/mcc/ent/node/_update.py Updates API version to 2026-06-01, refreshes examples, and updates schema with new fields/enum values.
src/mcc/azext_mcc/aaz/latest/mcc/ent/node/_show.py Updates API version to 2026-06-01, refreshes examples, and extends read schema with new fields.
src/mcc/azext_mcc/aaz/latest/mcc/ent/node/_list.py Updates API version to 2026-06-01, refreshes examples, and extends read schema with new fields.
src/mcc/azext_mcc/aaz/latest/mcc/ent/node/_get_deployment_details.py Updates API version to 2026-06-01 and refreshes example.
src/mcc/azext_mcc/aaz/latest/mcc/ent/node/_delete.py Updates API version to 2026-06-01 and refreshes example.
src/mcc/azext_mcc/aaz/latest/mcc/ent/node/_create.py Updates API version to 2026-06-01 and adds ISO datetime formatting plus new schema fields.
Review details
  • Files reviewed: 17/18 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +536 to +539
# The swagger description repeats the allowed values, which the CLI already appends.
args_schema.proxy._help["short-summary"] = (
"Enable or disable proxy. When enabled, provide --proxy-host and --proxy-port."
)
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

The service accepts the new ring names but stores the legacy ones, and
then rejects those legacy names on write. Any update that did not
restate --auto-update-ring echoed the stored value back and failed with
InvalidAutoUpdateRingTypeForApiVersion. Normalise the ring on the
instance in pre_instance_update so the request carries the current name.

Found by an end to end run: setting the ring to Beta and then changing
only --proxy-host failed. Re-recorded the scenario test.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 50dadd04-01f2-4767-883b-69a9a6f8a20d
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

@yonzhan

Copy link
Copy Markdown
Collaborator

MCC

Command output no longer rewrites the update ring to the name that was
sent. If a cache node is on a legacy ring the operator now sees that,
which matters because those nodes exist and are worth spotting.

The input restriction is unchanged: only Stable and Beta are accepted,
and Slow, Fast and Preview are still rejected at argument parsing. The
replacement done in pre_instance_update stays as well, because the
service rejects the legacy name on write and a generic update would
otherwise echo it straight back.

Verified against the live service: a raw REST PUT of "Stable", with no
CLI involved, is persisted as "Slow". The rewrite is service side and
cannot be prevented from the extension.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 50dadd04-01f2-4767-883b-69a9a6f8a20d
@a0x1ab

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

@necusjz
Ethan Yang (necusjz) merged commit f6c6b4a into Azure:main Sep 3, 2026
24 checks passed
@azclibot

Copy link
Copy Markdown
Collaborator

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

Denali Cornwell (dcwell) added a commit to dcwell/azure-cli-extensions that referenced this pull request Sep 3, 2026
1.0.0b4 was published to src/index.json after Azure#10290 merged, so the two error
message fixes cannot ship under that version. Bump to 1.0.0b5 and move the
entries into their own HISTORY block.

Also address the two grammar issues raised in review, both on messages this
branch already rewrites:
- "Parameter --proxy is set not provided" was ungrammatical; it now reads
  "Parameter --proxy is not provided".
- "must provide --proxy-host and --proxy-port parameter" referred to two
  parameters in the singular; it now reads "must provide both --proxy-host and
  --proxy-port parameters".

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 50dadd04-01f2-4767-883b-69a9a6f8a20d
Ethan Yang (necusjz) pushed a commit that referenced this pull request Sep 7, 2026
…ent (#10292)

* [MCC] Fix validation errors that pointed users at a nonexistent argument

Proxy validation errors on `az mcc ent node update` instructed the user to
set --enable-proxy. That argument is deliberately unregistered, so following
the guidance in the message failed with "unrecognized arguments". All eight
messages now name --proxy, the argument the command actually exposes. The
internal argument name is unchanged.

az mcc ent node create reported the cache node name when it failed to find
the MCC resource, even though the lookup uses the MCC resource name. A bare
except also discarded the underlying error, so a mistyped resource group
surfaced as a missing MCC resource. The message now names the MCC resource
and the resource group, and includes the reason the lookup failed.

Both bare except clauses are now except Exception with exception chaining.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 50dadd04-01f2-4767-883b-69a9a6f8a20d

* [MCC] Release these fixes as 1.0.0b5 and address review feedback

1.0.0b4 was published to src/index.json after #10290 merged, so the two error
message fixes cannot ship under that version. Bump to 1.0.0b5 and move the
entries into their own HISTORY block.

Also address the two grammar issues raised in review, both on messages this
branch already rewrites:
- "Parameter --proxy is set not provided" was ungrammatical; it now reads
  "Parameter --proxy is not provided".
- "must provide --proxy-host and --proxy-port parameter" referred to two
  parameters in the singular; it now reads "must provide both --proxy-host and
  --proxy-port parameters".

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 50dadd04-01f2-4767-883b-69a9a6f8a20d

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 50dadd04-01f2-4767-883b-69a9a6f8a20d
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.

6 participants