Skip to content

Conversation

@madsd
Copy link
Contributor

@madsd madsd commented Feb 17, 2025

Related command

az webapp deployment slot create

Description

Fix issue: #26920
When using the az webapp deployment slot create command to create a new slot, the new slot does not inherit the VNet integration settings from the source slot.
However, when creating a new slot using the azure portal, the new slot has the same VNet integration settings as the source slot
So this PR is to make the created new slot has the same VNet integration settings as the source slot to keep consistent with Portal behavior

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


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

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

azure-client-tools-bot-prd bot commented Feb 17, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️acs
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.9
️✔️ams
️✔️latest
️✔️3.12
️✔️3.9
️✔️apim
️✔️latest
️✔️3.12
️✔️3.9
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.9
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️aro
️✔️latest
️✔️3.12
️✔️3.9
️✔️backup
️✔️latest
️✔️3.12
️✔️3.9
️✔️batch
️✔️latest
️✔️3.12
️✔️3.9
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.9
️✔️billing
️✔️latest
️✔️3.12
️✔️3.9
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.9
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.9
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.9
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.9
️✔️config
️✔️latest
️✔️3.12
️✔️3.9
️✔️configure
️✔️latest
️✔️3.12
️✔️3.9
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.9
️✔️container
️✔️latest
️✔️3.12
️✔️3.9
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.9
️✔️core
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.9
️✔️databoxedge
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️dls
️✔️latest
️✔️3.12
️✔️3.9
️✔️dms
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.9
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.9
️✔️find
️✔️latest
️✔️3.12
️✔️3.9
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.9
️✔️identity
️✔️latest
️✔️3.12
️✔️3.9
️✔️iot
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️keyvault
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️lab
️✔️latest
️✔️3.12
️✔️3.9
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️maps
️✔️latest
️✔️3.12
️✔️3.9
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.9
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.9
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.9
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.9
️✔️network
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.9
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.9
️✔️profile
️✔️latest
️✔️3.12
️✔️3.9
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.9
️✔️redis
️✔️latest
️✔️3.12
️✔️3.9
️✔️relay
️✔️latest
️✔️3.12
️✔️3.9
️✔️resource
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️role
️✔️latest
️✔️3.12
️✔️3.9
️✔️search
️✔️latest
️✔️3.12
️✔️3.9
️✔️security
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.9
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.9
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.9
️✔️sql
️✔️latest
️✔️3.12
️✔️3.9
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.9
️✔️storage
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.9
️✔️telemetry
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9
️✔️util
️✔️latest
️✔️3.12
️✔️3.9
️✔️vm
️✔️2018-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2019-03-01-hybrid
️✔️3.12
️✔️3.9
️✔️2020-09-01-hybrid
️✔️3.12
️✔️3.9
️✔️latest
️✔️3.12
️✔️3.9

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

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

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

azure-client-tools-bot-prd bot commented Feb 17, 2025

️✔️AzureCLI-BreakingChangeTest
️✔️Non Breaking Changes

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 17, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@madsd madsd changed the title App Service clone from prod - Fix #26920 [App Service] az webapp deployment slotcreate clone from prod - Fix #26920 Feb 17, 2025
@madsd madsd changed the title [App Service] az webapp deployment slotcreate clone from prod - Fix #26920 [App Service] az webapp deployment slot create clone from prod - Fix #26920 Feb 17, 2025
@madsd madsd changed the title [App Service] az webapp deployment slot create clone from prod - Fix #26920 [App Service] az webapp deployment slot create Fix #26920 (clone from prod) Feb 17, 2025
@seligj95
Copy link
Contributor

Fixes: #26920

@zhoxing-ms zhoxing-ms changed the title [App Service] az webapp deployment slot create Fix #26920 (clone from prod) [App Service] Fix #26920: az webapp deployment slot create: make the command consistent with the portal behavior Mar 24, 2025
@zhoxing-ms zhoxing-ms changed the title [App Service] Fix #26920: az webapp deployment slot create: make the command consistent with the portal behavior [App Service] Fix #26920: az webapp deployment slot create: Make the command consistent with the portal behavior Mar 24, 2025
@zhoxing-ms zhoxing-ms merged commit 9b32f8e into Azure:dev Mar 24, 2025
53 checks passed
@jiasli
Copy link
Member

