question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`az interactive`: add flag to clear the cache

See original GitHub issue

Describe the bug

az group delete --name mygroup

works as a command, but not inside az interactive.

az group delete --help

returns

Arguments
    --name --resource-group -g -n [Required] : Name of resource group. You can configure the default

This clearly means that either --name or --resource-group is an acceptable flag for the name of the resource group you want to delete.

And az group delete --name mygroup does work.

If you run az interactive and type group delete -- the suggestions are

az>> group delete --name draw-demo
 --name            [Required] Name of resource group. You can configure the default group using `az configure --defaults group=<na...
 --resource-group  [Required] Name of resource group. You can configure the default group using `az configure --defaults group=<na...

This also makes it clear that either --name or --resource-group can be used.

However if you try to run the same command as before, but now in interactive mode, it fails.

$ az interactive
az>> group delete --name mygroup
az group delete: error: the following arguments are required: --resource-group/-g
usage: az group delete [-h] [--verbose] [--debug]
                       [--output {json,jsonc,table,tsv,yaml}]
                       [--query JMESPATH] --resource-group RESOURCE_GROUP_NAME
                       [--yes] [--no-wait] [--subscription _SUBSCRIPTION]

To Reproduce

$ az interactive
az>> group delete --name mygroup

Expected behavior

Group is successfully deleted

Actual Behavior

az group delete: error: the following arguments are required: --resource-group/-g
usage: az group delete [-h] [--verbose] [--debug]
                       [--output {json,jsonc,table,tsv,yaml}]
                       [--query JMESPATH] --resource-group RESOURCE_GROUP_NAME
                       [--yes] [--no-wait] [--subscription _SUBSCRIPTION]

Environment summary

  • Ubuntu 18
  • installed based on the official instructions
  • az --version:
azure-cli (2.0.54)
...

Extensions:
interactive (0.4.1)
...
Python (Linux) 3.6.5

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tjprescottcommented, Jan 16, 2019

Based on this thread, I suggest it would be worthwhile to add a flag to az interactive that would wipe the .azure-shell directory on behalf of the user. This would offer a simpler troubleshooting option for users that run into problems of an outdated cache, which is relatively common issue.

0reactions
yonzhancommented, Jun 1, 2020

add to backlog

Read more comments on GitHub >

github_iconTop Results From Across the Web

az | Microsoft Learn
Commands to manage CLI objects cached using the --defer argument. az capacity. Manage capacity resources. az cdn. Manage Azure Content Delivery Networks (CDNs)....
Read more >
clearing entity caches on flag changes [#2568131] | Drupal.org
We need to invalidate entity caches at various points: - when a user flags or unflags a node - when a flag is...
Read more >
Configure database flags | Cloud SQL for MySQL
Cloud SQL Flag Type Acceptable Values and Notes Restart Required? auto_increment_increment integer 1 ... 65535 No auto_increment_offset integer 1 ... 65535 No binlog_cache_size integer 4096 ......
Read more >
Clear the Oracle Applications cache
Click Caching Framework from the list of secondary tabs. The Overview screen opens. Click Global Configuration from the left panel. The Global Cache...
Read more >
Site Methods - Tableau Help
Specify ContentOnly to prevent site administrators from adding or removing users. (Server administrators can always add or remove users.) Note: You cannot set ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found