-
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
Add Maintenance Config Support #8190
base: main
Are you sure you want to change the base?
Conversation
|
rule | cmd_name | rule_message | suggest_message |
---|---|---|---|
containerapp env maintenance-config | sub group containerapp env maintenance-config added |
Hi @p-bouchon, |
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 @p-bouchon Release SuggestionsModule: containerapp
Notes
|
src/containerapp/azext_containerapp/containerapp_maintenanceconfig_decorator.py
Outdated
Show resolved
Hide resolved
src/containerapp/azext_containerapp/tests/latest/test_containerapp_maintenance_config.py
Outdated
Show resolved
Hide resolved
src/containerapp/azext_containerapp/containerapp_maintenanceconfig_decorator.py
Outdated
Show resolved
Hide resolved
@@ -8,6 +8,7 @@ upcoming | |||
* 'az containerapp containerapp create/up': `--registry-server` and `--source` use managed identity for image pull by default | |||
* 'az containerapp containerapp create': `--registry-server` use managed identity for image pull by default. `--no-wait` will not take effect with system registry identity. | |||
* 'az containerapp env java-component gateway-for-spring': Support create/update/show/delete Gateway for spring. | |||
* 'az containerapp env maintenance-config': Support Add, Update, Show, Delete |
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.
|
||
if no_wait: | ||
return r.json() | ||
elif r.status_code == 201: |
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.
JFYI - There is no impact. PUT
for this resource only returns 200. Refer https://dev.azure.com/msazure/One/_git/AAPT-Antares-Containerapps?path=/src/Microsoft.ContainerApps/Microsoft.ContainerApps.WebApi/Controllers/Version20241002preview/MaintenanceConfigurationApiController.cs&version=GBmain&line=77&lineEnd=77&lineStartColumn=132&lineEndColumn=143&lineStyle=plain&_a=contents
|
||
if no_wait: | ||
return # API doesn't return JSON (it returns no content) | ||
elif r.status_code in [200, 201, 202, 204]: |
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.
201 polling is not handled and also invalid for delete operations. Refer https://github.com/cloud-and-ai-microsoft/resource-provider-contract/blob/master/v1.0/async-api-reference.md#delete-resource-asynchronously
For this api, we only return 200. Still future proofing is good.
# Maintenance Config Commands | ||
helps['containerapp env maintenance-config add'] = """ | ||
type: command | ||
short-summary: Add a Maintenance Configuration to a Container App 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.
May need to update description based PM final decision. Example:
short-summary: Add a Maintenance Configuration to a Container App Environment | |
short-summary: Add a Scheduled Maintenance to a Container App Environment |
type: command | ||
short-summary: Add a Maintenance Configuration to a Container App Environment | ||
examples: | ||
- name: Configure an Env to use a maintenance config |
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.
nit: To have full name for descriptions. PM can contribute here
- name: Configure an Env to use a maintenance config | |
- name: Configure a Container App Environment to use a maintenance configuration |
with self.argument_context('containerapp env maintenance-config') as c: | ||
c.argument('weekday', options_list=['--weekday', '-w'], arg_type=get_enum_type(["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ]), help="The weekday to schedule the maintenance configuration.") | ||
c.argument('start_hour_utc', options_list=['--start-hour-utc', '-s'], help="The hour to start the maintenance configuration.") | ||
c.argument('duration', options_list=['--duration', '-d'], help="The duration in hours of the maintenance configuration.") |
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.
Since, you have it in validation
c.argument('duration', options_list=['--duration', '-d'], help="The duration in hours of the maintenance configuration.") | |
c.argument('duration', options_list=['--duration', '-d'], help="The duration in hours of the maintenance configuration. Minimum value: 8") |
@@ -370,6 +370,11 @@ def load_arguments(self, _): | |||
c.argument('max_replicas', type=int, help="Maximum number of replicas to run for the Java component.") | |||
c.argument('route_yaml', options_list=['--route-yaml', '--yaml'], help="Path to a .yaml file with the configuration of a Spring Cloud Gateway route. For an example, see https://aka.ms/gateway-for-spring-routes-yaml") | |||
|
|||
with self.argument_context('containerapp env maintenance-config') as c: | |||
c.argument('weekday', options_list=['--weekday', '-w'], arg_type=get_enum_type(["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" ]), help="The weekday to schedule the maintenance configuration.") | |||
c.argument('start_hour_utc', options_list=['--start-hour-utc', '-s'], help="The hour to start the maintenance configuration.") |
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.
c.argument('start_hour_utc', options_list=['--start-hour-utc', '-s'], help="The hour to start the maintenance configuration.") | |
c.argument('start_hour_utc', options_list=['--start-hour-utc', '-s'], help="The hour to start the maintenance configuration. Valid value from 0 to 23") |
@@ -8,6 +8,7 @@ upcoming | |||
* 'az containerapp containerapp create/up': `--registry-server` and `--source` use managed identity for image pull by default | |||
* 'az containerapp containerapp create': `--registry-server` use managed identity for image pull by default. `--no-wait` will not take effect with system registry identity. | |||
* 'az containerapp env java-component gateway-for-spring': Support create/update/show/delete Gateway for spring. | |||
* 'az containerapp env maintenance-config': Support Add, Update, Show, Delete |
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.
version 1.0.0b4
has been released, please sync main branch and move the description to upcoming
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
.