github-samples / github-samples/pets-workshop
full-day workshop: Make the generated devcontainer startup portable and non-blocking
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 80
- Fork
- 161
- Merge medio
- 31m
- PR unite (30g)
- 1
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da content/full-day/3-codespaces.md e app/scripts/start-app.sh; esamina come viene generato postStartCommand e come lo script gestisce entrambi i servizi. Esegui i test con un nome del repository diverso da pets-workshop e arrestando e riavviando un Codespace, verificando il completamento del ciclo di vita, i log visibili di Flask e Astro, riavvii prevedibili e l’assenza di processi duplicati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- flask, python, shell
- Ambito
- developer-experience, devops
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 55/100