-
Notifications
You must be signed in to change notification settings - Fork 141
Add DTS deploy activity log integration #4574
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
Open
MicroFish91
wants to merge
61
commits into
main
Choose a base branch
from
mwf/deploy-dts-activitylog
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
61 commits
Select commit
Hold shift + click to select a range
f858697
Add new storage type pick and host/local settings logic
MicroFish91 c84b288
Update host.json preview dep
MicroFish91 eb005a9
Install deps
MicroFish91 cbe1707
Update extension bundle
MicroFish91 4cb51ba
Update durable detection logic
MicroFish91 5d5e2dd
Remove extra prop
MicroFish91 8cb081c
Add .NET deps
MicroFish91 ffb7b43
Fix accidental change
MicroFish91 bd1c815
Revert todo
MicroFish91 d89c079
Add todo
MicroFish91 e201fe5
Update comment
MicroFish91 dece3e9
Update comment
MicroFish91 0e94b73
Fully working implementation
MicroFish91 e43c2aa
Update comment
MicroFish91 e96ceb9
Update comment again
MicroFish91 0529729
Formatting
MicroFish91 96eae40
Make storage connection type reuse logic more simple
MicroFish91 98dc295
Merge with main
MicroFish91 3a3512d
Merge branch 'main' of https://github.com/microsoft/vscode-azurefunct…
MicroFish91 612ec9c
Update connection types
MicroFish91 c676ce9
Revert autoformatting change
MicroFish91 2537cc2
Revert more autoformatting
MicroFish91 0da96c1
Add dts connection validation for azure deployment
MicroFish91 616f84b
Remove extra step
MicroFish91 a0f194b
Don't need to update this file
MicroFish91 5dfb869
Standardize name casing
MicroFish91 be7032e
Unexpected code path
MicroFish91 4284d23
Misc
MicroFish91 6d19b79
Fix some stuff, add location + todo
MicroFish91 34258ac
Misc
MicroFish91 7ba0ef6
WIP
MicroFish91 b9d4583
WIP
MicroFish91 414576e
Entire flow is working
MicroFish91 9a090e4
Add validation notes
MicroFish91 9942756
Rename step
MicroFish91 7282e90
Update validation logic for name availability
MicroFish91 b56e20a
Address todo
MicroFish91 9c96414
Update location logic
MicroFish91 71f11b7
Remove comment
MicroFish91 55169b8
Update location logic
MicroFish91 c73c58e
Add comment to validateDTSConnection
MicroFish91 8173f6a
Update comment
MicroFish91 1e34b0b
Revert deps
MicroFish91 4828629
Upgrade azure utils
MicroFish91 9cff4b3
Merge branch 'main' of https://github.com/microsoft/vscode-azurefunct…
MicroFish91 5f299ae
Merge with main
MicroFish91 08ff543
Revert accidental autoformatting
MicroFish91 6829729
Improve comment
MicroFish91 6874d6d
Update comment
MicroFish91 1f3810c
Add activity log integration
MicroFish91 181e7bc
Update title
MicroFish91 f2cd1a4
Improve activity log info items
MicroFish91 b594736
Update wizard title
MicroFish91 e83b450
Merge branch 'main' of https://github.com/microsoft/vscode-azurefunct…
MicroFish91 2691c1d
Update connection prompts
MicroFish91 ad25e4f
Add emulator started message
MicroFish91 cd67792
Merge with mwf/convinced-gray
MicroFish91 0c5afcd
Merge branch 'mwf/deploy-dts' of https://github.com/microsoft/vscode-…
MicroFish91 a1e2798
Merge with main
MicroFish91 59186c4
Re-upgrade package
MicroFish91 e03fe11
Fix merge
MicroFish91 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
.../appSettings/connectionSettings/durableTaskScheduler/azure/DTSStartingResourcesLogStep.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import { ActivityChildItem, ActivityChildType, activityInfoContext, activityInfoIcon, AzureWizardPromptStep, createContextValue, prependOrInsertAfterLastInfoChild, type ActivityInfoChild } from "@microsoft/vscode-azext-utils"; | ||
import { ext } from "../../../../../extensionVariables"; | ||
import { localize } from "../../../../../localize"; | ||
import { type IDTSAzureConnectionWizardContext } from "../IDTSConnectionWizardContext"; | ||
|
||
const startingResourcesContext: string = 'startingResourcesLogStepItem'; | ||
|
||
export class DTSStartingResourcesLogStep<T extends IDTSAzureConnectionWizardContext> extends AzureWizardPromptStep<T> { | ||
public hideStepCount: boolean = true; | ||
protected hasLogged: boolean = false; | ||
|
||
public async configureBeforePrompt(context: T): Promise<void> { | ||
if (this.hasLogged) { | ||
return; | ||
} | ||
|
||
if (context.resourceGroup) { | ||
prependOrInsertAfterLastInfoChild(context, | ||
new ActivityChildItem({ | ||
contextValue: createContextValue([startingResourcesContext, activityInfoContext]), | ||
label: localize('useResourceGroup', 'Use resource group "{0}"', context.resourceGroup.name), | ||
activityType: ActivityChildType.Info, | ||
iconPath: activityInfoIcon | ||
}) as ActivityInfoChild | ||
); | ||
ext.outputChannel.appendLog(localize('usingResourceGroup', 'Using resource group "{0}".', context.resourceGroup.name)); | ||
} | ||
|
||
if (context.site) { | ||
prependOrInsertAfterLastInfoChild(context, | ||
new ActivityChildItem({ | ||
label: localize('useFunctionApp', 'Use function app "{0}"', context.site.fullName), | ||
contextValue: createContextValue([startingResourcesContext, activityInfoContext]), | ||
activityType: ActivityChildType.Info, | ||
iconPath: activityInfoIcon, | ||
}) as ActivityInfoChild, | ||
); | ||
ext.outputChannel.appendLog(localize('usingFunctionApp', 'Using function app "{0}".', context.site.fullName)); | ||
} | ||
|
||
if (context.dts) { | ||
prependOrInsertAfterLastInfoChild(context, | ||
new ActivityChildItem({ | ||
label: localize('useDTS', 'Use durable task scheduler "{0}"', context.dts.name), | ||
contextValue: createContextValue([startingResourcesContext, activityInfoContext]), | ||
activityType: ActivityChildType.Info, | ||
iconPath: activityInfoIcon | ||
}) as ActivityInfoChild, | ||
); | ||
ext.outputChannel.appendLog(localize('usingDTS', 'Using durable task scheduler "{0}".', context.dts.name)); | ||
} | ||
|
||
if (context.dtsHub) { | ||
prependOrInsertAfterLastInfoChild(context, | ||
new ActivityChildItem({ | ||
label: localize('useDTSHub', 'Use durable task hub "{0}"', context.dtsHub.name), | ||
contextValue: createContextValue([startingResourcesContext, activityInfoContext]), | ||
activityType: ActivityChildType.Info, | ||
iconPath: activityInfoIcon, | ||
}) as ActivityInfoChild, | ||
); | ||
ext.outputChannel.appendLog(localize('usingDTSHub', 'Using durable task hub "{0}".', context.dtsHub.name)); | ||
} | ||
|
||
ext.outputChannel.appendLog(localize('prioritizingSiteLocation', 'Prioritizing site location: "{0}".', context.site?.location)); | ||
this.hasLogged = true; | ||
} | ||
|
||
public async prompt(): Promise<void> { | ||
// Don't prompt, just use to log starting resources | ||
} | ||
|
||
public shouldPrompt(): boolean { | ||
return false; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, sounds a little casual (and ominous) to me.
"Resource provisioning is in progress. This operation may take several minutes to complete."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's pretty ominous, it took almost 30 min for me once 🙃