Skip to content

Upgrade to auth v6 and improve extension performance#1350

Merged
alexweininger merged 46 commits intomainfrom
alex/authv6
Feb 5, 2026
Merged

Upgrade to auth v6 and improve extension performance#1350
alexweininger merged 46 commits intomainfrom
alex/authv6

Conversation

@alexweininger
Copy link
Member

No description provided.

@alexweininger alexweininger changed the title Alex/authv6 Upgrade to auth v6 and improve extension performance Jan 29, 2026
@alexweininger alexweininger marked this pull request as ready for review January 29, 2026 18:22
@alexweininger alexweininger requested a review from a team as a code owner January 29, 2026 18:22
@alexweininger alexweininger requested a review from Copilot January 29, 2026 18:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-azureauth from 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.

@bwateratmsft
Copy link
Contributor

I'd also look at Copilot's remaining comments...

@alexweininger alexweininger merged commit 9eac2e2 into main Feb 5, 2026
3 checks passed
@alexweininger alexweininger deleted the alex/authv6 branch February 5, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants