Skip to content

Commit 1063dc9

Browse files
committed
Merge with main
2 parents 24d04c5 + 8b6a8e7 commit 1063dc9

File tree

88 files changed

+517
-193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+517
-193
lines changed

package.json

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,9 @@
8181
"category": "Azure Container Apps"
8282
},
8383
{
84-
"command": "containerApps.deployImage",
85-
"title": "%containerApps.deployImage%",
86-
"category": "Azure Container Apps",
87-
"icon": "$(cloud-upload)"
84+
"command": "containerApps.updateImage",
85+
"title": "%containerApps.updateImage%",
86+
"category": "Azure Container Apps"
8887
},
8988
{
9089
"command": "containerApps.deployImageApi",
@@ -350,8 +349,8 @@
350349
"group": "5@1"
351350
},
352351
{
353-
"command": "containerApps.deployImage",
354-
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /containerAppItem/i",
352+
"command": "containerApps.updateImage",
353+
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /containerAppItem(.*)revisionMode:single/i",
355354
"group": "6@1"
356355
},
357356
{
@@ -399,6 +398,11 @@
399398
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /revisionItem(.*)revisionState:active/i",
400399
"group": "2@4"
401400
},
401+
{
402+
"command": "containerApps.updateImage",
403+
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /revisionDraft:false(.*)revisionItem/i",
404+
"group": "3@1"
405+
},
402406
{
403407
"command": "containerApps.deployRevisionDraft",
404408
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /revisionDraftItem(.*)unsavedChanges:true/i",
@@ -420,10 +424,15 @@
420424
"group": "1@2"
421425
},
422426
{
423-
"command": "containerApps.editRevisionDraft",
427+
"command": "containerApps.updateImage",
424428
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /revisionDraftItem/i",
425429
"group": "2@1"
426430
},
431+
{
432+
"command": "containerApps.editRevisionDraft",
433+
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /revisionDraftItem/i",
434+
"group": "3@1"
435+
},
427436
{
428437
"command": "containerApps.editScaleRange",
429438
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /scaleItem/i",
@@ -541,6 +550,11 @@
541550
"%containerApps.deleteConfirmation.ClickButton%"
542551
],
543552
"default": "EnterName"
553+
},
554+
"containerApps.showDraftCommandDeployPopup": {
555+
"type": "boolean",
556+
"description": "%containerApps.showDraftCommandDeployPopup%",
557+
"default": true
544558
}
545559
}
546560
}

package.nls.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,21 @@
44
"containerApps.revealResource": "Reveal Resource",
55
"containerApps.description": "An Azure Container Apps extension for Visual Studio Code.",
66
"containerApps.enableOutputTimestamps": "Prepends each line displayed in the output channel with a timestamp.",
7+
"containerApps.showDraftCommandDeployPopup": "Show an informational deploy pop-up message whenever a draft command is run.",
78
"containerApps.browse": "Browse",
89
"containerApps.createContainerApp": "Create Container App...",
910
"containerApps.createContainerAppFromWorkspace": "Create Container App from Workspace...",
1011
"containerApps.editContainerApp": "Edit Container App (Advanced)...",
12+
<<<<<<< HEAD
1113
"containerApps.deployImage": "Update Container App Image...",
1214
"containerApps.deployImageApi": "Update Container App Image (API)...",
1315
"containerApps.deployWorkspaceProject": "Deploy Workspace Project...",
1416
"containerApps.deployWorkspaceProjectToContainerApp": "Deploy Workspace to Container App...",
17+
=======
18+
"containerApps.updateImage": "Update Container Image...",
19+
"containerApps.deployImageApi": "Deploy Image to Container App (API)...",
20+
"containerApps.deployWorkspaceProject": "Deploy Project from Workspace...",
21+
>>>>>>> 8b6a8e78961895378a4931b7e95c79b032b7d3a1
1522
"containerApps.deleteContainerApp": "Delete Container App...",
1623
"containerApps.disableIngress": "Disable Ingress for Container App",
1724
"containerApps.enableIngress": "Enable Ingress for Container App...",

src/commands/deployImage/ContainerAppOverwriteConfirmStep.ts renamed to src/commands/ContainerAppOverwriteConfirmStep.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
import { KnownActiveRevisionsMode } from "@azure/arm-appcontainers";
77
import { AzureWizardPromptStep, nonNullProp } from "@microsoft/vscode-azext-utils";
88
import type { MessageItem } from "vscode";
9-
import type { ContainerAppModel } from "../../tree/ContainerAppItem";
10-
import { localize } from "../../utils/localize";
11-
import type { IDeployImageContext } from "./deployImage";
9+
import type { ContainerAppModel } from "../tree/ContainerAppItem";
10+
import { localize } from "../utils/localize";
11+
import type { IContainerAppContext } from "./IContainerAppContext";
1212

