Azure / Azure/azure-functions-core-tools
func settings delete --connectionString can't delete Connection Strings
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 498
- Avg merge
- 5d 4h
- Merged PRs (30d)
- 15
Description
I'm using Azure Functions Core Tools `v3`.
Here are the steps to reproduce:
1. `dotnet new globaljson --sdk-version 3.1.413`
2. `mkdir funcapp1 && cd funcapp1 && func init --worker-runtime dotnet`
2. `func new -t "HttpTrigger" -n "Login" -a "anonymous"`
3. `func settings add DefaultConnection "Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;" --connectionString`
4. `func settings list -a`
```txt
App Settings:
-> Name: AzureWebJobsStorage
Value: UseDevelopmentStorage=true
-> Name: FUNCTIONS_WORKER_RUNTIME
Value: dotnet
Connection Strings:
-> Name: DefaultConnection
Value: Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
ProviderName: System.Data.SqlClient
```
5. `func settings delete DefaultConnection --connectionString`
6. `func settings list -a` which is nothing happen. The `DefaultConnection` was not been deleted.
```txt
App Settings:
-> Name: AzureWebJobsStorage
Value: UseDevelopmentStorage=true
-> Name: FUNCTIONS_WORKER_RUNTIME
Value: dotnet
Connection Strings:
-> Name: DefaultConnection
Value: Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;
ProviderName: System.Data.SqlClient
```
Contributor guide
Research direction
Reproduce the issue with the listed `func settings add`, `func settings list -a`, and `func settings delete --connectionString` commands. Start by tracing how the settings delete command handles the `--connectionString` option and compare it with the add and list paths. Done means the named connection string is removed and no longer appears in the subsequent listing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100