github-samples / github-samples/pets-workshop

full-day workshop: Make the generated devcontainer startup portable and non-blocking

Đang mở
#263 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

priority: P0
Ngôn ngữ chính
Python
Star
80
Fork
161
Merge trung bình
31 phút
Pull request đã merge (30 ngày)
1

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với content/full-day/3-codespaces.md và app/scripts/start-app.sh; kiểm tra cách postStartCommand được tạo và cách script xử lý cả hai dịch vụ. Kiểm thử với tên repository khác pets-workshop, đồng thời dừng và khởi động lại một Codespace, xác minh việc hoàn tất vòng đời, các log Flask và Astro hiển thị, việc khởi động lại có thể dự đoán được và không có các process trùng lặp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
flask, python, shell
Lĩnh vực
developer-experience, devops
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
55/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.