question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Creating deployment slots via the cli vs the portal results in different behavior.

See original GitHub issue

Related command az functionapp deployment slot create. Full command:

az functionapp deployment slot create `
        --name $app `
        --resource-group $env:RESOURCE_GROUP `
        --slot blue `
        --configuration-source $app

Describe the bug

  • When creating a Deployment Slot, using the CLI to do so versus using the Azure Portal results in different behavior.
  • If the slot is created using the CLI, pushing code to the slot results in the code automatically being also deployed/swapped to the production slot over a period of times (~5 minutes, we verified using our internal logs).
  • We theorized this could be because of auto swap. However, disabling auto swaps with the command az functionapp deployment slot auto-swap --slot blue --disable --name <name>--resource-group <rg> still results in the same behavior.
  • If the slot is created using the online portal, pushing code to the slot does NOT deploy the code to the production slot too.

To Reproduce

  • Create a new slot using the portal.
  • Push code to the new slot
  • Observe that the production slot still has the code as intended.
  • Delete the slot and recreate it using the CLI.
  • Push code to the new slot.
  • Observe that the production slot will have the code pushed to the new slot in around 5-10 minutes.

Expected behavior

  • Creating slots via the CLI or the Portal should result in the same behavior.

Environment summary

  • Install Method: .exe
  • CLI version: 2.37.0
  • OS Version: Windows 10
  • Shell: Powershell

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
panchagnulacommented, May 27, 2022

@Francisco-Gamino who owns slots behavior from functions perspective. AFAIk CLI doesn’t do any special on the client side & just calls the API with the parameters from the command - I cannot speak for portal implementation. @StrawnSC can you check CLI code & if we need functions folks to look at it - then lets involve them.

0reactions
johagrcommented, Aug 19, 2022

Hi @FinVamp1 . I also encountered this behaviour when setting upp my slots via the cli/bicep. Any news on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Functions deployment slots | Microsoft Learn
Azure Functions deployment slots allow your function app to run different instances called "slots". Slots are different environments exposed via ...
Read more >
Deployment Slots for Web Apps using the Azure CLI
You can create different slots for your application (for e.g. Dev, Test or Stage). The Production slot is the slot where your live...
Read more >
Set up staging environments in Azure App Service - KSL Resorts
Azure Command‐Line Interface ﴾Azure CLI﴿ commands for Deployment Slots ... Deploying an app to a slot first and swapping it into production ensures...
Read more >
Toggle Deployment Slots on an Azure Function App Using CLI
In this lab, we use Azure CLI to create multiple slots in an Azure Function App Service, then deploy two different versions of...
Read more >
Travis CI and Azure Web Apps | webhint documentation
Create and configure a service principal · To achieve this, you first need to install the Azure CLI. Then log in into your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found