-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[containerapp] Revert remove deprecate command az containerapp env workload-profile set
#6977
[containerapp] Revert remove deprecate command az containerapp env workload-profile set
#6977
Conversation
|
rule | cmd_name | rule_message | suggest_message |
---|---|---|---|
containerapp env workload-profile set | cmd containerapp env workload-profile set added |
Hi @Greedygre, |
Hi @Greedygre, |
containerapp |
@@ -572,6 +572,15 @@ | |||
az containerapp auth update -g myResourceGroup --name MyContainerapp --proxy-convention Standard | |||
""" | |||
|
|||
helps['containerapp env workload-profile set'] = """ | |||
type: command | |||
short-summary: Create or update an existing workload profile in a Container Apps environment |
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 you add deprecation_info here?
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.
type: command | ||
short-summary: Create or update an existing workload profile in a Container Apps environment | ||
examples: | ||
- name: Create or update an existing workload profile in a Container Apps environment |
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.
have to be existing?
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.
update an existing workload profile
, create a new one is ok too.
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.
I mean existing is not required in description
@@ -109,6 +109,9 @@ def load_command_table(self, _): | |||
with self.command_group('containerapp compose') as g: | |||
g.custom_command('create', 'create_containerapps_from_compose') | |||
|
|||
with self.command_group('containerapp env workload-profile') as g: | |||
g.custom_command('set', 'set_workload_profile', deprecate_info=g.deprecate(hide=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.
could you add redirect
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.
Can not add redirect, because set
= update
+ add
:
command set support to create a new workload profile or update an existing one.
But command add
only support add a new one, if the added name has been used, throw validate error;
command update
only support update an existing one, if not existing, throw error.
@@ -1088,6 +1088,10 @@ def create_containerapps_from_compose(cmd, # pylint: disable=R0914 | |||
return containerapps_from_compose | |||
|
|||
|
|||
def set_workload_profile(cmd, resource_group_name, env_name, workload_profile_name, workload_profile_type=None, min_nodes=None, max_nodes=None): |
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.
do we have test for the command?
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.
No
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.
Add test in test_containerapp_env_workload_profiles_e2e_no_waits
Hi @zhoxing-ms |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>
locally? (pip install azdev
required)python scripts/ci/test_index.py -q
locally? (pip install wheel==0.30.0
required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.json
automatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json
.