13-
export class ContainerAppOverwriteConfirmStep extends AzureWizardPromptStep<IDeployImageContext> {
13+
export class ContainerAppOverwriteConfirmStep<T extends IContainerAppContext> extends AzureWizardPromptStep<T> {
1414
public hideStepCount: boolean = true;
1515

16-
public async prompt(context: IDeployImageContext): Promise<void> {
16+
public async prompt(context: T): Promise<void> {
1717
const containerApp: ContainerAppModel = nonNullProp(context, 'containerApp');
1818
const warning: string = containerApp.revisionsMode === KnownActiveRevisionsMode.Single ?
1919
localize('confirmDeploySingle', 'Are you sure you want to deploy to "{0}"? This will overwrite the active revision and unsupported features in VS Code will be lost.', containerApp.name) :
@@ -23,12 +23,12 @@ export class ContainerAppOverwriteConfirmStep extends AzureWizardPromptStep<IDep
2323
await context.ui.showWarningMessage(warning, { modal: true, stepName: 'confirmDestructiveDeployment' }, ...items);
2424
}
2525

26-
public shouldPrompt(context: IDeployImageContext): boolean {
26+
public shouldPrompt(context: T): boolean {
2727
return !!context.containerApp && this.hasUnsupportedFeatures(context);
2828
}
2929

3030
// Check for any portal features that VS Code doesn't currently support
31-
private hasUnsupportedFeatures(context: IDeployImageContext): boolean {
31+
private hasUnsupportedFeatures(context: T): boolean {
3232
const containerApp: ContainerAppModel = nonNullProp(context, 'containerApp');
3333
if (containerApp.template?.volumes) {
3434
return true;

src/commands/EXECUTE_PRIORITY.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,53 +22,56 @@ When creating or updating resources, execute steps should occupy certain priorit
2222

2323
- RegistryCreateStep: 350
2424

25-
### 3. Image Source
25+
### 3. Image
2626

2727
<b>Priority Range</b>: 400 - 490
2828

29-
#### Build Image in Azure Steps
29+
#### General Steps
30+
##### Build Image in Azure Steps
3031

3132
- TarFileStep: 420
3233
- UploadSourceCodeStep: 430
3334
- RunStep: 440
3435
- BuildImageStep: 450
3536
- ContainerRegistryImageConfigureStep: 470
3637

37-
#### Container Registry Steps
38+
##### Container Registry Steps
3839

3940
- ContainerRegistryImageConfigureStep: 470
4041

41-
#### Common Steps
42+
#### `updateImage` Steps
4243

43-
- ContainerAppUpdateStep: 480 (Todo - investigate decoupling this command from imageSource when revision draft update support is added)
44+
- UpdateRegistryAndSecretsStep: 480
45+
- UpdateImageDraftStep: 490 (revision draft)
4446

45-
### 4. Environment Variables
47+
### 4. Unallocated Space
4648

4749
<b>Priority Range</b>: 500 - 590
4850

4951
#### Steps
5052

5153
Reserved
5254

53-
### 5. Ingress
55+
### 5. Container App
5456

5557
<b>Priority Range</b>: 600 - 690
5658

5759
#### Steps
5860

59-
- EnableIngressStep: 650
60-
- DisableIngressStep: 650
61+
- ContainerAppCreateStep: 620
62+
- ContainerAppUpdateStep: 650
6163

62-
- TargetPortUpdateStep: 650 (single command only)
63-
- ToggleIngressVisibilityStep: 650 (single command only)
64-
65-
### 6. Container App
64+
### 6. Ingress
6665

6766
<b>Priority Range</b>: 700 - 790
6867

6968
#### Steps
7069

71-
- ContainerAppCreateStep: 750
70+
- EnableIngressStep: 750 (update existing container app)
71+
- DisableIngressStep: 750 (update existing container app)
72+
73+
- TargetPortUpdateStep: 750 (single command only)
74+
- ToggleIngressVisibilityStep: 750 (single command only)
7275

7376
### 7. Secrets
7477

@@ -93,8 +96,7 @@ Reserved
9396

9497
#### Steps
9598

96-
- ScaleRangeUpdateStep: 1110
97-
- AddScaleRuleStep: 1120
99+
- AddScaleRuleStep: 1120 (revision draft)
98100

99101
### 10. Unallocated Space
100102

src/commands/createContainerApp/ContainerAppCreateStep.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ import { ExecuteActivityOutput, ExecuteActivityOutputStepBase } from "../../util
1313
import { createActivityChildContext } from "../../utils/activity/activityUtils";
1414
import { createContainerAppsAPIClient } from "../../utils/azureClients";
1515
import { localize } from "../../utils/localize";
16-
import { getContainerNameForImage } from "../deployImage/imageSource/containerRegistry/getContainerNameForImage";
16+
import { getContainerNameForImage } from "../image/imageSource/containerRegistry/getContainerNameForImage";
1717
import type { ICreateContainerAppContext } from "./ICreateContainerAppContext";
1818

1919
export class ContainerAppCreateStep extends ExecuteActivityOutputStepBase<ICreateContainerAppContext> {
20-
public priority: number = 750;
20+
public priority: number = 620;
2121

2222
protected async executeCore(context: ICreateContainerAppContext, progress: Progress<{ message?: string | undefined; increment?: number | undefined }>): Promise<void> {
2323
const appClient: ContainerAppsAPIClient = await createContainerAppsAPIClient(context);

src/commands/createContainerApp/ICreateContainerAppContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { ManagedEnvironment } from '@azure/arm-appcontainers';
77
import type { IResourceGroupWizardContext } from '@microsoft/vscode-azext-azureutils';
88
import type { ExecuteActivityContext } from '@microsoft/vscode-azext-utils';
99
import type { IContainerAppContext } from '../IContainerAppContext';
10-
import type { ImageSourceBaseContext } from '../deployImage/imageSource/ImageSourceBaseContext';
10+
import type { ImageSourceBaseContext } from '../image/imageSource/ImageSourceBaseContext';
1111
import type { IngressContext } from '../ingress/IngressContext';
1212

1313
export interface ICreateContainerAppContext extends IResourceGroupWizardContext, ImageSourceBaseContext, IngressContext, IContainerAppContext, ExecuteActivityContext {

src/commands/createContainerApp/createContainerApp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type { ManagedEnvironmentItem } from "../../tree/ManagedEnvironmentItem";
1313
import { createActivityContext } from "../../utils/activity/activityUtils";
1414
import { localize } from "../../utils/localize";
1515
import { pickEnvironment } from "../../utils/pickItem/pickEnvironment";
16-
import { ImageSourceListStep } from "../deployImage/imageSource/ImageSourceListStep";
16+
import { ImageSourceListStep } from "../image/imageSource/ImageSourceListStep";
1717
import { IngressPromptStep } from "../ingress/IngressPromptStep";
1818
import { ContainerAppCreateStep } from "./ContainerAppCreateStep";
1919
import { ContainerAppNameStep } from "./ContainerAppNameStep";

src/commands/deployImage/deployImage.ts

Lines changed: 0 additions & 54 deletions
This file was deleted.

src/commands/deployWorkspaceProject/DeployWorkspaceProjectContext.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import type { ExecuteActivityContext } from "@microsoft/vscode-azext-utils";
77
import type { ICreateContainerAppContext } from "../createContainerApp/ICreateContainerAppContext";
88
import type { IManagedEnvironmentContext } from "../createManagedEnvironment/IManagedEnvironmentContext";
9-
import type { IBuildImageInAzureContext } from "../deployImage/imageSource/buildImageInAzure/IBuildImageInAzureContext";
10-
import type { CreateAcrContext } from "../deployImage/imageSource/containerRegistry/acr/createAcr/CreateAcrContext";
9+
import type { IBuildImageInAzureContext } from "../image/imageSource/buildImageInAzure/IBuildImageInAzureContext";
10+
import type { CreateAcrContext } from "../image/imageSource/containerRegistry/acr/createAcr/CreateAcrContext";
1111

1212
// Use intersection typing instead of an interface here to bypass some minor (relatively trivial) type mismatch issues introduced by having to use the 'Partial' utility
1313
export type DeployWorkspaceProjectContext = IManagedEnvironmentContext & ICreateContainerAppContext & CreateAcrContext & Partial<IBuildImageInAzureContext> & ExecuteActivityContext & {

src/commands/deployWorkspaceProject/deployWorkspaceProject.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ import { ContainerAppItem, ContainerAppModel, isIngressEnabled } from "../../tre
1313
import { ManagedEnvironmentItem } from "../../tree/ManagedEnvironmentItem";
1414
import { createActivityChildContext, createActivityContext } from "../../utils/activity/activityUtils";
1515
import { localize } from "../../utils/localize";
16+
import { ContainerAppOverwriteConfirmStep } from "../ContainerAppOverwriteConfirmStep";
1617
import { browseContainerApp } from "../browseContainerApp";
1718
import { ContainerAppCreateStep } from "../createContainerApp/ContainerAppCreateStep";
1819
import { LogAnalyticsCreateStep } from "../createManagedEnvironment/LogAnalyticsCreateStep";
1920
import { ManagedEnvironmentCreateStep } from "../createManagedEnvironment/ManagedEnvironmentCreateStep";
20-
import { ContainerAppOverwriteConfirmStep } from "../deployImage/ContainerAppOverwriteConfirmStep";
21-
import { ContainerAppUpdateStep } from "../deployImage/ContainerAppUpdateStep";
22-
import { ImageSourceListStep } from "../deployImage/imageSource/ImageSourceListStep";
21+
import { ContainerAppUpdateStep } from "../image/imageSource/ContainerAppUpdateStep";
22+
import { ImageSourceListStep } from "../image/imageSource/ImageSourceListStep";
2323
import { IngressPromptStep } from "../ingress/IngressPromptStep";
2424
import { DeployWorkspaceProjectConfirmStep } from "./DeployWorkspaceProjectConfirmStep";
2525
import type { DeployWorkspaceProjectContext } from "./DeployWorkspaceProjectContext";

0 commit comments

Comments
 (0)