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

appservice: Refactor deployment code into steps #1554

Merged
merged 19 commits into from
Jan 23, 2024
Merged

Conversation

nturinski
Copy link
Member

No description provided.

@nturinski nturinski requested a review from a team as a code owner August 10, 2023 18:43
// Docker values point to the user's specific image, which we don't want to track
return /^docker/i.test(linuxFxVersion) ? 'docker' : linuxFxVersion;
const innerContext: InnerDeployContext = Object.assign(context, { site, fsPath, client, aspPromise });
const title: string = l10n.t('Deploying to function app "{0}"', site.fullName);
Copy link
Member

Choose a reason for hiding this comment

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

Function is used by App Service and Functions so title needs to either be generic or handle both cases.

Suggested change
const title: string = l10n.t('Deploying to function app "{0}"', site.fullName);
const title: string = l10n.t('Deploying to "{0}"', site.fullName);

Copy link
Member Author

Choose a reason for hiding this comment

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

I changed it to just "app".

callback: (zipStream: Readable) => Promise<AzExtPipelineResponse | void>
}): Promise<AzExtPipelineResponse | void> {

function onFileSize(size: number): void {
context.telemetry.measurements.zipFileSize = size;
const zipFileSize = vscode.l10n.t('Zip package size: {0}', prettybytes(size));
ext.outputChannel.appendLog(vscode.l10n.t('Zip package size: {0}', prettybytes(size)), { resourceName: site.fullName });
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ext.outputChannel.appendLog(vscode.l10n.t('Zip package size: {0}', prettybytes(size)), { resourceName: site.fullName });
ext.outputChannel.appendLog(zipFileSize, { resourceName: site.fullName });

import { Progress, ProgressLocation, l10n, window } from "vscode";
import { InnerDeployContext } from "../IDeployContext";

export abstract class DeployExecuteBaseStep extends AzureWizardExecuteStep<InnerDeployContext> {
Copy link
Member

Choose a reason for hiding this comment

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

DeployExecuteStepBase might be a better name.

@alexweininger
Copy link
Member

Overall looks really good. I tested it myself with a few simple Function App deploys.

alexweininger
alexweininger previously approved these changes Aug 14, 2023
Copy link
Member

@alexweininger alexweininger left a comment

Choose a reason for hiding this comment

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

Fix da linter

@nturinski
Copy link
Member Author

Bump 👊

@nturinski
Copy link
Member Author

I think this is ready to review/approve btw.

alexweininger
alexweininger previously approved these changes Dec 12, 2023
Copy link
Member

@alexweininger alexweininger left a comment

Choose a reason for hiding this comment

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

I approve, however, lets properly plan out when we'll actually release this. I don't think we want to include this in the upcoming releases.

@JasonYeMSFT
Copy link
Contributor

JasonYeMSFT commented Dec 13, 2023

FYI, the zip deployment code has been modified on main. I don't know why there isn't any merge conflict.

@nturinski
Copy link
Member Author

nturinski commented Dec 19, 2023

Probably because it's all in new files. I'll be sure to transfer the changes over.

Oh never mind, I guess I still have runWithZipStream too. But it seems like git was smart enough to incorporate all of the changes from main. Nice!

@nturinski
Copy link
Member Author

I think everything is okay with this one. Gonna go ahead and just merge it with Alex's dismissed approval

@nturinski nturinski merged commit 5ddc769 into main Jan 23, 2024
4 checks passed
@nturinski nturinski deleted the nat/deploySteps branch January 23, 2024 01:42
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.

3 participants