github-samples / github-samples/pets-workshop

1-hour workshop: Fail startup clearly when dependencies or services do not start

Open
#259 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: P0
Dominant language
Python
Stars
80
Forks
161
Avg merge
31m
Merged PRs (30d)
1

Description

Problem

The learner setup depends entirely on the startup scripts, but failure handling can report a misleading success state. In app/scripts/start-app.sh, npm install is not checked before npm run dev starts. In app/scripts/start-app.ps1, a failed Node dependency installation emits a warning and continues. Both scripts wait a fixed five seconds and then print both service URLs without checking that Flask and Astro are ready.

This makes common setup failures look like browser or workshop problems and gives independent learners little actionable feedback.

Suggested change

Make both startup scripts stop on dependency installation failures and verify service/process readiness before announcing success.

Acceptance criteria

  • A failed Python or Node dependency install exits nonzero with a clear message.
  • Failure of either Flask or Astro stops the other managed process.
  • URLs are printed only after both services are ready.
  • Cleanup still works on Ctrl+C and partial startup failures.
  • macOS/Linux and Windows paths have equivalent behavior.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with app/scripts/start-app.sh and app/scripts/start-app.ps1, tracing dependency installation, the fixed five-second wait, service URL output, and cleanup paths. Run both startup scripts while simulating failed Python or Node installation and Flask or Astro startup; done means failures are nonzero and clear, managed processes stop together, URLs appear only after both services are ready, and Ctrl+C or partial startup cleanup still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.