-
Notifications
You must be signed in to change notification settings - Fork 149
Integrate DTS emulator with workspace view #4405
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
Merged
nturinski
merged 64 commits into
microsoft:main
from
philliphoff:philliphoff-emulator-integration
May 21, 2025
Merged
Changes from 63 commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
1d32cd2
Scaffold BDP.
philliphoff 4d9864d
Refactor type hierarchy.
philliphoff 7df4864
Sketch retrieval of task hubs.
philliphoff 9212ddc
Update task hub icon.
philliphoff c59c09a
Enable "open in portal" command for task hubs.
philliphoff 97ab3c7
Scaffold "open in dashboard" command.
philliphoff ad68a74
Sketch "open in dashboard" implementation.
philliphoff 9f457a5
Move DTS management to separate client type.
philliphoff 44c4d45
Support viewing task hub properties.
philliphoff 045a889
Split apart types.
philliphoff 56e0657
Add file headers.
philliphoff 872b8fb
Consolidate client logic and add localizable strings.
philliphoff f3d7506
Merge branch 'main' into philliphoff-dts-nodes
philliphoff bb92c76
Scaffold creation of task hub.
philliphoff f36b3c3
Sketch creation of schedulers.
philliphoff c986f37
Merge branch 'main' into philliphoff-manage-schedulers
philliphoff 5008def
Expose DTS creation from common new menu.
philliphoff b22d97d
Sketch deletion of task hubs.
philliphoff 2bf4748
Sketch deletion of schedulers.
philliphoff c741264
Sketch refreshing models post-creation.
philliphoff e3f1125
Add tree refresh to remainder of DTS commands.
philliphoff 0fe25f8
Provide extended schduler properties.
philliphoff 18fca77
Add provisioning state when not "normal".
philliphoff 19f70c2
Move creation command to top of context menu.
philliphoff db2d957
Add copy scheduler endpoint command.
philliphoff 5e7d1ea
Sketch copy connections string command.
philliphoff b61e5f5
Add task hub selection for connection string.
philliphoff abe8d29
Add async waits.
philliphoff 92c3f12
Wrap deletion in an activity.
philliphoff bbc47c0
Add some robustness to API call failures.
philliphoff 992c2f8
Tweak strings for task hub selection.
philliphoff b3f2022
Wrap task hub creation with activity.
philliphoff 0d5ee1a
Wrap task hub deletion with activity.
philliphoff 3b52269
Add retry for task hub retrieval.
philliphoff 1eb351e
Scaffold DTS emulators workspace tree.
philliphoff 7f29265
Sketch display of running DTS emulators.
philliphoff 9678041
Scaffold start/stop emulator commands.
philliphoff 59eb3e5
Implement stop emulator command.
philliphoff e34cdde
Implement start emulator command.
philliphoff 02092f9
Add open dashboard for emulator task hub.
philliphoff 2c9cd5f
Hide DTS commands from palette.
philliphoff 85fe2bc
Add verify providers step to scheduler creation.
philliphoff dc569e8
Un-hide create scheduler command.
philliphoff 6407f41
Sketch DTS setting.
philliphoff 0370550
Refactor DTS preview setting name.
philliphoff b8ae76e
Add preview features enabled check during create.
philliphoff 0c37245
Merge branch 'philliphoff-manage-schedulers' into philliphoff-emulato…
philliphoff e0f438c
Stop local emulators on shutdown.
philliphoff 837a90c
Add copy endpoint command to emulator items.
philliphoff 9061445
Add copy connection string for emulators.
philliphoff 5f3e223
Move emulator image details/defaults to configuration.
philliphoff d5b6867
Exclude stopped/paused emulator containers.
philliphoff 0512e95
Merge branch 'main' into philliphoff-emulator-integration
philliphoff ee0288f
Tweak emulator shutdown.
philliphoff 66dda84
Merge branch 'main' into philliphoff-emulator-integration
philliphoff 49d5100
Hide emulator commands from palette.
philliphoff 8446d46
Add missing headers.
philliphoff b14fd22
Improve container command error handling.
philliphoff 3aa7ba1
Auto-expand when emulators are running.
philliphoff 7c2d12b
Make primary commands more prominent.
philliphoff 3280a62
Merge branch 'main' into philliphoff-emulator-integration
philliphoff 068f326
Fixup bad merge.
philliphoff 5320cc1
Updates per PR feedback.
philliphoff 2cc041d
More updates per PR feedback.
philliphoff 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
58 changes: 58 additions & 0 deletions
58
src/commands/durableTaskScheduler/copyEmulatorConnectionString.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,58 @@ | ||
| /*--------------------------------------------------------------------------------------------- | ||
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||
| * Licensed under the MIT License. See License.txt in the project root for license information. | ||
| *--------------------------------------------------------------------------------------------*/ | ||
|
|
||
| import { type IActionContext } from "@microsoft/vscode-azext-utils"; | ||
| import { localize } from "../../localize"; | ||
| import { ext } from "../../extensionVariables"; | ||
| import { env, QuickPickItemKind, type QuickPickItem } from "vscode"; | ||
| import { type DurableTaskSchedulerEmulatorWorkspaceResourceModel } from "../../tree/durableTaskScheduler/DurableTaskSchedulerEmulatorWorkspaceResourceModel"; | ||
|
|
||
| export function copyEmulatorConnectionStringCommandFactory() { | ||
| return async (actionContext: IActionContext, scheduler: DurableTaskSchedulerEmulatorWorkspaceResourceModel | undefined): Promise<void> => { | ||
| if (!scheduler) { | ||
| throw new Error(localize('noSchedulerSelectedErrorMessage', 'No scheduler was selected.')); | ||
| } | ||
|
|
||
| const { endpointUrl } = scheduler; | ||
|
|
||
| let connectionString = `Endpoint=${endpointUrl};Authentication=None`; | ||
|
|
||
| const taskHubs = scheduler.taskHubs; | ||
|
|
||
| if (taskHubs.length > 0) { | ||
|
|
||
| const noTaskHubItem: QuickPickItem = { | ||
| detail: localize('noTaskHubDetail', 'Do not connect to a specific task hub.'), | ||
| label: localize('noTaskHubLabel', 'None') | ||
| } | ||
|
|
||
| const taskHubItems: QuickPickItem[] = | ||
| taskHubs.map(taskHub => ({ label: taskHub })); | ||
|
|
||
| const taskHubResult = await actionContext.ui.showQuickPick( | ||
| [ | ||
| noTaskHubItem, | ||
| { | ||
| kind: QuickPickItemKind.Separator, | ||
| label: localize('taskHubSepratorLabel', 'Task Hubs') | ||
| }, | ||
| ...taskHubItems | ||
| ], | ||
| { | ||
| canPickMany: false, | ||
| placeHolder: localize('taskHubSelectionPlaceholder', 'Select a task hub to connect to') | ||
| }); | ||
|
|
||
| if (taskHubResult && taskHubResult !== noTaskHubItem) { | ||
| connectionString += `;TaskHub=${taskHubResult.label}`; | ||
| } | ||
| } | ||
|
|
||
| await env.clipboard.writeText(connectionString); | ||
|
|
||
| ext.outputChannel.show(); | ||
| ext.outputChannel.appendLog(localize('schedulerConnectionStringCopiedMessage', 'Connection string copied to clipboard: {0}', connectionString)); | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| /*--------------------------------------------------------------------------------------------- | ||
| * Copyright (c) Microsoft Corporation. All rights reserved. | ||
| * Licensed under the MIT License. See License.txt in the project root for license information. | ||
| *--------------------------------------------------------------------------------------------*/ | ||
|
|
||
| import { type IActionContext } from "@microsoft/vscode-azext-utils"; | ||
| import { type DurableTaskSchedulerEmulatorClient } from "../../tree/durableTaskScheduler/DurableTaskSchedulerEmulatorClient"; | ||
|
|
||
| export function startEmulatorCommandFactory(emulatorClient: DurableTaskSchedulerEmulatorClient) { | ||
| return async (_: IActionContext) => { | ||
| await emulatorClient.startEmulator(); | ||
| }; | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.