Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors how Spark tools and the Runtime CLI extension are updated and started in the dev container by introducing a unified refresh script, cleaning up duplicate logic, and updating container startup commands.
- Introduce
.devcontainer/refreshTools.shto handle fetching and installing the latest CLI extension and Spark SDK/tools - Add
.devcontainer/postStartCommand.shto invoke the refresh script and launch Spark services after container start - Remove inline download logic from
onCreate.shand updatedevcontainer.jsonto use the new scripts and explicit port forwarding
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.devcontainer/refreshTools.sh |
New script to upgrade the Runtime CLI, download the latest release, and install Spark tools with marker-based caching |
.devcontainer/postStartCommand.sh |
New post-start script that calls refreshTools.sh and backgrounds all Spark services |
.devcontainer/onCreate.sh |
Removed duplicated download/install logic for Spark tools |
.devcontainer/devcontainer.json |
Switched postStartCommand to use the new script and defined forwardPorts |
Comments suppressed due to low confidence (2)
.devcontainer/devcontainer.json:12
postStartCommandin devcontainer.json must be a string or array of strings, not an object. Replace this object with a single string (e.g. ".devcontainer/postStartCommand.sh") or an array of commands.
"postStartCommand": {
.devcontainer/devcontainer.json:13
- The
portsproperty is not valid insidepostStartCommand. If this is intended as port forwarding, move it under the top-levelforwardPortsarray or remove it.
"ports": "gh cs ports visibility 5000:public -c $CODESPACE_NAME",
cmbrose
commented
May 2, 2025
eljog
reviewed
May 5, 2025
salvador-barboza
approved these changes
May 8, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This update introduces improvements to the dev container setup by restructuring the logic for tool installation and execution:
Tool Installation and Updates:
onCreateCommandto a dedicatedrefreshToolsscript.refreshToolsscript is now invoked during thepostStartCommand(instead ofonCreateCommand, ensuring that tools are updated and initialized at both create and resume time.refreshToolsuses marker files to ensure that we don't keep repulling tools if the version hasn't changedTool Invocation:
postStartCommandscript