Azure-functions-core-tools: Ability to run func azure functionapp fetch-app-settings with slots

Created on 16 Jan 2018  路  6Comments  路  Source: Azure/azure-functions-core-tools

_From @willmorgan on October 26, 2017 11:15_

We need the ability to fetch-app-settings for a particular slot.

At the moment this does not appear to be a supported feature.

Investigative information

  • Timestamp: 2017-10-26
  • Function App version (1.0 or 2.0-beta): 1.0, I think?
  • Function App name: sdkdev-Functions-gysuvrx2lokek
  • Function name(s) (as appropriate): n/a
  • Invocation ID: n/a
  • Region: West Europe

Repro steps

  1. Have a deployed Function App with some slots, where the app settings are defined for each slot.
  2. Run func azure functionapp fetch-app-settings <YOUR_FUNCTION_NAME>
  3. Observe that your slot settings, predictably, are not synchronised.
  4. Try running `func azure functionapp fetch-app-settings -
  5. "Can't find app with name ..."
  6. etc...

Expected behavior

I should be able to provide a slot option like:

func azure functionapp fetch-app-settings <YOUR_FUNCTION_NAME> --slot <YOUR_SLOT_NAME>

Actual behavior

Unsupported

Known workarounds

Not using slots... which is a dealbreaker for us right now.

_Copied from original issue: Azure/azure-webjobs-sdk-script#2073_

wontfix

All 6 comments

_From @nelak on October 26, 2017 12:53_

Also I'd like to add that it's currently not possible to publish to a specific deployment slot.
Publishing only works for the functionApp and not for the other function names.

_From @martinpeck on October 27, 2017 8:46_

My experience is that func azure functionapp fetch-app-settings <FUNCTION NAME> retrieves the slot and non-slot settings for the current (running) slot, but I agree that there's obvious way to retrieve the settings from one of the other slots.

For step 3, are you saying that no settings are sync'd, or that only a subset of the settings get sync'd? If it's "no settings", can you confirm that you see your function when you run...?

func azure functionapp list

... and if it's a subset, which are you missing (the ones marked as "slot setting" or the ones that are not)?

_From @martinpeck on October 27, 2017 11:45_

While it doesn't produce the local.settings.json that you're after, it's worth noting that...

az webapp config appsettings list --name [NAME_OF_FUNCTION_APP] --resource-group mpeckfuncwithslots --slot [SLOT_NAME]

... will retrieve the settings for your function app, by slot.

_From @willmorgan on October 30, 2017 11:35_

For step 3, are you saying that no settings are sync'd, or that only a subset of the settings get sync'd? If it's "no settings", can you confirm that you see your function when you run...?

It takes only the "master" function app's settings, which I would say is expected. But not the required slot.

While it doesn't produce the local.settings.json that you're after, it's worth noting that...

az webapp config appsettings list --name [NAME_OF_FUNCTION_APP] --resource-group mpeckfuncwithslots --slot [SLOT_NAME]

This could be useful for now. Thanks.

I guess this comes under the banner of #227 ?

closing as we're not adding new functionality to slots

Was this page helpful?
0 / 5 - 0 ratings