Skip to content

Conversation

@BigCat20196
Copy link
Contributor

@BigCat20196 BigCat20196 commented Mar 18, 2021

Description

Resolve #16824

[Compute] When users use --email but don't use --webhook, remind users that these two parameters need to be set together.

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.

@qwordy
Copy link
Member

qwordy commented Mar 18, 2021

@BigCat20196 An example PR. #17344
Pay attention to title format and description.

if webhook:
if email:
if not webhook:
raise CLIError('usage error: --webhook is a required parameter')
Copy link
Member

Choose a reason for hiding this comment

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

When is it a required parameter? The error message could be better.

Comment on lines 1010 to 1014
'emailRecipient': email,
'webhookUrl': webhook,
'timeInMinutes': 30,
'status': 'Enabled'
}
Copy link
Member

Choose a reason for hiding this comment

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

Why add indent?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it's unnecessary. I took it out

@BigCat20196 BigCat20196 changed the title Update function of auto_shutdown_vm {Compute}Update function of auto_shutdown_vm Mar 18, 2021
@yungezz yungezz changed the title {Compute}Update function of auto_shutdown_vm {Compute} Update function of auto_shutdown_vm Mar 19, 2021
daily_recurrence = {'time': time}
notification_settings = None
if webhook:
if email:
Copy link
Member

Choose a reason for hiding this comment

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

is this service behavior? If no, this will be breaking change to end users: adding a required param for email.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, the webhook parameter is also required if the user needs to set --email. This issue is that the user doesn't know the settings -- email needs to be set -- webhook. I make this change to prompt the user that both parameters must exist at the same time for them to take effect

Copy link
Member

Choose a reason for hiding this comment

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

Do we allow webhook and no email?

'timeInMinutes': 30,
'status': 'Enabled'
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
}
}

@BigCat20196 BigCat20196 deleted the update-custom branch March 24, 2021 05:56
@BigCat20196 BigCat20196 restored the update-custom branch March 24, 2021 07:17
@BigCat20196 BigCat20196 reopened this Mar 24, 2021
@BigCat20196 BigCat20196 merged commit 983cb41 into Azure:dev Mar 24, 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.

Bug: Please allow for setting up email for az vm auto-shutdown.

3 participants