Skip to content
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

Feature Added to Azure App Service Manage : Swap Slot with Preview #11155

Merged
merged 20 commits into from
Aug 23, 2019

Conversation

eaarora-ms
Copy link
Contributor

@eaarora-ms eaarora-ms commented Aug 20, 2019

  1. Add the following new “Actions” in the App service Manage task: 

    1. Start Swap with Preview: Initiates a swap with a preview (multi-phase swap), and applies target slot configuration to the source slot 
    2. Complete Swap with preview:  When you're ready to complete the pending swap, select Complete Swap action. 
    3. Cancel Swap with preview: To cancel a pending swap, select Cancel Swap instead. 
  2. The task validates the “Action” during runtime and fails if not applicable for the selected web app type. ( Web apps on Linux as well as Web apps for containers )

  3. Action: Start Swap with Preview  

    1. All inputs needed for “Swap slots” Action are needed: App service name, Resource Group, Source slot, target Slot. Checkboxes for “Swap with Production”, “Preserve Vnet” 
    2. The swap operation is paused, and the user can validate that the source slot works correctly with the target slot's settings. Console.log has statement notifying user 'Preview the swap in the source slot by going to https://<app_name>-.azurewebsites.net'. 
  4. Action: Complete swap with Preview:   
    All inputs needed for “Swap slots” Action are needed: App service name, Resource Group, Source slot, target Slot. Checkboxes for “Swap with Production” , “Preserve Vnet” 

  5. Action: Cancel swap with Preview: (Cancel a pending swap and restore the source slot configuration)
    All inputs needed for “Swap slots” Action are needed: App service name, Resource Group, Source slot, target Slot. Checkboxes for “Swap with Production” , “Preserve Vnet” 

  6. The task fails when "Start Swap with Preview" action is completed before allowing any new “Swap Slots” Action on the app giving a conflict error.

Reference: #6917

const webAppKindMap = new Map([
[ 'app', 'webApp' ],
[ 'app,linux', 'webAppLinux' ],
['app,container', 'webAppContainer']
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you ensure whether windows container apps are covered?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checked. All container web apps are covered.

@@ -82,7 +85,7 @@
"label": "Specify Slot or App Service Environment",
"defaultValue": "false",
"required": false,
"visibleRule": "Action != Swap Slots && Action != Delete Slot"
"visibleRule": "Action != Swap Slots && Action != Delete Slot && Action != Start Swap With Preview && Action != Complete Swap && Action != Cancel Swap"
Copy link
Contributor

Choose a reason for hiding this comment

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

Does complete swap and Cancel swap require both source and target slot?

Copy link
Contributor Author

@eaarora-ms eaarora-ms Aug 22, 2019

Choose a reason for hiding this comment

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

We need both for Complete swap but not for Cancel swap (only source slot is required) . Will make the changes.

Tasks/Common/azure-arm-rest-v2/azure-arm-app-service.ts Outdated Show resolved Hide resolved
Tasks/AzureAppServiceManageV0/azureappservicemanage.ts Outdated Show resolved Hide resolved
@@ -55,6 +55,9 @@
"Start Azure App Service": "Start App Service",
"Stop Azure App Service": "Stop App Service",
"Restart Azure App Service": "Restart App Service",
"Start Swap With Preview" : "Start Swap with Preview",
Copy link
Contributor

Choose a reason for hiding this comment

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

@N-Usha, Can you check the camelcase?

@vincent1173 vincent1173 added Area: AzureAppService Label to monitor Azure App Service issues Area: Release labels Aug 21, 2019
@SumiranAgg
Copy link
Contributor

Add L0s in azure-arm-rest-v2

@vincent1173 vincent1173 self-requested a review August 23, 2019 06:19
Copy link
Contributor

@vincent1173 vincent1173 left a comment

Choose a reason for hiding this comment

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

Looks good!

@eaarora-ms eaarora-ms merged commit 1ea2f6e into microsoft:master Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: AzureAppService Label to monitor Azure App Service issues Area: Release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants