Azure / Azure/azure-cli

An Error in "az functionapp config appsettings set" command

Open
#28,491 4 comments 0 reactions 4 assignees Claimed by @kamperiadis View on GitHub
act-observability-squad Auto-Assign azf_bug azf_reviewed bug customer-reported Functions Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

The following command execution was failed due to "Parameter with name AzureFunctionsJobHost__logging__LogLevel__Function already exists." error in Linux environment.

```
az functionapp config appsettings set --resource-group {resouceGroup} --name {name}
--slot staging --slot-settings {file}
```

I think the expected behavior for this command should be idempotence regardless of whether the setting exists or not..
Regarding debug log, the request body sent to the ARM endpoint contained duplicate "AzureFunctionsJobHost__logging__LogLevel__Function" setting so I belive that that seems to be the cause of the issue.

### Related command

az functionapp config appsettings set --resource-group {resouceGroup} --name {name}
--slot staging --slot-settings {file}

### Errors

Parameter with name AzureFunctionsJobHost__logging__LogLevel__Function already exists.

### Issue script & Debug output

The request body sent to the ARM endpoint contained duplicate "AzureFunctionsJobHost__logging__LogLevel__Function"
even though setting file specified in command has only one "AzureFunctionsJobHost__logging__LogLevel__Function".

### Expected behavior

The expected behavior for this command should be idempotence and successful.

### Environment Summary
This issue appear to be caused in Linux environment. The following environment has experienced the issue.
AZURECLI/2.52.0 (RPM) azsdk-python-azure-mgmt-web/7.0.0 Python/3.9.7 (Linux-4.18.0-372.70.1.el8_6.x86_64-x86_64-with-glibc2.28)

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.