Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vscode): Remove azure identity and restrict hybrid for public cloud #6215

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/vs-code-designer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"@azure/arm-appcontainers": "^2.0.0-beta.3",
"@microsoft/vscode-azureresources-api": "^2.0.2",
"@azure/arm-resourcegraph": "^4.2.1",
"@azure/identity": "^4.5.0",
"@types/adm-zip": "^0.5.1",
"@types/fs-extra": "^11.0.4",
"@types/vscode": "1.76.0",
Expand Down
12 changes: 8 additions & 4 deletions apps/vs-code-designer/src/LogicAppResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { ResourceGraphClient } from '@azure/arm-resourcegraph';
import { LogicAppResourceTree } from './app/tree/LogicAppResourceTree';
import { logicAppFilter } from './constants';
import { ext } from './extensionVariables';
import { DefaultAzureCredential } from '@azure/identity';

export class LogicAppResolver implements AppResourceResolver {
private siteCacheLastUpdated = 0;
Expand Down Expand Up @@ -48,8 +47,7 @@ export class LogicAppResolver implements AppResourceResolver {
subContext: ISubscriptionContext
): Promise<{ logicApps: Map<string, Site>; hybridLogicApps: Map<string, ContainerApp> }> {
const client = await createWebSiteClient({ ...context, ...subContext });
const credential = new DefaultAzureCredential();
const resourceGraphClient = new ResourceGraphClient(credential);
const resourceGraphClient = new ResourceGraphClient(subContext.credentials);

if (this.siteCacheLastUpdated < Date.now() - 1000 * 3) {
this.siteCacheLastUpdated = Date.now();
Expand Down Expand Up @@ -98,8 +96,14 @@ export class LogicAppResolver implements AppResourceResolver {
});
});

const resolverPromises = [promiseLogicApp];

if (subContext.environment.resourceManagerEndpointUrl === 'https://management.azure.com/') {
resolverPromises.push(promiseHybridLogicApp);
}

this.listLogicAppsTask = new Promise((resolve, reject) => {
Promise.all([promiseLogicApp, promiseHybridLogicApp])
Promise.all(resolverPromises)
.then(() => {
resolve();
})
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading