-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[Storage] Support ORS metric GA #28505
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
Conversation
Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
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 adds support for Object Replication Service (ORS) metrics in Azure Storage, enabling users to control whether metrics are collected for object replication policies through a new -EnableMetric
parameter.
- Adds new
-EnableMetric
boolean parameter to theSet-AzStorageObjectReplicationPolicy
cmdlet - Updates the object replication policy model to include metrics properties
- Modifies the display format to show metrics status in table output
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
SetAzStorageObjectReplicationPolicy.cs | Adds -EnableMetric parameter and logic to set metrics properties on the policy |
PSObjectReplicationPolicy.cs | Adds metrics model class and integration with existing policy structure |
Storage.Management.format.ps1xml | Updates table display format to include metrics enabled status column |
Set-AzStorageObjectReplicationPolicy.md | Updates help documentation with new parameter and usage examples |
ChangeLog.md | Documents the new metrics support feature |
StorageBlobTests.ps1 | Updates tests to verify metrics functionality and fixes test location references |
* Supported Enable Metrics when set object replication policy | ||
- `New-AzStorageObjectReplicationPolicyRule` |
Copilot
AI
Sep 4, 2025
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.
The ChangeLog entry is incorrect. The feature was added to Set-AzStorageObjectReplicationPolicy
, not New-AzStorageObjectReplicationPolicyRule
. The cmdlet name should be corrected to match the actual changes made.
* Supported Enable Metrics when set object replication policy | |
- `New-AzStorageObjectReplicationPolicyRule` | |
- `Set-AzStorageObjectReplicationPolicy` |
Copilot uses AI. Check for mistakes.
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.
fixed
Mandatory = false, | ||
HelpMessage = "Indicates whether object replication metrics feature is enabled for the policy.", | ||
ParameterSetName = AccountObjectParameterSet)] | ||
[ValidateNotNullOrEmpty] |
Copilot
AI
Sep 4, 2025
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.
The [ValidateNotNullOrEmpty]
attribute is inappropriate for a boolean parameter. This attribute is designed for string/collection validation and will cause validation errors since boolean values cannot be null or empty in this context.
[ValidateNotNullOrEmpty] |
Copilot uses AI. Check for mistakes.
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.
fixed
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.md
and reviewed the following information:ChangeLog.md
file(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
.## Upcoming Release
header in the past tense.ChangeLog.md
if no new release is required, such as fixing test case only.