-
Notifications
You must be signed in to change notification settings - Fork 1.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
[containerapp] Add new commands for httprouteconfig #8302
base: main
Are you sure you want to change the base?
Conversation
|
rule | cmd_name | rule_message | suggest_message |
---|---|---|---|
containerapp env http-route-config | sub group containerapp env http-route-config added |
Hi @Tratcher, |
Thank you for your contribution! We will review the pull request and get back to you soon. |
CodeGen Tools Feedback CollectionThank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey |
Hi @Tratcher Release SuggestionsModule: containerapp
Notes
|
Can you add a test? This was for maintenance config which was also env level resource similar to Line 30 in 207cad1
list: Line 45 in 207cad1
update: Line 55 in 207cad1
delete: Line 69 in 207cad1
|
4e0cb22
to
08585df
Compare
I created a PR to fix the CI: #8340 |
src/containerapp/azext_containerapp/tests/latest/test_containerapp_env_httprouteconfig.py
Outdated
Show resolved
Hide resolved
src/containerapp/azext_containerapp/tests/latest/httprouteconfig1.yaml
Outdated
Show resolved
Hide resolved
yaml_httprouteconfig = load_yaml_file(yaml) | ||
# check if the type is dict | ||
if not isinstance(yaml_httprouteconfig, dict): | ||
raise ValidationError('Invalid YAML provided. Please see https://aka.ms/azure-container-apps-yaml for a valid YAML spec.') |
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.
Seems this link doesn't contains the YAML example for httprouteconfig, right?
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.
Correct, the example hasn't been written yet. This link gets you to the docs where the example should be when it's ready.
with self.argument_context('containerapp env http-route-config show') as c: | ||
c.argument('http_route_config_name', options_list=['--http-route-config-name', '-r'], help="The name of the http route configuration.") | ||
|
||
with self.argument_context('containerapp env http-route-config delete') as c: | ||
c.argument('http_route_config_name', options_list=['--http-route-config-name', '-r'], help="The name of the http route configuration.") | ||
|
||
with self.argument_context('containerapp env http-route-config create') as c: | ||
c.argument('http_route_config_name', options_list=['--http-route-config-name', '-r'], help="The name of the http route configuration.") | ||
c.argument('yaml', help="The path to the YAML input file.") | ||
|
||
with self.argument_context('containerapp env http-route-config update') as c: | ||
c.argument('http_route_config_name', options_list=['--http-route-config-name', '-r'], help="The name of the http route configuration.") | ||
c.argument('yaml', help="The path to the YAML input file.") |
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.
We can set the params duplicate arguments that will be used in multiple commands to the parent command group, for example:
tips: You can test with [command] --help
, the behavior is the same.
with self.argument_context('containerapp env http-route-config show') as c: | |
c.argument('http_route_config_name', options_list=['--http-route-config-name', '-r'], help="The name of the http route configuration.") | |
with self.argument_context('containerapp env http-route-config delete') as c: | |
c.argument('http_route_config_name', options_list=['--http-route-config-name', '-r'], help="The name of the http route configuration.") | |
with self.argument_context('containerapp env http-route-config create') as c: | |
c.argument('http_route_config_name', options_list=['--http-route-config-name', '-r'], help="The name of the http route configuration.") | |
c.argument('yaml', help="The path to the YAML input file.") | |
with self.argument_context('containerapp env http-route-config update') as c: | |
c.argument('http_route_config_name', options_list=['--http-route-config-name', '-r'], help="The name of the http route configuration.") | |
c.argument('yaml', help="The path to the YAML input file.") | |
with self.argument_context('containerapp env http-route-config') as c: | |
c.argument('http_route_config_name', options_list=['--http-route-config-name', '-r'], help="The name of the http route configuration.") | |
c.argument('yaml', help="The path to the YAML input file.") |
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
🚫All pull requests will be blocked to merge until Jan 6, 2025 due to CCOA |
This adds list/create/update/show/delete commands for the new httprouteconfig feature area. For now create/update uses YAML input because the object model is quite complex. We may add more granular input in the future.
Related command
az containerapp env httprouteconfig
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)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
.