github-samples / github-samples/pets-workshop
full-day workshop: Make the generated devcontainer startup portable and non-blocking
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 80
- Forks
- 161
- Avg merge
- 31m
- Merged PRs (30d)
- 1
Description
Problem
Step 0 allows a repository name chosen by the learner or workshop leader, but content/full-day/3-codespaces.md hard-codes this startup command:
"postStartCommand": "chmod +x /workspaces/pets-workshop/app/scripts/start-app.sh && /workspaces/pets-workshop/app/scripts/start-app.sh"
It fails when the generated repository is not named pets-workshop. In addition, start-app.sh deliberately waits for both application processes and does not exit, so using it directly as a lifecycle command can leave the Codespaces startup task running indefinitely.
Suggested change
Use the dev container workspace variable or a workspace-relative command, and launch the long-running application through a non-blocking mechanism appropriate for dev containers.
Acceptance criteria
- The command works for any repository name allowed by Step 0.
- The dev container lifecycle command completes after starting the services.
- Flask and Astro logs remain accessible to the learner.
- Both services restart predictably after a Codespace stop/start.
- Service cleanup does not leave duplicate processes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with content/full-day/3-codespaces.md and app/scripts/start-app.sh; inspect how postStartCommand is generated and how the script handles both services. Test with a repository name other than pets-workshop and a Codespace stop/start, verifying lifecycle completion, visible Flask and Astro logs, predictable restarts, and no duplicate processes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, python, shell
- Domain
- developer-experience, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100