-
Notifications
You must be signed in to change notification settings - Fork 24
Hydrate repo from remote #50
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
Conversation
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.
Pull Request Overview
Adds support for hydrating the repository from a remote snapshot URL and ensures project dependencies are installed in the devcontainer.
- Introduce a condition to run
hydrate.shin the background whenSNAPSHOT_SAS_URLis provided. - Log hydration output to
hydration.login the workspace. - Append
npm iat the end of the startup script to install dependencies.
.devcontainer/postStartCommand.sh
Outdated
| # Check if SNAPSHOT_SAS_URL was passed, if so run hydrate.sh in background | ||
| if [ -n "$SNAPSHOT_SAS_URL" ]; then | ||
| WORKSPACE_DIR="/workspaces/spark-template" | ||
| SAS_URI="$SNAPSHOT_SAS_URL" /usr/local/bin/hydrate.sh $WORKSPACE_DIR > $WORKSPACE_DIR/hydration.log 2>&1 & |
Copilot
AI
May 28, 2025
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.
Quote the redirection path to handle potential spaces in the workspace directory, e.g., > "$WORKSPACE_DIR/hydration.log".
| SAS_URI="$SNAPSHOT_SAS_URL" /usr/local/bin/hydrate.sh $WORKSPACE_DIR > $WORKSPACE_DIR/hydration.log 2>&1 & | |
| SAS_URI="$SNAPSHOT_SAS_URL" /usr/local/bin/hydrate.sh $WORKSPACE_DIR > "$WORKSPACE_DIR/hydration.log" 2>&1 & |
.devcontainer/postStartCommand.sh
Outdated
| supervisorctl reread | ||
| supervisorctl update | ||
|
|
||
| npm i |
Copilot
AI
May 28, 2025
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.
Consider switching to npm ci for deterministic installs and ensure it runs in the project root, e.g., cd $WORKSPACE_DIR && npm ci.
| npm i | |
| WORKSPACE_DIR="/workspaces/spark-template" | |
| cd $WORKSPACE_DIR && npm ci |
| "$SCRIPT_DIR/refreshTools.sh" | ||
|
|
||
| # Check if SNAPSHOT_SAS_URL was passed, if so run hydrate.sh in background | ||
| if [ -n "$SNAPSHOT_SAS_URL" ]; then |
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.
We will need some indicator to know when this is finished
No description provided.