Skip to content

Conversation

@bwateratmsft
Copy link
Contributor

No description provided.

*--------------------------------------------------------------------------------------------*/

import type { AzureSubscriptionProvider } from "@microsoft/vscode-azext-azureauth";
import { type AzureDevOpsSubscriptionProviderInitializer, createAzureDevOpsSubscriptionProviderFactory } from "@microsoft/vscode-azext-azureauth/azdo";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should move this out so it's actually in the test code, and thus all the stuff doesn't get bundled.

await provider.signIn();
} finally {
_isLoggingIn = false;
// TODO: do we need this or does the session change event take care of it?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: Do

let selectedTenant: TenantIdDescription | undefined = undefined;

const subscriptions = await subscriptionProvider.getSubscriptions(false);
const subscriptions = await subscriptionProvider.getAvailableSubscriptions({ filter: false });
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This can be reduced to just the getAvailableSubscriptions call

} else {
// All tenants are authenticated but no subscriptions exist
// The prior behavior was to still show the Select Subscriptions item in this case
// TODO: this isn't exactly right? Should we throw a `NotSignedInError` instead?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: Do

for await (const tenant of tenants) {
const isSignedIn = await subscriptionProvider.isSignedIn(nonNullProp(tenant, 'tenantId'), account);
for await (const tenant of allTenants) {
// TODO: This is n^2 which is not great, but the number of tenants is usually quite small
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: Do? Tenants can be as high as 650+...

return getSignInTreeItems(false);
}

// TODO: Else do we throw? What did we do before?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

TODO: Do

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