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

Add backward compatibility to API in support of the new managed identity features #816

Merged
merged 39 commits into from
Jan 10, 2025

Conversation

MicroFish91
Copy link
Contributor

@MicroFish91 MicroFish91 commented Dec 27, 2024

Partially addresses #719

Updates the api consumed by functions so that it keeps working in face of all the new features we've added related to managed identities

@MicroFish91 MicroFish91 changed the base branch from main to mwf/gentle-amber December 27, 2024 00:05
@MicroFish91 MicroFish91 marked this pull request as ready for review December 27, 2024 00:37
@MicroFish91 MicroFish91 requested a review from a team as a code owner December 27, 2024 00:37
@@ -38,12 +48,14 @@ export async function deployWorkspaceProjectApi(deployWorkspaceProjectOptions: a
rootFolder,
srcPath: srcPath ? Uri.file(srcPath).fsPath : undefined,
dockerfilePath: dockerfilePath ? Uri.file(dockerfilePath).fsPath : undefined,
newRegistryCredentialType: RegistryCredentialType.DockerLogin,
Copy link
Contributor Author

@MicroFish91 MicroFish91 Dec 27, 2024

Choose a reason for hiding this comment

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

We need additional discussions about whether we want to default to managed identity here in the future. For now, I'm keeping it as Docker Login to preserve existing behavior.

@@ -9,7 +9,7 @@ import type * as api from "./vscode-azurecontainerapps.api";

export function getAzureContainerAppsApiProvider(): apiUtils.AzureExtensionApiProvider {
return createApiProvider([<api.AzureContainerAppsExtensionApi>{
// Todo: Change this to 0.0.2 later. 0.0.2 is backwards compatible anyway so this change should be fine either way.
// Todo: Change this to 0.0.3 later. 0.0.3 is backwards compatible anyway so this change should be fine either way.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When we eventually add managed identity support for the api, I will bump the major version

Copy link
Member

Choose a reason for hiding this comment

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

Okay, but just so you know, this changing is purely aesthetic. semver doesn't actually register this as a different version number since there's no major version number.

shouldSaveDeploySettings: !!shouldSaveDeploySettings,
});

const deployWorkspaceProjectContext: DeployWorkspaceProjectContext = await deployWorkspaceProjectInternal(deployWorkspaceProjectInternalContext, {
suppressActivity: true,
suppressConfirmation,
suppressRegistryPrompt: suppressRegistryPrompt ?? true,
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 PR introduced the prompt, so add ability to suppress and default it to true to preserve existing behavior

@MicroFish91 MicroFish91 marked this pull request as draft December 27, 2024 00:44
@MicroFish91 MicroFish91 marked this pull request as ready for review December 27, 2024 01:01
@@ -17,4 +17,6 @@ export interface DockerLoginRegistryCredentialsContext extends CreateAcrContext,

newRegistrySecret?: Secret;
newRegistryCredential?: RegistryCredentials;

suppressEnableAdminUserPrompt?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

Can't this just check suppressConfirmation?

Copy link
Contributor Author

@MicroFish91 MicroFish91 Jan 9, 2025

Choose a reason for hiding this comment

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

I don't think that prop exists on the context currently. There is the suppressNotification option in user settings for resources, but I don't think we want to follow that here because this prompt is ordinarily one that I would always want to show.

The version of suppressConfirmation we are using here is an explicit option that is being passed into the deployWorkspaceProjectInternal command, primarily added to enable api calls from outside extensions.

Base automatically changed from mwf/gentle-amber to main January 10, 2025 02:14
@MicroFish91 MicroFish91 merged commit 73a4b34 into main Jan 10, 2025
2 checks passed
@MicroFish91 MicroFish91 deleted the mwf/grim-sapphire branch January 10, 2025 02:22
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