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

'az webapp config appsettings set' is not configuring webapp correctly with multiple settings #23896

Closed
rick-hayek opened this issue Sep 15, 2022 · 7 comments
Assignees
Labels
Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. CXP Attention This issue is handled by CXP team. needs-team-attention This issue needs attention from Azure service team or SDK team Web Apps az webapp

Comments

@rick-hayek
Copy link

Env:

azure-cli 2.40.0

core 2.40.0
telemetry 1.0.8

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1

Python (Windows) 3.10.5 (tags/v3.10.5:f377153, Jun 6 2022, 15:58:59) [MSC v.1929 32 bit (Intel)]

Steps:
run powershell:

$settings = [System.Collections.ArrayList]@()
$settings.Add("a=b")
$settings.Add("c=d")
az webapp config appsettings set --resource-group $group --name $app --settings $settings

Expected Result:
{
"name": "a",
"slotSetting": false,
"value": "b"
},
{
"name": "c",
"slotSetting": false,
"value": "d"
}

Actual Result:
{
"name": "a",
"slotSetting": false,
"value": "b c=d"
}

Note:
This issue is not happening on azure-cli 2.39.*


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. Web Apps az webapp CXP Attention This issue is handled by CXP team. Auto-Assign Auto assign by bot labels Sep 15, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented Sep 15, 2022

route to CXP team

@berhir
Copy link

berhir commented Sep 16, 2022

We are facing the same issue. Version 2.40 is breaking our deployment pipeline. It worked fine with previous versions.

@RakeshMohanMSFT
Copy link
Contributor

@rick-hayek Thank you for reaching out, we are looking into it

@RakeshMohanMSFT
Copy link
Contributor

RakeshMohanMSFT commented Sep 17, 2022

@rick-hayek, Please see the explanation and solution at #23797 (comment)

@RakeshMohanMSFT RakeshMohanMSFT added the needs-author-feedback More information is needed from author to address the issue. label Sep 17, 2022
@vstkamath
Copy link

This issue is not just limited to resource tags. Wherever array parameters are passed, cli version 2.40.0 has regressed. Whether it is specifying the service bus access, aks zone configuration all apis are broken. Is there any solution under work? Since the DevOps pipelines are already getting the images with 2.40.0, it is a major impact for us.

@rick-hayek
Copy link
Author

rick-hayek commented Sep 18, 2022

@rick-hayek Check if this work around helps? #23920 (comment)

Thanks. I did not try that.

I can get things worked for now using Invoke-Expression:


$settings = [System.Collections.ArrayList]@()
$settings.Add("a=b")
$settings.Add("c=d")
$settingsString = [System.Collections.ArrayList]@()
$settings | Foreach {
    $value = $_.Replace("""", "") # required if your key-value is something like this: myKey="MyValue"
    $settingsString.Add("""$value""") | Out-Null;
}

$command = "az webapp config appsettings set --resource-group $group --name $app --settings $settingsString"

Invoke-Expression -Command $command

This solution works but potentially problematic.
I think storing settings into a list variable could be a common scenario. appreciated if this issue can get fixed.

@ghost ghost added needs-team-attention This issue needs attention from Azure service team or SDK team and removed needs-author-feedback More information is needed from author to address the issue. labels Sep 18, 2022
@jiasli
Copy link
Member

jiasli commented Sep 19, 2022

Duplicate of #23797

@jiasli jiasli marked this as a duplicate of #23797 Sep 19, 2022
@jiasli jiasli closed this as completed Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot customer-reported Issues that are reported by GitHub users external to the Azure organization. CXP Attention This issue is handled by CXP team. needs-team-attention This issue needs attention from Azure service team or SDK team Web Apps az webapp
Projects
None yet
Development

No branches or pull requests

6 participants