vscode-azureresourcegroups icon indicating copy to clipboard operation
vscode-azureresourcegroups copied to clipboard

`azureResourceGroups.selectedSubscriptions` is jarring

Open TylerLeonhardt opened this issue 3 months ago • 5 comments

Describe the Issue

Image

Don't write this stuff to user settings.

Steps to Reproduce

  1. use the Azure MCP server for the first time and select the subscriptions you want to use, I picked all because why not
  2. open user settings
  3. 🐛 lots of stuff written which is overwhelming

Expected Experience

These shouldn't be settings and instead be global state. Unless you really expect users to go in here and modify them. If so, you should support an undefined value which uses some defaults and only when the user wants to customize do you accept this big setting.

TylerLeonhardt avatar Sep 22 '25 18:09 TylerLeonhardt

  1. Yes, we do expect users to modify them in settings.json; I do all the time.
  2. Global state will not work for this. We intentionally chose a VSCode setting so that other users of our auth package (e.g. Container Tools) could also benefit from the same subscription filtering--even if Azure Resources is not installed.
  3. Access to 100+ subscriptions is almost exclusively a Microsoft internal problem.
  4. undefined and [] are supported, and are equivalent to selecting all.

bwateratmsft avatar Sep 22 '25 18:09 bwateratmsft

but isn't it odd that I didn't get option 4? Instead it wrote to user settings.

TylerLeonhardt avatar Sep 22 '25 18:09 TylerLeonhardt

I don't think we have a check in the logic, to see if the user selected all subs--and if so, to write undefined. However, that would also blow away their filters for any other tenants they aren't currently signed in to, which would be problematic.

bwateratmsft avatar Sep 22 '25 19:09 bwateratmsft

I agree that this experience is quite jarring. Is there some better way to do this? For example, write to storage, and then build an experience (maybe quick pick) so use can modify the value? Or something else?

cc @charris-msft

isidorn avatar Sep 24 '25 11:09 isidorn

@isidorn We'd lose the ability to support the auth package respecting the same filters

bwateratmsft avatar Sep 24 '25 12:09 bwateratmsft