Skip to content

Add deployRevisionDraft support for all revision modes#414

Merged
MicroFish91 merged 8 commits intomainfrom
mwf/revision-draft-alt-4
Jul 28, 2023
Merged

Add deployRevisionDraft support for all revision modes#414
MicroFish91 merged 8 commits intomainfrom
mwf/revision-draft-alt-4

Conversation

@MicroFish91
Copy link
Copy Markdown
Contributor

@MicroFish91 MicroFish91 commented Jul 27, 2023

Closes #311

Demo (Same as the one shown in previous revision draft PRs)

@MicroFish91
Copy link
Copy Markdown
Contributor Author

MicroFish91 commented Jul 27, 2023

Made a few additional changes since the original (demo). What's been added:

  • Prevent deploying a new revision when no unsaved changes are detected by throwing an error (mostly a command palette-based concern).
  • Don't show the deploy icon on the RevisionDraftItem when unsaved changes are not detected in multiple revisions mode

@MicroFish91 MicroFish91 marked this pull request as ready for review July 27, 2023 22:17
@MicroFish91 MicroFish91 requested a review from a team as a code owner July 27, 2023 22:17
@MicroFish91 MicroFish91 force-pushed the mwf/revision-draft-alt-4 branch from c8e9c33 to 516ef8f Compare July 27, 2023 22:31
@MicroFish91 MicroFish91 force-pushed the mwf/revision-draft-alt-4 branch from 516ef8f to 876f2e4 Compare July 27, 2023 22:50
export class DeployRevisionDraftConfirmStep extends AzureWizardPromptStep<IDeployRevisionDraftContext> {
public async prompt(context: IDeployRevisionDraftContext): Promise<void> {
await context.ui.showWarningMessage(
localize('deployRevisionWarning', 'This will deploy a new revision to container app "{0}".', context.containerApp?.name),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should steer away from the word "revision" since we don't really expose that anywhere else. We should probably just have something to the effect that we're "Deploying to container app" or "Updating container app" or something.

@MicroFish91 MicroFish91 force-pushed the mwf/revision-draft-alt-4 branch from 2b8b9bd to 8d0669a Compare July 28, 2023 19:38
@MicroFish91 MicroFish91 merged commit e3ae022 into main Jul 28, 2023
@MicroFish91 MicroFish91 deleted the mwf/revision-draft-alt-4 branch July 28, 2023 19:43
export class DeployRevisionDraftConfirmStep extends AzureWizardPromptStep<IDeployRevisionDraftContext> {
public async prompt(context: IDeployRevisionDraftContext): Promise<void> {
await context.ui.showWarningMessage(
localize('deployRevisionWarning', 'This will deploy any unsaved changes to container app "{0}".', context.containerApp?.name),
Copy link
Copy Markdown
Member

@nturinski nturinski Jul 28, 2023

Choose a reason for hiding this comment

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

I think we should probably say something more similar to deploy.

Are you sure you want to deploy changes to "{0}"? This will overwrite your previous deployment.

await context.ui.showWarningMessage(
localize('deployRevisionWarning', 'This will deploy any unsaved changes to container app "{0}".', context.containerApp?.name),
{ modal: true },
{ title: localize('continue', 'Continue') }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would have this title be "Deploy"

const containerAppEnvelope = await getContainerEnvelopeWithSecrets(context, context.subscription, containerApp);
containerAppEnvelope.template = nonNullProp(context, 'template');

const creatingRevision: string = localize('creatingRevision', 'Creating revision...');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Still says revision here.


if (containerApp.revisionsMode === KnownActiveRevisionsMode.Multiple) {
// Display the name of the newly created revision when in multiple revisions mode
context.activityTitle = localize('deployRevision', 'Deploy revision "{0}" to container app "{1}"', updatedContainerApp.latestRevisionName, containerApp.name);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Still says revision here.

@microsoft microsoft locked and limited conversation to collaborators Mar 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable revision updates through editing container app envelope JSON

3 participants