Skip to content

Activity children and output log support for deployWorkspaceProject#464

Merged
MicroFish91 merged 56 commits intomainfrom
mwf/deployWorkspaceProject-VIII
Oct 8, 2023
Merged

Activity children and output log support for deployWorkspaceProject#464
MicroFish91 merged 56 commits intomainfrom
mwf/deployWorkspaceProject-VIII

Conversation

@MicroFish91
Copy link
Copy Markdown
Contributor

@MicroFish91 MicroFish91 commented Sep 26, 2023

Closes #425
Closes #457

Additions:

  • Add output log/activity children to important steps of the deployWorkspaceProject flow

demo

@MicroFish91 MicroFish91 changed the title Mwf/deploy workspace project viii Activity children and output log support for deployWorkspaceProject Sep 26, 2023
@MicroFish91 MicroFish91 marked this pull request as ready for review September 27, 2023 17:13
@MicroFish91 MicroFish91 requested a review from a team as a code owner September 27, 2023 17:13
Base automatically changed from mwf/deployWorkspaceProject-VII to main September 28, 2023 19:47
@MicroFish91 MicroFish91 force-pushed the mwf/deployWorkspaceProject-VIII branch from c8f4bb8 to e75a78a Compare September 28, 2023 20:29
@MicroFish91 MicroFish91 changed the base branch from main to mwf/activityWrapperUtils September 29, 2023 17:52
context.activityChildren?.push(
new GenericTreeItem(undefined, {
contextValue: createActivityChildContext(['environmentVariablesListStep', setEnvironmentVariableOption, activitySuccessContext]),
label: localize('saveEnvVarsLabel', 'Save environment variable configuration for the container app'),
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.

Just wondering, but what do you think about wording it as "Save container app's environment variable configuration"? Ending it with for the container app sounds clunky to me.

Maybe just remove "for the container app" entirely as well since it's kind of implied (being under it as a child after all)

}

// Need to place this outside of 'initSuccessOutput' so we can use the image after it has had a chance to become defined
(this.success.output as string[])?.push(localize('useImage', 'Using image "{0}".', context.image));
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'm not entirely sure why this is part of the successOutput. Wouldn't you want this to be displayed even if it fails? I'm also not sure what's the difference between context.image and context.imageName?

Copy link
Copy Markdown
Contributor Author

@MicroFish91 MicroFish91 Oct 5, 2023

Choose a reason for hiding this comment

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

context.image is a more full version of the image name that gets assigned after it finishes building. It would include the full <acrName>.azurecr.io/<imageName>:<tag>...

We wouldn't want to show that as part of the fail output because if this fails, the whole command fails and we wouldn't be able to proceed any further to use the image (I assume because the remote image would not exist)


protected initFailOutput(context: IBuildImageInAzureContext): ExecuteActivityOutput {
return {
item: new GenericTreeItem(undefined, {
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.

The failure won't be output by the build image step also?

Copy link
Copy Markdown
Contributor Author

@MicroFish91 MicroFish91 Oct 5, 2023

Choose a reason for hiding this comment

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

This one is kind of confusing and I wasn't sure what kind of comment to leave for this. My understanding is basically the building starts in this RunStep... but the actual meaningful output gets detected in the following step BuildImageStep. Thus, what we want to actually display on success doesn't exist yet, so I defer showing a success output until we can confirm it in the following step.

For the fail, we can still trigger a fail-point within this step still, so we should still define the potential fail output here.

return {
item: new GenericTreeItem(undefined, {
contextValue: createActivityChildContext(['registryCreateStep', activitySuccessContext]),
label: localize('createRegistryLabel', 'Create Azure Container Registry "{0}"', context.newRegistryName),
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'd just say "Create registry". Bit weird that you have all of the other resources be generic, and this one is branded.

label: saveSettingsLabel,
iconPath: activitySuccessIcon
}),
output: localize('savedSettingsSuccess', 'Saved deployment settings to workspace: "{0}".', relativeSettingsFilePath)
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.

Weird that this one has a colon, but the other resources output messages do not.

new GenericTreeItem(undefined, {
contextValue: createActivityChildContext(['useExistingResourceGroup', activitySuccessContext]),
label: localize('useResourceGroup', 'Use resource group "{0}"', resourceGroupName),
iconPath: activitySuccessIcon
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.

This is bit of an aside, but should we have another icon for children that are just relaying information? It's kind of weird to me that we'd have green checkmarks for all of these.

Not something we need to decide on now, just curious.

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.

Yeah, I agree, it might look cool to experiment with the icons for these

Copy link
Copy Markdown
Contributor Author

@MicroFish91 MicroFish91 Oct 5, 2023

Choose a reason for hiding this comment

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

Just playing around with the icon... and these are out of order, but thoughts? We can add another time though if we find something cool.

image

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.

Yeah, I do prefer this. It's still a bit busy in my opinion, but better.

Maybe even just a dash or a bullet point would work?

new GenericTreeItem(undefined, {
contextValue: createActivityChildContext(['ingressPromptStep', activitySuccessContext]),
label: context.enableIngress ?
localize('ingressEnableLabel', 'Enable ingress on port {0} (found Dockerfile configuration)', context.targetPort) :
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'd prefer we said (from Dockerfile configuration) rather than found.

Copy link
Copy Markdown
Member

@nturinski nturinski left a comment

Choose a reason for hiding this comment

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

Approving but with expectation some refactors happen in another PR

Base automatically changed from mwf/activityWrapperUtils to main October 8, 2023 04:50
@MicroFish91 MicroFish91 force-pushed the mwf/deployWorkspaceProject-VIII branch from 0e23da5 to 07cc7a1 Compare October 8, 2023 05:15
@MicroFish91 MicroFish91 merged commit e6069fd into main Oct 8, 2023
@MicroFish91 MicroFish91 deleted the mwf/deployWorkspaceProject-VIII branch October 8, 2023 05:18
@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.

Fail to execute "Deploy Project from Workspace..." command Implement the Click2Run command

2 participants