-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[Config] Rename local-context to config param-persist #15068
Conversation
Config |
@@ -133,17 +133,17 @@ def delete_file(self, recursive=False): | |||
parent_dir = os.path.dirname(local_context_file.config_path) | |||
if not os.listdir(parent_dir): | |||
shutil.rmtree(parent_dir) | |||
logger.warning('Local context persistence file in working directory %s is deleted.', |
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.
How about we change the file name local_context.py
to avoid inconsistency?
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.
Just as I described in the PR description, this PR is only attempted to update the UE part, actually the internal class / persist file / test framework are still called Local Context
(az local-context is marked deprecated but not totally removed yet). Let's leave the internal renaming work to totally remove az local-context
command.
linter_exclusions.yml
Outdated
@@ -1188,6 +1188,16 @@ config unset: | |||
key: | |||
rule_exclusions: | |||
- no_positional_parameters | |||
config parampersist show: |
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 don't we use param-persist? all names of your functions is param_persist
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 name is provided by PM after a long time survey.
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.
It's a bit hard to read.
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.
hard to understand the command name. prefer param-persist
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.
Yeah, I will confirm with PM whether we can update it to param-persist
.
c.positional('name', nargs='*', help='Space-separated list of parameter persistence names.') | ||
|
||
with self.argument_context('config parampersist delete') as c: | ||
c.positional('name', nargs='*', help='Space-separated list of parameter persistence names. Either positional name argument or --all can be specified.') |
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.
should we use +
to prevent no value added for the parameter?
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.
Support no value here.
c.argument('all', help='Clear all parameter persistence data. Either positional name argument or --all can be specified.', action='store_true') | ||
c.argument('yes', options_list=['--yes', '-y'], help='Do not prompt for confirmation. Only available when --all is specified.', action='store_true') | ||
c.argument('purge', help='Delete parameter persistence file from working directory. Only available when --all is specified.', action='store_true') | ||
c.argument('recursive', help='Indicates this is recursive delete of parameter persistence. Only available when --all is specified.', action='store_true') |
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.
Indicate
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.
updated.
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
Description
We have a long story in email to ask rename original
az local-context
toaz config parampersist
.This PR is to do this work, and we also add deprecate info for
az local-context
.And please note that in this PR, we only change the UE part(command name), the internal class name/ function name were not changed.
Testing Guide
az config parampersist on
az config parampersist off
az config parampersist show
az config parampersist delete resource_group_name
az local-context off
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.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.