Skip to content

Add deployImage as part of API export, add additional activity children, and allow more flexible deployment targets#817

Merged
MicroFish91 merged 46 commits intomainfrom
mwf/excellent-tan
Jan 10, 2025
Merged

Add deployImage as part of API export, add additional activity children, and allow more flexible deployment targets#817
MicroFish91 merged 46 commits intomainfrom
mwf/excellent-tan

Conversation

@MicroFish91
Copy link
Copy Markdown
Contributor

@MicroFish91 MicroFish91 commented Dec 27, 2024

Partially addresses: #719

Docker extension currently is calling into the command directly, but I wanted to expose the command as part of the extension API, so I reorganized it that way and added a backwards compatibility wrapper to keep everything working the same so Docker doesn't have to update anything.

I also made the command less opinionated by allowing the user to pick revision containers as well, basically allowing the command to deploy to all possible resource targets (instead of assuming the latest single revision mode container apps). This required adding an optional context value for the Template.

I also added two new activity children to the command to better indicate when registry credentials were added to the container app envelope.

Examples:
image

image

@MicroFish91 MicroFish91 changed the title Add deployImageApi to list of command exports and add updated activity children Add deployImageApi to list of api exports and add updated activity children Dec 30, 2024
@MicroFish91 MicroFish91 changed the title Add deployImageApi to list of api exports and add updated activity children Add deployImageApi to api export and add updated activity children Dec 30, 2024
@MicroFish91 MicroFish91 changed the title Add deployImageApi to api export and add updated activity children Add deployImageApi as part of API export and add updated activity children Dec 30, 2024
@MicroFish91 MicroFish91 changed the title Add deployImageApi as part of API export and add updated activity children Add deployImageApi to API export, add additional activity children, and allow more flexible deployment targets Dec 30, 2024
@MicroFish91 MicroFish91 changed the title Add deployImageApi to API export, add additional activity children, and allow more flexible deployment targets Add deployImage as part of API export, add additional activity children, and allow more flexible deployment targets by template Dec 30, 2024
@MicroFish91 MicroFish91 changed the title Add deployImage as part of API export, add additional activity children, and allow more flexible deployment targets by template Add deployImage as part of API export, add additional activity children, and allow more flexible deployment targets Dec 30, 2024
@MicroFish91 MicroFish91 marked this pull request as ready for review December 30, 2024 21:23
@MicroFish91 MicroFish91 requested a review from a team as a code owner December 30, 2024 21:23
}

// The interface of the command options passed to the Azure Container Apps extension's deployImageToAca command
// This interface is shared with the Docker extension (https://github.com/microsoft/vscode-docker)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Carryover of existing interface, but moved into the api type definition

import { type ContainerRegistryImageSourceContext } from "../image/imageSource/containerRegistry/ContainerRegistryImageSourceContext";
import { type DeployImageContext } from "./DeployImageContext";

export async function deployImage(context: IActionContext & Partial<ContainerRegistryImageSourceContext>, node: ContainerItem): Promise<void> {
Copy link
Copy Markdown
Contributor Author

@MicroFish91 MicroFish91 Dec 31, 2024

Choose a reason for hiding this comment

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

New changes:

  1. Wizard context now includes containersIdx and template which are used to allow targets to each revision's container while in multiple revisions mode
  2. Added activity children for logging the existing resource group and container app to keep formatting similar to the other major commands


export type DeployImageApiContext = ImageSourceBaseContext & ExecuteActivityContext & SetTelemetryProps<TelemetryProps>;

export async function deployImageApi(deployImageOptions: DeployImageToAcaOptionsContract): Promise<void> {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This function is all carryover code except with a new callWithTelemetryAndErrorHandling wrapper

Base automatically changed from mwf/grim-sapphire to main January 10, 2025 02:22
@MicroFish91 MicroFish91 merged commit ea2d2f0 into main Jan 10, 2025
@MicroFish91 MicroFish91 deleted the mwf/excellent-tan branch January 10, 2025 18: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