-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Backup] az backup: Fix afs tier filtering for list rps
#31890
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
base: dev
Are you sure you want to change the base?
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
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 fixes a bug in the Azure CLI backup module where filtering recovery points by tier type was failing for Azure File Share (AFS) backups due to changes in the API response structure. The fix improves the parsing logic to handle both old and new API response formats for recovery point tier details.
- Updates the recovery point tier parsing logic to access tier details directly from properties
- Adds fallback support for the legacy
recoveryPointTierDetailsproperty name - Improves handling of tier detail objects to support both object attributes and dictionary access patterns
Comments suppressed due to low confidence (1)
src/azure-cli/azure/cli/command_modules/backup/custom_afs.py:288
- [nitpick] The property name 'recoveryPointTierDetails' uses camelCase which is inconsistent with Python naming conventions. Consider using 'recovery_point_tier_details' for consistency, though this may be dictated by the API response format.
tier_details_list = getattr(rp.properties, 'recoveryPointTierDetails', [])
|
please note that the code completion date for the upcoming release is 08/26/2025 at 07:00 UTC. If you want to catch this release train, please resolve the CI issues ASAP, otherwise it has to be postponed to next sprint (10/14). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
please resolve CI issues. |
az backup: Fix afs tier filtering for list rps
|
@IannGeorges Any update? |
Related command
az backup recoverypoint list
Description
The API response has changed, resulting in correct parsing of the Recovery Point tier details, preventing users from using filtering.
Testing Guide
Tested filtering list of recovery point for an existing AFS backup before changes were made to reproduce bug.
Tested filtering list of recovery point for an existing AFS backup after changes were made to validate fix.
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis 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.