-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[App Service] az webapp update: Add parameter --platform-release-channel to support setting the platform release channel for the web app
#32811
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
base: dev
Are you sure you want to change the base?
Changes from all commits
d21fe97
0e38cdf
008a954
8aec6a0
8320108
ee3e224
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2153,7 +2153,8 @@ def set_webapp(cmd, resource_group_name, name, slot=None, skip_dns_registration= | |
|
|
||
|
|
||
| def update_webapp(cmd, instance, client_affinity_enabled=None, https_only=None, minimum_elastic_instance_count=None, | ||
| prewarmed_instance_count=None, end_to_end_encryption_enabled=None): | ||
| prewarmed_instance_count=None, end_to_end_encryption_enabled=None, | ||
| platform_release_channel=None): | ||
| if 'function' in instance.kind: | ||
| raise ValidationError("please use 'az functionapp update' to update this function app") | ||
| if minimum_elastic_instance_count or prewarmed_instance_count: | ||
|
|
@@ -2190,6 +2191,10 @@ def update_webapp(cmd, instance, client_affinity_enabled=None, https_only=None, | |
| if prewarmed_instance_count is not None: | ||
| instance.site_config.pre_warmed_instance_count = prewarmed_instance_count | ||
|
|
||
| if platform_release_channel is not None: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need a isLinux validation too?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As mentioned in other comment, this is for both! |
||
| use_additional_properties(instance) | ||
| instance.additional_properties["properties"]["platformReleaseChannel"] = platform_release_channel | ||
|
|
||
| return instance | ||
|
|
||
|
|
||
|
|
||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2164,6 +2164,28 @@ def test_webapp_update(self, resource_group): | |
| self.check('clientAffinityEnabled', True) | ||
| ]) | ||
|
|
||
| @AllowLargeResponse() | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let's also checkin the corresponding .yaml cassette file for this test in this PR
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| @ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP) | ||
| def test_webapp_update_platform_release_channel(self, resource_group): | ||
| webapp_name = self.create_random_name('webapp-prc-test', 40) | ||
| plan_name = self.create_random_name('webapp-prc-plan', 40) | ||
| self.cmd('appservice plan create -g {} -n {} --sku S1' | ||
| .format(resource_group, plan_name)) | ||
|
|
||
| self.cmd('webapp create -g {} -n {} --plan {}' | ||
| .format(resource_group, webapp_name, plan_name)) | ||
|
|
||
| # JMESPathCheck is not used here since platformReleaseChannel is not returned in the response of webapp show/list commands and we just want to make sure the update command goes through without any errors | ||
| # Set platform release channel to Extended | ||
| self.cmd('webapp update -g {} -n {} --platform-release-channel Extended' | ||
| .format(resource_group, webapp_name)).assert_with_checks([ | ||
| JMESPathCheck('name', webapp_name)]) | ||
|
|
||
| # Update platform release channel to Standard | ||
| self.cmd('webapp update -g {} -n {} --platform-release-channel Standard' | ||
| .format(resource_group, webapp_name)).assert_with_checks([ | ||
| JMESPathCheck('name', webapp_name)]) | ||
|
|
||
| @AllowLargeResponse() | ||
| @ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP) | ||
| def test_webapp_update_e2e_encryption(self, resource_group): | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.