Skip to content

Conversation

@kairu-ms
Copy link
Contributor

@kairu-ms kairu-ms commented Mar 12, 2021

Closed #17268

webhook_properties property has been renamed in SDK. In order to avoid this kind of breaking change, I rewrite the code to eliminate the dependency on this property.

Description

Testing Guide

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 feature.


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

@kairu-ms kairu-ms requested review from jsntcy and msyyc as code owners March 12, 2021 05:09
@kairu-ms
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@yonzhan
Copy link
Collaborator

yonzhan commented Mar 12, 2021

Monitor

@yonzhan yonzhan added this to the S184 milestone Mar 12, 2021
instance.actions.append(action)
add_action_ids = {x.action_group_id.lower() for x in add_actions}
instance.actions = [x for x in instance.actions if x.action_group_id.lower() not in add_action_ids]
instance.actions.extend(add_actions)
Copy link
Member

Choose a reason for hiding this comment

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

No need to use match for webhook_properties now? What does this change mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For 'add_actions', the logical of original code is that if that action already exist then update its properties. Now I change the logic, if that action already exist, remove the old one and add the new one.

@kairu-ms kairu-ms merged commit b685dbb into Azure:dev Mar 17, 2021
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.

Exception in an attempt to remove and add action group for a metric alert rule

4 participants