Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.03k stars 1.19k forks source link

[AppService] appSettings is null, getConfiguration #30876

Open dbwodlf3 opened 3 weeks ago

dbwodlf3 commented 3 weeks ago
    const updateTaskItems = await Promise.all(
        taskItems.map(async (taskItem) => {
            const { id, resourceGroup, expandEnvs } =
                validateTaskItem(taskItem);
            const resource = await client.webApps.getConfiguration(
                resourceGroup,
                id
            );
            console.log("RESOURCE!!:=", resource.appSettings);
        })
    );

When I use the getConfiguration function, it returns a null value. However, when I use the listApplicationSettings function, I can retrieve the settings, but it doesn't include the slotSettings information.

how can i get slotSettings?

### Tasks
dbwodlf3 commented 3 weeks ago

just use the listSlotConfigurationNames API?. However, the listSlotConfigurationNames API only retrieves information for the production slot, not for individual slots.

kazrael2119 commented 2 weeks ago

will check

kazrael2119 commented 2 weeks ago

When I use the getConfiguration function, it returns a null value.

I can repro this issue, @dbwodlf3 Do you have set the appSettings on portal? If yes, could you tell me how to set it?

kazrael2119 commented 2 weeks ago

just use the listSlotConfigurationNames API?. However, the listSlotConfigurationNames API only retrieves information for the production slot, not for individual slots.

could you try to use webapps.getConfigurationSlot() ? we have an operation to get configuration slot: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/appservice/arm-appservice/src/operationsInterfaces/webApps.ts#L4520

github-actions[bot] commented 1 week ago

Hi @dbwodlf3. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

github-actions[bot] commented 3 days ago

Hi @dbwodlf3, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!