microsoft / vscode-azureresourcegroups

VS Code extension for managing Azure resources.
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureresourcegroups
MIT License
52 stars 28 forks source link

web: Fix selected subscriptions setting value #684

Closed alexweininger closed 1 year ago

alexweininger commented 1 year ago

Important: I want to wait to merge this until after the focus feature is released.

Fixes #680

I had to add an automatic migration for old setting values. I'm hoping we can remove this migration logic in the future and replace it with some error handling.

I also added some detailed comments about what is happening when we list subscriptions for a specific tenant. I needed to make small changes in that code to ensure that subscriptions returned from the default tenant have their tenantId property set. For some reason, when subscriptions are fetched from the default tenant, the tenantId property is an empty string.

alexweininger commented 1 year ago

Is it only the web provider that uses that setting? Not on desktop?

Yes, this setting is only used by the web provider. The Azure Account extension uses the azure.resourceFilter setting.

bwateratmsft commented 1 year ago

Is it only the web provider that uses that setting? Not on desktop?

Yes, this setting is only used by the web provider. The Azure Account extension uses the azure.resourceFilter setting.

Gotcha. So going forward, using the new setting is the right move. We could potentially have a migration path from Azure Account -> new setting, but I don't think it's necessary. I might even argue it's better not to migrate that setting, and force users to go through it again--relearning that subscription filtering is an option, and one I want them to use more.