Skip to content

Conversation

@Descatles
Copy link
Contributor

@Descatles Descatles commented Nov 26, 2024


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

Related command

az containerapp env java-component
Support more flexible configuration updates with new parameters --set-configurations, --replace-configurations, --remove-configurations and --remove-all-configurations

az containerapp env java-component gateway-for-spring
Support --bind, --unbind with minor update

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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.

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Nov 26, 2024

⚠️Azure CLI Extensions Breaking Change Test
⚠️containerapp
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd containerapp env java-component admin-for-spring create cmd containerapp env java-component admin-for-spring create added parameter set_configurations
⚠️ 1008 - ParaPropAdd containerapp env java-component admin-for-spring create cmd containerapp env java-component admin-for-spring create update parameter configuration: added property deprecate_info_hide=True
⚠️ 1008 - ParaPropAdd containerapp env java-component admin-for-spring create cmd containerapp env java-component admin-for-spring create update parameter configuration: added property `deprecate_info_redirect=--[set replace
⚠️ 1008 - ParaPropAdd containerapp env java-component admin-for-spring create cmd containerapp env java-component admin-for-spring create update parameter configuration: added property deprecate_info_target=--configuration
⚠️ 1006 - ParaAdd containerapp env java-component admin-for-spring update cmd containerapp env java-component admin-for-spring update added parameter remove_all_configurations
⚠️ 1006 - ParaAdd containerapp env java-component admin-for-spring update cmd containerapp env java-component admin-for-spring update added parameter remove_configurations
⚠️ 1006 - ParaAdd containerapp env java-component admin-for-spring update cmd containerapp env java-component admin-for-spring update added parameter replace_configurations
⚠️ 1006 - ParaAdd containerapp env java-component admin-for-spring update cmd containerapp env java-component admin-for-spring update added parameter set_configurations
⚠️ 1008 - ParaPropAdd containerapp env java-component admin-for-spring update cmd containerapp env java-component admin-for-spring update update parameter configuration: added property deprecate_info_hide=True
⚠️ 1008 - ParaPropAdd containerapp env java-component admin-for-spring update cmd containerapp env java-component admin-for-spring update update parameter configuration: added property `deprecate_info_redirect=--[set replace
⚠️ 1008 - ParaPropAdd containerapp env java-component admin-for-spring update cmd containerapp env java-component admin-for-spring update update parameter configuration: added property deprecate_info_target=--configuration
⚠️ 1006 - ParaAdd containerapp env java-component config-server-for-spring create cmd containerapp env java-component config-server-for-spring create added parameter set_configurations
⚠️ 1008 - ParaPropAdd containerapp env java-component config-server-for-spring create cmd containerapp env java-component config-server-for-spring create update parameter configuration: added property deprecate_info_hide=True
⚠️ 1008 - ParaPropAdd containerapp env java-component config-server-for-spring create cmd containerapp env java-component config-server-for-spring create update parameter configuration: added property `deprecate_info_redirect=--[set replace
⚠️ 1008 - ParaPropAdd containerapp env java-component config-server-for-spring create cmd containerapp env java-component config-server-for-spring create update parameter configuration: added property deprecate_info_target=--configuration
⚠️ 1006 - ParaAdd containerapp env java-component config-server-for-spring update cmd containerapp env java-component config-server-for-spring update added parameter remove_all_configurations
⚠️ 1006 - ParaAdd containerapp env java-component config-server-for-spring update cmd containerapp env java-component config-server-for-spring update added parameter remove_configurations
⚠️ 1006 - ParaAdd containerapp env java-component config-server-for-spring update cmd containerapp env java-component config-server-for-spring update added parameter replace_configurations
⚠️ 1006 - ParaAdd containerapp env java-component config-server-for-spring update cmd containerapp env java-component config-server-for-spring update added parameter set_configurations
⚠️ 1008 - ParaPropAdd containerapp env java-component config-server-for-spring update cmd containerapp env java-component config-server-for-spring update update parameter configuration: added property deprecate_info_hide=True
⚠️ 1008 - ParaPropAdd containerapp env java-component config-server-for-spring update cmd containerapp env java-component config-server-for-spring update update parameter configuration: added property `deprecate_info_redirect=--[set replace
⚠️ 1008 - ParaPropAdd containerapp env java-component config-server-for-spring update cmd containerapp env java-component config-server-for-spring update update parameter configuration: added property deprecate_info_target=--configuration
⚠️ 1006 - ParaAdd containerapp env java-component eureka-server-for-spring create cmd containerapp env java-component eureka-server-for-spring create added parameter set_configurations
⚠️ 1008 - ParaPropAdd containerapp env java-component eureka-server-for-spring create cmd containerapp env java-component eureka-server-for-spring create update parameter configuration: added property deprecate_info_hide=True
⚠️ 1008 - ParaPropAdd containerapp env java-component eureka-server-for-spring create cmd containerapp env java-component eureka-server-for-spring create update parameter configuration: added property `deprecate_info_redirect=--[set replace
⚠️ 1008 - ParaPropAdd containerapp env java-component eureka-server-for-spring create cmd containerapp env java-component eureka-server-for-spring create update parameter configuration: added property deprecate_info_target=--configuration
⚠️ 1006 - ParaAdd containerapp env java-component eureka-server-for-spring update cmd containerapp env java-component eureka-server-for-spring update added parameter remove_all_configurations
⚠️ 1006 - ParaAdd containerapp env java-component eureka-server-for-spring update cmd containerapp env java-component eureka-server-for-spring update added parameter remove_configurations
⚠️ 1006 - ParaAdd containerapp env java-component eureka-server-for-spring update cmd containerapp env java-component eureka-server-for-spring update added parameter replace_configurations
⚠️ 1006 - ParaAdd containerapp env java-component eureka-server-for-spring update cmd containerapp env java-component eureka-server-for-spring update added parameter set_configurations
⚠️ 1008 - ParaPropAdd containerapp env java-component eureka-server-for-spring update cmd containerapp env java-component eureka-server-for-spring update update parameter configuration: added property deprecate_info_hide=True
⚠️ 1008 - ParaPropAdd containerapp env java-component eureka-server-for-spring update cmd containerapp env java-component eureka-server-for-spring update update parameter configuration: added property `deprecate_info_redirect=--[set replace
⚠️ 1008 - ParaPropAdd containerapp env java-component eureka-server-for-spring update cmd containerapp env java-component eureka-server-for-spring update update parameter configuration: added property deprecate_info_target=--configuration
⚠️ 1006 - ParaAdd containerapp env java-component gateway-for-spring create cmd containerapp env java-component gateway-for-spring create added parameter service_bindings
⚠️ 1006 - ParaAdd containerapp env java-component gateway-for-spring create cmd containerapp env java-component gateway-for-spring create added parameter set_configurations
⚠️ 1006 - ParaAdd containerapp env java-component gateway-for-spring create cmd containerapp env java-component gateway-for-spring create added parameter unbind_service_bindings
⚠️ 1008 - ParaPropAdd containerapp env java-component gateway-for-spring create cmd containerapp env java-component gateway-for-spring create update parameter configuration: added property deprecate_info_hide=True
⚠️ 1008 - ParaPropAdd containerapp env java-component gateway-for-spring create cmd containerapp env java-component gateway-for-spring create update parameter configuration: added property `deprecate_info_redirect=--[set replace
⚠️ 1008 - ParaPropAdd containerapp env java-component gateway-for-spring create cmd containerapp env java-component gateway-for-spring create update parameter configuration: added property deprecate_info_target=--configuration
⚠️ 1006 - ParaAdd containerapp env java-component gateway-for-spring update cmd containerapp env java-component gateway-for-spring update added parameter remove_all_configurations
⚠️ 1006 - ParaAdd containerapp env java-component gateway-for-spring update cmd containerapp env java-component gateway-for-spring update added parameter remove_configurations
⚠️ 1006 - ParaAdd containerapp env java-component gateway-for-spring update cmd containerapp env java-component gateway-for-spring update added parameter replace_configurations
⚠️ 1006 - ParaAdd containerapp env java-component gateway-for-spring update cmd containerapp env java-component gateway-for-spring update added parameter service_bindings
⚠️ 1006 - ParaAdd containerapp env java-component gateway-for-spring update cmd containerapp env java-component gateway-for-spring update added parameter set_configurations
⚠️ 1006 - ParaAdd containerapp env java-component gateway-for-spring update cmd containerapp env java-component gateway-for-spring update added parameter unbind_service_bindings
⚠️ 1008 - ParaPropAdd containerapp env java-component gateway-for-spring update cmd containerapp env java-component gateway-for-spring update update parameter configuration: added property deprecate_info_hide=True
⚠️ 1008 - ParaPropAdd containerapp env java-component gateway-for-spring update cmd containerapp env java-component gateway-for-spring update update parameter configuration: added property `deprecate_info_redirect=--[set replace
⚠️ 1008 - ParaPropAdd containerapp env java-component gateway-for-spring update cmd containerapp env java-component gateway-for-spring update update parameter configuration: added property deprecate_info_target=--configuration
⚠️ 1006 - ParaAdd containerapp env java-component nacos create cmd containerapp env java-component nacos create added parameter set_configurations
⚠️ 1008 - ParaPropAdd containerapp env java-component nacos create cmd containerapp env java-component nacos create update parameter configuration: added property deprecate_info_hide=True
⚠️ 1008 - ParaPropAdd containerapp env java-component nacos create cmd containerapp env java-component nacos create update parameter configuration: added property `deprecate_info_redirect=--[set replace
⚠️ 1008 - ParaPropAdd containerapp env java-component nacos create cmd containerapp env java-component nacos create update parameter configuration: added property deprecate_info_target=--configuration
⚠️ 1006 - ParaAdd containerapp env java-component nacos update cmd containerapp env java-component nacos update added parameter remove_all_configurations
⚠️ 1006 - ParaAdd containerapp env java-component nacos update cmd containerapp env java-component nacos update added parameter remove_configurations
⚠️ 1006 - ParaAdd containerapp env java-component nacos update cmd containerapp env java-component nacos update added parameter replace_configurations
⚠️ 1006 - ParaAdd containerapp env java-component nacos update cmd containerapp env java-component nacos update added parameter set_configurations
⚠️ 1008 - ParaPropAdd containerapp env java-component nacos update cmd containerapp env java-component nacos update update parameter configuration: added property deprecate_info_hide=True
⚠️ 1008 - ParaPropAdd containerapp env java-component nacos update cmd containerapp env java-component nacos update update parameter configuration: added property `deprecate_info_redirect=--[set replace
⚠️ 1008 - ParaPropAdd containerapp env java-component nacos update cmd containerapp env java-component nacos update update parameter configuration: added property deprecate_info_target=--configuration
⚠️ 1006 - ParaAdd containerapp env java-component spring-cloud-config create cmd containerapp env java-component spring-cloud-config create added parameter set_configurations
⚠️ 1008 - ParaPropAdd containerapp env java-component spring-cloud-config create cmd containerapp env java-component spring-cloud-config create update parameter configuration: added property deprecate_info_hide=True
⚠️ 1008 - ParaPropAdd containerapp env java-component spring-cloud-config create cmd containerapp env java-component spring-cloud-config create update parameter configuration: added property `deprecate_info_redirect=--[set replace
⚠️ 1008 - ParaPropAdd containerapp env java-component spring-cloud-config create cmd containerapp env java-component spring-cloud-config create update parameter configuration: added property deprecate_info_target=--configuration
⚠️ 1006 - ParaAdd containerapp env java-component spring-cloud-config update cmd containerapp env java-component spring-cloud-config update added parameter remove_all_configurations
⚠️ 1006 - ParaAdd containerapp env java-component spring-cloud-config update cmd containerapp env java-component spring-cloud-config update added parameter remove_configurations
⚠️ 1006 - ParaAdd containerapp env java-component spring-cloud-config update cmd containerapp env java-component spring-cloud-config update added parameter replace_configurations
⚠️ 1006 - ParaAdd containerapp env java-component spring-cloud-config update cmd containerapp env java-component spring-cloud-config update added parameter set_configurations
⚠️ 1008 - ParaPropAdd containerapp env java-component spring-cloud-config update cmd containerapp env java-component spring-cloud-config update update parameter configuration: added property deprecate_info_hide=True
⚠️ 1008 - ParaPropAdd containerapp env java-component spring-cloud-config update cmd containerapp env java-component spring-cloud-config update update parameter configuration: added property `deprecate_info_redirect=--[set replace
⚠️ 1008 - ParaPropAdd containerapp env java-component spring-cloud-config update cmd containerapp env java-component spring-cloud-config update update parameter configuration: added property deprecate_info_target=--configuration
⚠️ 1006 - ParaAdd containerapp env java-component spring-cloud-eureka create cmd containerapp env java-component spring-cloud-eureka create added parameter set_configurations
⚠️ 1008 - ParaPropAdd containerapp env java-component spring-cloud-eureka create cmd containerapp env java-component spring-cloud-eureka create update parameter configuration: added property deprecate_info_hide=True
⚠️ 1008 - ParaPropAdd containerapp env java-component spring-cloud-eureka create cmd containerapp env java-component spring-cloud-eureka create update parameter configuration: added property `deprecate_info_redirect=--[set replace
⚠️ 1008 - ParaPropAdd containerapp env java-component spring-cloud-eureka create cmd containerapp env java-component spring-cloud-eureka create update parameter configuration: added property deprecate_info_target=--configuration
⚠️ 1006 - ParaAdd containerapp env java-component spring-cloud-eureka update cmd containerapp env java-component spring-cloud-eureka update added parameter remove_all_configurations
⚠️ 1006 - ParaAdd containerapp env java-component spring-cloud-eureka update cmd containerapp env java-component spring-cloud-eureka update added parameter remove_configurations
⚠️ 1006 - ParaAdd containerapp env java-component spring-cloud-eureka update cmd containerapp env java-component spring-cloud-eureka update added parameter replace_configurations
⚠️ 1006 - ParaAdd containerapp env java-component spring-cloud-eureka update cmd containerapp env java-component spring-cloud-eureka update added parameter set_configurations
⚠️ 1008 - ParaPropAdd containerapp env java-component spring-cloud-eureka update cmd containerapp env java-component spring-cloud-eureka update update parameter configuration: added property deprecate_info_hide=True
⚠️ 1008 - ParaPropAdd containerapp env java-component spring-cloud-eureka update cmd containerapp env java-component spring-cloud-eureka update update parameter configuration: added property `deprecate_info_redirect=--[set replace
⚠️ 1008 - ParaPropAdd containerapp env java-component spring-cloud-eureka update cmd containerapp env java-component spring-cloud-eureka update update parameter configuration: added property deprecate_info_target=--configuration

@azure-client-tools-bot-prd
Copy link

Hi @Descatles,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@azure-client-tools-bot-prd
Copy link

Hi @Descatles,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@yonzhan
Copy link
Collaborator

yonzhan commented Nov 26, 2024

containerapp

@Descatles Descatles changed the title Support new configuration parameters on java component {Container app} Support new configuration parameters on java component Nov 27, 2024
c.argument('unbind_service_bindings', nargs='*', options_list=['--unbind'], help="Space separated list of services, bindings or Java components to be removed from this Java Component. e.g. BIND_NAME1...")
c.argument('configuration', nargs="*", help="Java component configuration. Configuration must be in format \"<propertyName>=<value>\" \"<propertyName>=<value>\"...")
c.argument('configuration', nargs="*", help="Java component configuration. Configuration must be in format \"<propertyName>=<value>\" \"<propertyName>=<value>\"...", deprecate_info=c.deprecate(target="--configuration"))
c.argument('set_configurations', nargs="*", options_list=['--set-configurations', '--set-configs'], help="Add or update Java component configuration(s). Configurations must be in format \"<propertyName>=<value>\" \"<propertyName>=<value>\"...")
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed that the env_vars help text for set is --set-env-vars : Add or update environment variable(s) in container. Existing environment variables are not modified.

Can we add one more similar line: Other existing configurations are not modified ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, updated this message

c.argument('service_bindings', nargs='*', options_list=['--bind'], help="Space separated list of services, bindings or other Java components to be connected to this Java Component. e.g. SVC_NAME1[:BIND_NAME1] SVC_NAME2[:BIND_NAME2]...")
c.argument('unbind_service_bindings', nargs='*', options_list=['--unbind'], help="Space separated list of services, bindings or Java components to be removed from this Java Component. e.g. BIND_NAME1...")
c.argument('configuration', nargs="*", help="Java component configuration. Configuration must be in format \"<propertyName>=<value>\" \"<propertyName>=<value>\"...")
c.argument('configuration', nargs="*", help="Java component configuration. Configuration must be in format \"<propertyName>=<value>\" \"<propertyName>=<value>\"...", deprecate_info=c.deprecate(target="--configuration"))
Copy link
Member

@allxiao allxiao Nov 28, 2024

Choose a reason for hiding this comment

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

Suggest to add redirect="--[set|replace|remove|remove-all]-configurations", and probably hide=True

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure. added


def validate_configurations(self):
if self.set_configuration_with_legacy_way() and self.set_configuration_with_new_way():
raise ValidationError("--configuration could not be specify alongside any of the following options: --set-configurations, --replace-configurations, --remove-configurations, or --remove-all-configurations. Use either --configuration alone or other mentioned parameters as needed.")
Copy link
Member

Choose a reason for hiding this comment

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

Maybe better to say use --[set|replace|remove|remove-all]-configurations. No need to hint for deprecated usage.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I have updated the message to The --configuration option cannot be used together with --[set|replace|remove|remove-all]-configurations. Please use --[set|replace|remove|remove-all]-configurations for better flexibility and clarity.

if existing_configuration["propertyName"].lower() == new_configuration["propertyName"].lower():
is_existing = True

if "value" in new_configuration:
Copy link
Member

@allxiao allxiao Nov 28, 2024

Choose a reason for hiding this comment

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

Given that we will always set the new configuration. Shall we check the presence of ["value"] to the outer for loop as a validation? I presume if this results in add, we still need to ensure that ["value"] is present.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's better to put the check out the loop. thanks!

if existing_configuration["propertyName"].lower() == remove_configuration.lower():
is_existing = True
existing_configurations.pop(i)
break
Copy link
Member

Choose a reason for hiding this comment

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

Are there cases that the existing configuration has duplicate property names?

Copy link
Contributor Author

@Descatles Descatles Nov 28, 2024

Choose a reason for hiding this comment

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

Good point, I updated the parse configurations function to ensure there will be no duplicate property names passed and also delete the break to avoid duplicate from other ways like portal

def set_up_replace_configurations(self):
if self.get_argument_replace_configurations() is not None:
configuration_list = self.parse_configurations(self.get_argument_replace_configurations())
self.java_component_def["properties"]["configurations"] = []
Copy link
Member

Choose a reason for hiding this comment

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

just set it to configuration_list and skip the next method call?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool, that's better, updated

self.set_up_unbind_service_bindings()
self.set_up_gateway_route()
self.set_up_replicas()
self.validate_configurations()
Copy link
Member

Choose a reason for hiding this comment

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

We only checked that old style configuration settings cannot be specified together with the new style ones. What if the customer specify both set and replace (and possibly other combinations)? Can we check and align the ACA --xxx-env-vars behavior?

My gut feeling is that we should only allow the following combination and reject all other cases:

  • set + remove

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the ACA code, the four parameters can be used together, with operations executed in the following sequence: set, replace, remove, and remove-all. For example, replace will override all configurations specified by set, and remove-all could also remove all configurations specified by replace

-n MyJavaComponentName \\
--environment MyEnvironment \\
--configuration
--remove-all-configurations
Copy link
Contributor

Choose a reason for hiding this comment

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

we'd better add some examples about how to use --remove-configurations

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, examples added

-n MyJavaComponentName \\
--environment MyEnvironment \\
--configuration PropertyName1=Value1 PropertyName2=Value2
--set-configurations PropertyName1=Value1 PropertyName2=Value2
Copy link
Contributor

@ShichaoQiu ShichaoQiu Dec 17, 2024

Choose a reason for hiding this comment

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

Should we add some examples for this parameter --replace-configurations to describe how to use it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, examples added

@Descatles Descatles changed the title [Container app] Support new configuration parameters on java component [Container app] az containerapp env java-component: Support new configuration parameters on java component Jan 7, 2025
@Greedygre
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Comment on lines +1377 to +1382
- name: Delete all configurations of the Config Server for Spring.
text: |
az containerapp env java-component config-server-for-spring update -g MyResourceGroup \\
-n MyJavaComponentName \\
--environment MyEnvironment \\
--remove-all-configurations
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this is dup with line 1355-1358?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dup removed

@github-actions
Copy link

github-actions bot commented Jan 7, 2025

Hi @Descatles

Release Suggestions

Module: containerapp

  • Update VERSION to 1.1.0b2 in src/containerapp/setup.py

Notes

Comment on lines +1520 to +1525
- name: Delete all configurations of the Eureka Server for Spring.
text: |
az containerapp env java-component eureka-server-for-spring update -g MyResourceGroup \\
-n MyJavaComponentName \\
--environment MyEnvironment \\
--remove-all-configurations
Copy link
Contributor

@Greedygre Greedygre Jan 7, 2025

Choose a reason for hiding this comment

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

dup with line 1498-1501?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dup removed

Comment on lines 1606 to 1611
- name: Delete all configurations of the Admin for Spring.
text: |
az containerapp env java-component admin-for-spring update -g MyResourceGroup \\
-n MyJavaComponentName \\
--environment MyEnvironment \\
--remove-all-configurations
Copy link
Contributor

Choose a reason for hiding this comment

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

dup?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dup removed

Comment on lines +1686 to +1691
- name: Delete all configurations of the nacos.
text: |
az containerapp env java-component nacos update -g MyResourceGroup \\
-n MyJavaComponentName \\
--environment MyEnvironment \\
--remove-all-configurations
Copy link
Contributor

Choose a reason for hiding this comment

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

dup?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dup removed

Comment on lines +371 to +372
c.argument('remove_configurations', nargs="*", options_list=['--remove-configurations', '--remove-configs'], help="Remove Java component configuration(s). Specify configuration names separated by space, in format `<propertyName>` `<propertyName>`...")
c.argument('remove_all_configurations', arg_type=get_three_state_flag(), options_list=['--remove-all-configurations', '--remove-all-configs'], help="Remove all Java component configuration(s).")
Copy link
Contributor

@zhoxing-ms zhoxing-ms Jan 7, 2025

Choose a reason for hiding this comment

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

remove_configurations
remove_all_configurations

Because these two parameters are similar, can they be merged into one parameter? For example, when --remove-configurations does not specify a specific value, the all the configurations are deleted

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since az containerapp includes parameters like [--remove-all-env-vars] and [--remove-env-vars], I think we should align with that.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, got it~

@Greedygre
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@zhoxing-ms
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@zhoxing-ms zhoxing-ms merged commit 0001e2a into Azure:main Jan 13, 2025
19 of 20 checks passed
Jenniferyingni pushed a commit to Jenniferyingni/azure-cli-extensions that referenced this pull request Feb 9, 2025
…guration parameters on java component (Azure#8320)

* Support new configuration parameters on java component

* Add test file

* Add recording

* remove cred

* test fix

* test fix

* Fix lint

* convert recording

* Fix

* Update recording

* udpate recording

* Update

* resolve comments

* format update

* Update

* Update

* Add --bind --unbind in gateway create/update

* Fix error help message

* Update according to comments

* Update according to comments

* fix typo

* Update

* Add examples

* Remove duplicated examples

---------

Co-authored-by: Wenhao Zhang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants