Upgrade to auth v6 and improve extension performance#1350
Merged
alexweininger merged 46 commits intomainfrom Feb 5, 2026
Merged
Upgrade to auth v6 and improve extension performance#1350alexweininger merged 46 commits intomainfrom
alexweininger merged 46 commits intomainfrom
Conversation
…ons for cache invalidation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades the Azure authentication library from v5 to v6 (alpha) and introduces performance improvements through parallel loading and caching optimizations.
Changes:
- Upgraded
@microsoft/vscode-azext-azureauthfrom v5.1.1 to v6.0.0-alpha.1 - Refactored authentication API calls to use new v6 methods (
getAvailableSubscriptions,getAccounts,getTenantsForAccount, etc.) - Added cache invalidation mechanism with atomic flag consumption to prevent stale data after sign-in/configuration changes
- Implemented cancellation tokens for tree loading operations to improve responsiveness
- Introduced parallel loading for subscriptions and tenants to improve performance with multiple accounts
- Refactored sign-in UI tree items into dedicated helper functions
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Upgraded vscode-azext-azureauth to v6.0.0-alpha.1 and bumped vscode engine requirement to 1.106.0 |
| test/api/MockAzureSubscriptionProvider.ts | Updated mock to match v6 API structure with new method signatures |
| src/tree/tenants/TenantResourceTreeDataProvider.ts | Refactored to use new auth v6 API with parallel account loading and improved error handling |
| src/tree/azure/FocusViewTreeDataProvider.ts | Added cancellation tokens and parallel resource loading for better performance |
| src/tree/azure/AzureResourceTreeDataProvider.ts | Migrated to v6 API with cache invalidation, cancellation tokens, and improved telemetry |
| src/tree/ResourceTreeDataProviderBase.ts | Added cancellation token support and replaced onDidSignIn/onDidSignOut with onRefreshSuggested |
| src/tree/onGetAzureChildrenBase.ts | Deleted - functionality refactored into getSignInTreeItems.ts |
| src/tree/getSignInTreeItems.ts | New file extracting sign-in tree item generation logic |
| src/services/getSubscriptionProviderFactory.ts | Updated to use v6 API with new import path for Azure DevOps provider |
| src/extensionVariables.ts | Added cache invalidation flag mechanism for clearing auth caches on demand |
| src/extension.ts | Updated subscription retrieval to use getAvailableSubscriptions |
| src/commands/registerCommands.ts | Added cache clearing on refresh and sign-in operations |
| src/commands/accounts/selectSubscriptions.ts | Migrated error handling to use isNotSignedInError |
| src/commands/accounts/logIn.ts | Added cache clearing after successful sign-in |
| src/commands/sovereignCloud/configureSovereignCloud.ts | Added cache clearing when switching sovereign clouds |
| src/cloudConsole/cloudConsole.ts | Updated to use v6 tenant/subscription retrieval methods |
| src/managedIdentity/TargetServiceRoleAssignmentItem.ts | Updated to use getAvailableSubscriptions API |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closed
bwateratmsft
reviewed
Feb 3, 2026
Contributor
|
I'd also look at Copilot's remaining comments... |
bwateratmsft
approved these changes
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.