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

Quotes in --set parameter of redis update command given in the doc looks inaccurate #22498

Closed
evanlwj opened this issue May 17, 2022 · 4 comments · Fixed by #22524
Closed

Quotes in --set parameter of redis update command given in the doc looks inaccurate #22498

evanlwj opened this issue May 17, 2022 · 4 comments · Fixed by #22524
Assignees
Labels
Auto-Assign Auto assign by bot CXP Attention This issue is handled by CXP team. Documentation needs-team-attention This issue needs attention from Azure service team or SDK team Redis Cache

Comments

@evanlwj
Copy link
Member

evanlwj commented May 17, 2022

[Enter feedback here]

I followed az redis update doc to update shardCount for an existing redis instance.

If double quotes are included in --set parameter like --set "shardCount"="1", An usage error promoted to me

az redis update --subscription xxxxxx --name {my redis} --resource-group {my resourcegroup} --set "shardCount"="1" --output json
usage error: Empty key in --set. Correct syntax: --set KEY=VALUE [KEY=VALUE ...]

If try this, another error promoted to me

az redis update --subscription xxxxxx --name {my redis} --resource-group {my resourcegroup} --set \"shardCount\"=\"1\" --output json
Property '\shardCount\' not found on root. Send it as an additional property .
(InvalidRequestContent) The request content was invalid and could not be deserialized: 'Could not find member '\shardCount\' on object of type 'ResourceDefinition'. Path '['\\shardCount\\']', line 1, position 359.'.
Code: InvalidRequestContent
Message: The request content was invalid and could not be deserialized: 'Could not find member '\shardCount\' on object of type 'ResourceDefinition'. Path '['\\shardCount\\']', line 1, position 359.'.

If --set doesn't include double quotes like --set shardCount=1, command worked for me and updated the redis instance with a desired shard count in couple minutes later.

az redis update --subscription xxxxxx --name {my redis} --resource-group {my resourcegroup} --set shardCount=1 --output json

Thus, I am wondering the sample command with double quotes in --set parameter below in the doc is inaccurate.

az redis update --name MyRedisCache --resource-group MyResourceGroup --set "shardCount"="2"


Document Details

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

@ghost ghost added Auto-Assign Auto assign by bot CXP Attention This issue is handled by CXP team. Redis Cache labels May 17, 2022
@yonzhan
Copy link
Collaborator

yonzhan commented May 17, 2022

route to CXP team

@navba-MSFT navba-MSFT self-assigned this May 19, 2022
@navba-MSFT
Copy link
Contributor

@evanlwj Thanks for reaching out to us and reporting this issue. We are looking into this issue. We will provide an update once we get a chance.

@navba-MSFT navba-MSFT added the needs-team-attention This issue needs attention from Azure service team or SDK team label May 19, 2022
@navba-MSFT
Copy link
Contributor

@evanlwj Thanks for sharing the feedback. The above PR has been filed to address this issue. It is currently under review phase. In the meantime, if you have any questions, please let us know. We would be happy to help.

@navba-MSFT navba-MSFT added needs-author-feedback More information is needed from author to address the issue. and removed needs-team-attention This issue needs attention from Azure service team or SDK team labels May 19, 2022
@evanlwj
Copy link
Member Author

evanlwj commented May 22, 2022

Thanks for an update. Just a reminder, I guessed --set "sku.capacity"="2" might have the similar issue (I didn't verify it myself).

@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 May 22, 2022
evelyn-ys pushed a commit that referenced this issue May 23, 2022
The CLI command to update the Redis cache shardCount using --set parameter doesnt require double quote.
If you run the command with --set parameter in double quotes like "shardCount"="1" it will fail with below error:

usage error: Empty key in --set. Correct syntax: --set KEY=VALUE [KEY=VALUE ...]

Fixes #22498
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 CXP Attention This issue is handled by CXP team. Documentation needs-team-attention This issue needs attention from Azure service team or SDK team Redis Cache
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants