-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{ServiceBus} az servicebus queue update: Add breaking change alert messages
#24937
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -635,6 +635,7 @@ def return_valid_duration(update_value, current_value=None): | |||||
| from isodate import Duration | ||||||
| from azure.cli.core.azclierror import InvalidArgumentValueError | ||||||
| from azure.cli.command_modules.servicebus.constants import DURATION_SECS, DURATION_MIN, DURATION_DAYS | ||||||
| from argcomplete import warn | ||||||
| if update_value is not None: | ||||||
| value_toreturn = update_value | ||||||
| else: | ||||||
|
|
@@ -658,6 +659,7 @@ def return_valid_duration(update_value, current_value=None): | |||||
| return value_toreturn | ||||||
|
|
||||||
| if timedeltapattern.match(value_toreturn): | ||||||
| warn('Please use ISO8601 duration for timespan inputs. Timespan inputs of format (days:min:seconds) would be deprecated from version 2.45.0.') | ||||||
| day, minute, seconds = value_toreturn.split(":") | ||||||
| if timedelta(days=int(day), minutes=int(minute), seconds=int(seconds)) <= timedelta(days=DURATION_DAYS, | ||||||
| minutes=DURATION_MIN, | ||||||
|
|
@@ -673,6 +675,7 @@ def return_valid_duration_create(update_value): | |||||
| from datetime import timedelta | ||||||
| from isodate import parse_duration | ||||||
| from knack.util import CLIError | ||||||
| import warnings | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not Azure CLI convention to use azure-cli/src/azure-cli/azure/cli/command_modules/profile/custom.py Lines 38 to 39 in d331edf
|
||||||
| from azure.cli.command_modules.servicebus.constants import DURATION_SECS, DURATION_MIN, DURATION_DAYS | ||||||
| if update_value is not None: | ||||||
| if iso8601pattern.match(update_value): | ||||||
|
|
@@ -681,6 +684,7 @@ def return_valid_duration_create(update_value): | |||||
| 'duration value should be less than (days:min:secs) 10675199:10085:477581') | ||||||
|
|
||||||
| if timedeltapattern.match(update_value): | ||||||
| warnings.warn('Please use ISO8601 duration for timespan inputs. Timespan inputs of format (days:min:seconds) would be deprecated from version 2.45.0.') | ||||||
| day, minute, seconds = update_value.split(":") | ||||||
| if timedelta(days=int(day), minutes=int(minute), seconds=int(seconds)) <= timedelta(days=DURATION_DAYS, minutes=DURATION_MIN, seconds=DURATION_SECS): | ||||||
| update_value = timedelta(days=int(day), minutes=int(minute), seconds=int(seconds)) | ||||||
|
|
||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Why using
warnfromargcomplete. This usage is weird.