-
Notifications
You must be signed in to change notification settings - Fork 138
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
base: main
Are you sure you want to change the base?
Integrate DTS emulator with workspace view #4405
Conversation
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
@nturinski Thanks for taking a look.
The emulator is just a Docker container; there's nothing to install or uninstall really (save pulling/removing an image). I'll think about whether we can show/hide the workspace node based on the existence of the image (and then have a command that just pulls it). I feel that's not terribly discoverable, though.
Well that's not good; I'll try to repro and resolve that. |
I think if the node could instruct users on where/how to get the image, that could be helpful. Like a disabled/enabled state? That way we could still have the discoverability regardless. |
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
@nturinski The image will be auto-pulled if/when the user attempts to start the container, so there's nothing they need to do (aside from Docker being running). That said, I've added some robustness to the Docker management logic, and on errors the DTS Emulators node will show a warning node with the error (e.g. "is Docker installed and running?"). I've also updated the root node to auto-expand only if emulators are already running. This should make the feature a little less "in your face" if you're not actually using it. |
Would you want to try to start the Docker runtime for the user if it's not already running? I know there are other runtimes, but I think most devs still use Docker. Mostly suggesting it because I was using the dev containers feature in VS Code today and it auto started Docker desktop for me so it's fresh in my mind. |
@alexweininger I talked to the Docker extension team and they, themselves, do not automatically start the container runtime so I'm hesitant to try to do that in this case. (Just trying to understand which runtime is in use and how to start it would be a significant concern--I'm using the Docker extension client library to abstract away the runtime being used, so the extension doesn't actually know.) |
@alexweininger Those are good ideas and I've added inline commands for opening the taskhub dashboard, as well as for starting and stopping emulator instances. |
@alexweininger Bump. (Not in any hurry, just don't want to forget about it myself.) |
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.
There were a couple of times get children returned an empty array or the context values were joined with a space. I didn't feel like I needed to comment on every single one, but if you'd like me to just so it's easier to identify where those all are, I can do that.
src/tree/durableTaskScheduler/DurableTaskSchedulerEmulatorClient.ts
Outdated
Show resolved
Hide resolved
src/tree/durableTaskScheduler/DurableTaskSchedulerEmulatorsWorkspaceResourceModel.ts
Show resolved
Hide resolved
src/tree/durableTaskScheduler/DurableTaskSchedulerEmulatorsWorkspaceResourceModel.ts
Show resolved
Hide resolved
src/tree/durableTaskScheduler/DurableTaskSchedulerErrorWorkspaceResourceModel.ts
Outdated
Show resolved
Hide resolved
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.
Overall looks good to me. Let me know whenever you're done-- any approval I do now is just going to get stale.
src/tree/durableTaskScheduler/DurableTaskSchedulerErrorWorkspaceResourceModel.ts
Outdated
Show resolved
Hide resolved
@philliphoff I'm going to hold off on merging this for just a couple of days. We had CTI run a release test pass this week and we were planning to release today or Monday. We'll release again soon including this and other DTS changes. |
No worries! Thanks for taking the time to review! |
Adds a DTS emulator node to the Workspace view of the Azure Resources explorer, which will show running DTS emulator instances. This node offers the ability to start new emulator instances. Emulator nodes, like in the Azure Resources view, offers the abilities:
The DTS settings have been updated to allow customization (i.e. registry, image, tag) of the emulator container image. Emulators started by the VS Code instance will be shutdown when the instance is closed. (Emulators started outside of the VS Code instance will not be shutdown.)
Note: the emulator features are not hidden behind the "preview features" toggle as they are (as of now) available to all.