[AKS] az aks maintenanceconfiguration add/update: Add support for maintenanceWindow format in default maintenance configuration#33431
Conversation
️✔️AzureCLI-FullTest
|
|
Hi @anushkasingh16, |
❌AzureCLI-BreakingChangeTest
Please submit your Breaking Change Pre-announcement ASAP if you haven't already. Please note:
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Enable --schedule-type (Weekly-only) for the default AKS maintenance configuration using the maintenanceWindow format, and update CLI help/docs and tests accordingly.
Changes:
- Allow
--schedule-type Weeklyfor default maintenance configuration and constructmaintenance_windowpayload. - Add negative tests validating default-config argument constraints for
--schedule-typeand--interval-weeks. - Update parameter/help text and add CLI examples for default maintenanceWindow schedules.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/acs/maintenanceconfiguration.py | Adds schedule_type handling for default config and builds maintenance_window model |
| src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_maintenanceconfiguration.py | Updates/extends tests for default config schedule-type validation |
| src/azure-cli/azure/cli/command_modules/acs/_params.py | Clarifies --schedule-type help now that default supports Weekly |
| src/azure-cli/azure/cli/command_modules/acs/_help.py | Adds examples and updates help text to mention default Weekly-only support |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
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>
|
|
nit: validation gap — for default config with also the example text says "in UTC every week" but the maintenanceWindow path supports |
|
Please fix the failed CI check Azure.azure-cli (Check the Format of Pull Request Title and Content), @anushkasingh16 |
az aks maintenanceconfiguration add/update: Add support for maintenanceWindow format in default maintenance configuration
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Related command
az aks maintenanceconfiguration add
az aks maintenanceconfiguration update
Description
Previously, the default maintenance configuration only supported the legacy timeInWeek format (using --weekday and --start-hour).
The AKS RP API (since 2023-05-01) also supports the maintenanceWindow format for the default config, but the CLI was blocking it by raising an error when --schedule-type was provided for the default config.
This PR removes that restriction and allows users to use --schedule-type Weekly with the default maintenance configuration name, which routes to the maintenanceWindow format. The RP enforces that only Weekly schedule with intervalWeeks=1 is valid for the default config (since API version 2025-03-01), so the CLI validates this client-side as well.
The legacy --weekday --start-hour path continues to work unchanged for backward compatibility.
Testing Guide
History Notes
[AKS]
az aks maintenanceconfiguration add/update: Add--schedule-typeWeekly support for default maintenance configuration using the maintenanceWindow formatThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.