jiasli commented Mar 24, 2025

This PR causes CI failure:

https://dev.azure.com/azclitools/public/_build/results?buildId=229829&view=logs&j=3791f883-8843-5e94-fc79-c8ca993c0a42&t=fc099b28-42bc-5603-6ee8-d61b88ef47c8

CI logs
2025-03-24T09:43:09.8013771Z ________________ WebappSlotScenarioTest.test_webapp_slot_clone _________________
2025-03-24T09:43:09.8014170Z self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f15998f4680>
2025-03-24T09:43:09.8014525Z cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f159a614fb0>
2025-03-24T09:43:09.8014913Z command = 'webapp create -g clitest.rg000001 -n slot-test-web000003 --plan slot-test-plan000002'
2025-03-24T09:43:09.8015239Z expect_failure = False
2025-03-24T09:43:09.8015340Z 
2025-03-24T09:43:09.8015648Z     def _in_process_execute(self, cli_ctx, command, expect_failure=False):
2025-03-24T09:43:09.8015970Z         from io import StringIO
2025-03-24T09:43:09.8016297Z         from vcr.errors import CannotOverwriteExistingCassetteException
2025-03-24T09:43:09.8016591Z     
2025-03-24T09:43:09.8016822Z         if command.startswith('az '):
2025-03-24T09:43:09.8017081Z             command = command[3:]
2025-03-24T09:43:09.8017300Z     
2025-03-24T09:43:09.8017527Z         stdout_buf = StringIO()
2025-03-24T09:43:09.8017784Z         logging_buf = StringIO()
2025-03-24T09:43:09.8018006Z         try:
2025-03-24T09:43:09.8018312Z             # issue: stderr cannot be redirect in this form, as a result some failure information
2025-03-24T09:43:09.8018645Z             # is lost when command fails.
2025-03-24T09:43:09.8018980Z >           self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
2025-03-24T09:43:09.8019172Z 
2025-03-24T09:43:09.8019453Z src/azure-cli-testsdk/azure/cli/testsdk/base.py:302: 
2025-03-24T09:43:09.8019778Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2025-03-24T09:43:09.8020111Z env/lib/python3.12/site-packages/knack/cli.py:245: in invoke
2025-03-24T09:43:09.8020440Z     exit_code = self.exception_handler(ex)
2025-03-24T09:43:09.8020783Z src/azure-cli-core/azure/cli/core/__init__.py:129: in exception_handler
2025-03-24T09:43:09.8023139Z     return handle_exception(ex)
2025-03-24T09:43:09.8023692Z src/azure-cli-testsdk/azure/cli/testsdk/patches.py:33: in _handle_main_exception
2025-03-24T09:43:09.8024000Z     raise ex
2025-03-24T09:43:09.8024302Z env/lib/python3.12/site-packages/knack/cli.py:233: in invoke
2025-03-24T09:43:09.8024657Z     cmd_result = self.invocation.execute(args)
2025-03-24T09:43:09.8025028Z src/azure-cli-core/azure/cli/core/commands/__init__.py:666: in execute
2025-03-24T09:43:09.8025450Z     raise ex
2025-03-24T09:43:09.8025797Z src/azure-cli-core/azure/cli/core/commands/__init__.py:734: in _run_jobs_serially
2025-03-24T09:43:09.8026189Z     results.append(self._run_job(expanded_arg, cmd_copy))
2025-03-24T09:43:09.8026596Z src/azure-cli-core/azure/cli/core/commands/__init__.py:726: in _run_job
2025-03-24T09:43:09.8026978Z     return cmd_copy.exception_handler(ex)
2025-03-24T09:43:09.8027382Z src/azure-cli/azure/cli/command_modules/appservice/commands.py:46: in _ex_handler
2025-03-24T09:43:09.8027741Z     raise ex
2025-03-24T09:43:09.8028096Z src/azure-cli-core/azure/cli/core/commands/__init__.py:703: in _run_job
2025-03-24T09:43:09.8028477Z     result = cmd_copy(params)
2025-03-24T09:43:09.8028806Z src/azure-cli-core/azure/cli/core/commands/__init__.py:336: in __call__
2025-03-24T09:43:09.8029134Z     return self.handler(*args, **kwargs)
2025-03-24T09:43:09.8029485Z src/azure-cli-core/azure/cli/core/commands/command_operation.py:120: in handler
2025-03-24T09:43:09.8029877Z     return op(**command_args)
2025-03-24T09:43:09.8030258Z src/azure-cli/azure/cli/command_modules/appservice/custom.py:169: in create_webapp
2025-03-24T09:43:09.8030630Z     name_validation = get_site_availability(cmd, name)
2025-03-24T09:43:09.8031042Z src/azure-cli/azure/cli/command_modules/appservice/_create_util.py:327: in get_site_availability
2025-03-24T09:43:09.8031508Z     availability = client.check_name_availability(name, 'Site')
2025-03-24T09:43:09.8031989Z env/lib/python3.12/site-packages/azure/mgmt/web/_operations_mixin.py:92: in check_name_availability
2025-03-24T09:43:09.8032529Z     return mixin_instance.check_name_availability(name, type, is_fqdn, environment_id, **kwargs)
2025-03-24T09:43:09.8033198Z env/lib/python3.12/site-packages/azure/core/tracing/decorator.py:94: in wrapper_use_tracer
2025-03-24T09:43:09.8033611Z     return func(*args, **kwargs)
2025-03-24T09:43:09.8034084Z env/lib/python3.12/site-packages/azure/mgmt/web/v2023_12_01/operations/_web_site_management_client_operations.py:1121: in check_name_availability
2025-03-24T09:43:09.8034692Z     pipeline_response: PipelineResponse = self._client._pipeline.run(  # pylint: disable=protected-access
2025-03-24T09:43:09.8035130Z env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:229: in run
2025-03-24T09:43:09.8035626Z     return first_node.send(pipeline_request)
2025-03-24T09:43:09.8036044Z env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:86: in send
2025-03-24T09:43:09.8036436Z     response = self.next.send(request)
2025-03-24T09:43:09.8036799Z env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:86: in send
2025-03-24T09:43:09.8037139Z     response = self.next.send(request)
2025-03-24T09:43:09.8037472Z env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:86: in send
2025-03-24T09:43:09.8037761Z     response = self.next.send(request)
2025-03-24T09:43:09.8038052Z env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:86: in send
2025-03-24T09:43:09.8038392Z     response = self.next.send(request)
2025-03-24T09:43:09.8038765Z env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:86: in send
2025-03-24T09:43:09.8047055Z     response = self.next.send(request)
2025-03-24T09:43:09.8047538Z env/lib/python3.12/site-packages/azure/mgmt/core/policies/_base.py:47: in send
2025-03-24T09:43:09.8047941Z     response = self.next.send(request)
2025-03-24T09:43:09.8048311Z env/lib/python3.12/site-packages/azure/core/pipeline/policies/_redirect.py:197: in send
2025-03-24T09:43:09.8048656Z     response = self.next.send(request)
2025-03-24T09:43:09.8049442Z env/lib/python3.12/site-packages/azure/core/pipeline/policies/_retry.py:532: in send
2025-03-24T09:43:09.8050431Z     response = self.next.send(request)
2025-03-24T09:43:09.8062479Z env/lib/python3.12/site-packages/azure/core/pipeline/policies/_authentication.py:147: in send
2025-03-24T09:43:09.8063122Z     response = self.next.send(request)
2025-03-24T09:43:09.8063591Z env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:86: in send
2025-03-24T09:43:09.8064278Z     response = self.next.send(request)
2025-03-24T09:43:09.8064734Z env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:86: in send
2025-03-24T09:43:09.8065181Z     response = self.next.send(request)
2025-03-24T09:43:09.8065638Z env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:86: in send
2025-03-24T09:43:09.8066091Z     response = self.next.send(request)
2025-03-24T09:43:09.8066547Z env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:86: in send
2025-03-24T09:43:09.8066999Z     response = self.next.send(request)
2025-03-24T09:43:09.8067458Z env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:86: in send
2025-03-24T09:43:09.8067923Z     response = self.next.send(request)
2025-03-24T09:43:09.8068348Z env/lib/python3.12/site-packages/azure/core/pipeline/_base.py:118: in send
2025-03-24T09:43:09.8068783Z     self._sender.send(request.http_request, **request.context.options),
2025-03-24T09:43:09.8069260Z env/lib/python3.12/site-packages/azure/core/pipeline/transport/_requests_basic.py:355: in send
2025-03-24T09:43:09.8069770Z     response = self.session.request(  # type: ignore
2025-03-24T09:43:09.8070160Z env/lib/python3.12/site-packages/requests/sessions.py:589: in request
2025-03-24T09:43:09.8070602Z     resp = self.send(prep, **send_kwargs)
2025-03-24T09:43:09.8070975Z env/lib/python3.12/site-packages/requests/sessions.py:703: in send
2025-03-24T09:43:09.8071358Z     r = adapter.send(request, **kwargs)
2025-03-24T09:43:09.8071729Z env/lib/python3.12/site-packages/requests/adapters.py:667: in send
2025-03-24T09:43:09.8072104Z     resp = conn.urlopen(
2025-03-24T09:43:09.8072500Z env/lib/python3.12/site-packages/urllib3/connectionpool.py:715: in urlopen
2025-03-24T09:43:09.8073023Z     httplib_response = self._make_request(
2025-03-24T09:43:09.8073438Z env/lib/python3.12/site-packages/urllib3/connectionpool.py:458: in _make_request
2025-03-24T09:43:09.8073881Z     httplib_response = conn.getresponse(buffering=True)
2025-03-24T09:43:09.8074284Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2025-03-24T09:43:09.8074450Z 
2025-03-24T09:43:09.8074904Z self = <vcr.patch.VCRRequestsHTTPSConnection/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_slot_clone.yaml object at 0x7f159960f9b0>
2025-03-24T09:43:09.8075462Z _ = False, kwargs = {'buffering': True}
2025-03-24T09:43:09.8075585Z 
2025-03-24T09:43:09.8075887Z     def getresponse(self, _=False, **kwargs):
2025-03-24T09:43:09.8076194Z         """Retrieve the response"""
2025-03-24T09:43:09.8076538Z         # Check to see if the cassette has a response for this request. If so,
2025-03-24T09:43:09.8076917Z         # then return it
2025-03-24T09:43:09.8077273Z         if self.cassette.can_play_response_for(self._vcr_request):
2025-03-24T09:43:09.8077681Z             log.info(f"Playing response for {self._vcr_request} from cassette")
2025-03-24T09:43:09.8078066Z             response = self.cassette.play_response(self._vcr_request)
2025-03-24T09:43:09.8078500Z             return VCRHTTPResponse(response)
2025-03-24T09:43:09.8078790Z         else:
2025-03-24T09:43:09.8079194Z             if self.cassette.write_protected and self.cassette.filter_request(self._vcr_request):
2025-03-24T09:43:09.8079604Z >               raise CannotOverwriteExistingCassetteException(
2025-03-24T09:43:09.8079938Z                     cassette=self.cassette,
2025-03-24T09:43:09.8080243Z                     failed_request=self._vcr_request,
2025-03-24T09:43:09.8080573Z                 )
2025-03-24T09:43:09.8081135Z E               vcr.errors.CannotOverwriteExistingCassetteException: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_slot_clone.yaml') in your current record mode ('once').
2025-03-24T09:43:09.8082256Z E               No match for the request (<Request (POST) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/checknameavailability?api-version=2023-12-01>) was found.
2025-03-24T09:43:09.8083073Z E               Found 1 similar requests with 1 different matcher(s) :
2025-03-24T09:43:09.8083408Z E               
2025-03-24T09:43:09.8083929Z E               1 - (<Request (POST) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/checknameavailability?api-version=2023-01-01>).
2025-03-24T09:43:09.8084534Z E               Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
2025-03-24T09:43:09.8084872Z E               Matchers failed :
2025-03-24T09:43:09.8085258Z E               _custom_request_query_matcher - assertion failure :
2025-03-24T09:43:09.8085604Z E               None
2025-03-24T09:43:09.8085737Z 
2025-03-24T09:43:09.8086114Z env/lib/python3.12/site-packages/vcr/stubs/__init__.py:264: CannotOverwriteExistingCassetteException
2025-03-24T09:43:09.8086391Z 
2025-03-24T09:43:09.8086718Z During handling of the above exception, another exception occurred:
2025-03-24T09:43:09.8086950Z 
2025-03-24T09:43:09.8087371Z self = <azure.cli.command_modules.appservice.tests.latest.test_webapp_commands.WebappSlotScenarioTest testMethod=test_webapp_slot_clone>
2025-03-24T09:43:09.8087833Z resource_group = 'clitest.rg000001'
2025-03-24T09:43:09.8088002Z 
2025-03-24T09:43:09.8088343Z     @ResourceGroupPreparer(location=WINDOWS_ASP_LOCATION_WEBAPP)
2025-03-24T09:43:09.8088747Z     def test_webapp_slot_clone(self, resource_group):
2025-03-24T09:43:09.8089225Z         plan_name = self.create_random_name(prefix='slot-test-plan', length=24)
2025-03-24T09:43:09.8089661Z         webapp_name = self.create_random_name(prefix='slot-test-web', length=24)
2025-03-24T09:43:09.8090088Z         subnet_name = self.create_random_name('swiftsubnet', 24)
2025-03-24T09:43:09.8090505Z         vnet_name = self.create_random_name('swiftname', 24)
2025-03-24T09:43:09.8090871Z     
2025-03-24T09:43:09.8091184Z         plan_result = self.cmd(
2025-03-24T09:43:09.8091673Z             'appservice plan create -g {} -n {} --sku S1'.format(resource_group, plan_name)).get_output_in_json()
2025-03-24T09:43:09.8092289Z >       self.cmd('webapp create -g {} -n {} --plan {}'.format(resource_group, webapp_name, plan_result['name']))
2025-03-24T09:43:09.8092572Z 
2025-03-24T09:43:09.8093145Z src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands.py:1530: 
2025-03-24T09:43:09.8093685Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2025-03-24T09:43:09.8094140Z src/azure-cli-testsdk/azure/cli/testsdk/base.py:176: in cmd
2025-03-24T09:43:09.8094755Z     return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
2025-03-24T09:43:09.8095306Z src/azure-cli-testsdk/azure/cli/testsdk/base.py:251: in __init__
2025-03-24T09:43:09.8095835Z     self._in_process_execute(cli_ctx, command, expect_failure=expect_failure)
2025-03-24T09:43:09.8096321Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2025-03-24T09:43:09.8096527Z 
2025-03-24T09:43:09.8096913Z self = <azure.cli.testsdk.base.ExecutionResult object at 0x7f15998f4680>
2025-03-24T09:43:09.8097365Z cli_ctx = <azure.cli.core.mock.DummyCli object at 0x7f159a614fb0>
2025-03-24T09:43:09.8097731Z command = 'webapp create -g clitest.rg000001 -n slot-test-web000003 --plan slot-test-plan000002'
2025-03-24T09:43:09.8098370Z expect_failure = False
2025-03-24T09:43:09.8098528Z 
2025-03-24T09:43:09.8098922Z     def _in_process_execute(self, cli_ctx, command, expect_failure=False):
2025-03-24T09:43:09.8099353Z         from io import StringIO
2025-03-24T09:43:09.8099983Z         from vcr.errors import CannotOverwriteExistingCassetteException
2025-03-24T09:43:09.8100357Z     
2025-03-24T09:43:09.8100679Z         if command.startswith('az '):
2025-03-24T09:43:09.8101027Z             command = command[3:]
2025-03-24T09:43:09.8101320Z     
2025-03-24T09:43:09.8101625Z         stdout_buf = StringIO()
2025-03-24T09:43:09.8101975Z         logging_buf = StringIO()
2025-03-24T09:43:09.8102424Z         try:
2025-03-24T09:43:09.8102863Z             # issue: stderr cannot be redirect in this form, as a result some failure information
2025-03-24T09:43:09.8107890Z             # is lost when command fails.
2025-03-24T09:43:09.8108393Z             self.exit_code = cli_ctx.invoke(shlex.split(command), out_file=stdout_buf) or 0
2025-03-24T09:43:09.8108863Z             self.output = stdout_buf.getvalue()
2025-03-24T09:43:09.8109264Z             self.applog = logging_buf.getvalue()
2025-03-24T09:43:09.8109604Z     
2025-03-24T09:43:09.8109975Z         except CannotOverwriteExistingCassetteException as ex:
2025-03-24T09:43:09.8110408Z >           raise AssertionError(ex)
2025-03-24T09:43:09.8111086Z E           AssertionError: Can't overwrite existing cassette ('/mnt/vss/_work/1/s/src/azure-cli/azure/cli/command_modules/appservice/tests/latest/recordings/test_webapp_slot_clone.yaml') in your current record mode ('once').
2025-03-24T09:43:09.8112067Z E           No match for the request (<Request (POST) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/checknameavailability?api-version=2023-12-01>) was found.
2025-03-24T09:43:09.8112751Z E           Found 1 similar requests with 1 different matcher(s) :
2025-03-24T09:43:09.8113308Z E           
2025-03-24T09:43:09.8113890Z E           1 - (<Request (POST) https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Web/checknameavailability?api-version=2023-01-01>).
2025-03-24T09:43:09.8114566Z E           Matchers succeeded : ['method', 'scheme', 'host', 'port', 'path']
2025-03-24T09:43:09.8114992Z E           Matchers failed :
2025-03-24T09:43:09.8115403Z E           _custom_request_query_matcher - assertion failure :
2025-03-24T09:43:09.8115791Z E           None

#30776 bumped azure-mgmt-web to 7.3.1 which by default uses API version 2023-12-01, but this PR generated recordings with 2023-01-01.

The CI of this PR was run on 2025-02-18 and #30776 was merged on 2025-02-24. As it has been a long time since the CI was run, it should be triggered again before merging.

See #28465

@jiasli
Copy link
Member

jiasli commented Mar 25, 2025

This PR has no description which doesn't comply with our guideline: https://github.com/Azure/azure-cli/tree/dev/doc/authoring_command_modules#format-pr-description

@zhoxing-ms zhoxing-ms changed the title [App Service] Fix #26920: az webapp deployment slot create: Make the command consistent with the portal behavior [App Service] Fix #26920: az webapp deployment slot create: Make the created new slot has the same VNet integration settings as the source slot to keep consistent with Portal behavior Mar 25, 2025
@zhoxing-ms zhoxing-ms changed the title [App Service] Fix #26920: az webapp deployment slot create: Make the created new slot has the same VNet integration settings as the source slot to keep consistent with Portal behavior [App Service] Fix #26920: az webapp deployment slot create: Make the created new slot has the same VNet integration settings as the source slot Mar 25, 2025
@zhoxing-ms zhoxing-ms changed the title [App Service] Fix #26920: az webapp deployment slot create: Make the created new slot has the same VNet integration settings as the source slot [App Service] Fix #26920: az webapp deployment slot create: Make the created new slot has same VNet integration settings of source slot as Portal behavior Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants