Skip to content
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

[Az.RecoveryServices.Backup] Improve Policy Error Code #26788

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

IannGeorges
Copy link
Member

Description

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • For SDK-based development mode, update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • For autorest-based development mode, include the changelog in the PR description.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copy link

azure-client-tools-bot-prd bot commented Nov 29, 2024

️✔️Az.Accounts
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Compute
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Network
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️Az.RecoveryServices
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Breaking Change Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Signature Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Help File Existence Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
⚠️File Change Check
⚠️PowerShell Core - Windows
Type Cmdlet Description Remediation
⚠️ It is required to update ChangeLog.md if you want to release a new version for Az.RecoveryServices. Add a changelog record under Upcoming Release section with past tense.
⚠️Windows PowerShell - Windows
Type Cmdlet Description Remediation
⚠️ It is required to update ChangeLog.md if you want to release a new version for Az.RecoveryServices. Add a changelog record under Upcoming Release section with past tense.
️✔️UX Metadata Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️PowerShell Core - Linux
️✔️PowerShell Core - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows

else
{
MinDurationCountInDays = PolicyConstants.AfsDailyRetentionDaysMin;
MaxDurationCountInDays = PolicyConstants.AfsDailyRetentionDaysMax;
Copy link
Member

Choose a reason for hiding this comment

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

why do we set default min max values to AFS min-max ?

Copy link
Member Author

Choose a reason for hiding this comment

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

@hiaga in-order to give default values to AFS min/max in case the BackupManagementType is AzureStorage & we haven't passed in optional params for min & max. For vault policy, we pass in our custom params, however we snapshot retention for AFS it will default to these constants, matching the portal experience.

@VeryEarly
Copy link
Contributor

/azp run azure-powershell - security-tools

Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@VeryEarly
Copy link
Contributor

/azp run azure-powershell - security-tools

Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@VeryEarly VeryEarly self-assigned this Dec 3, 2024
@VeryEarly VeryEarly merged commit 27283dc into Azure:main Dec 3, 2024
12 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 3, 2024
* fix error messages

* pass custom retention constants for vault policy validation

* fix unit test

---------

Co-authored-by: ianna1-admin <ianna@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants