SAP-samples / SAP-samples/codejam-code-based-agents

Python track: exercise 08's manifest.yml "command" field isn't reliably honored on newer CF CLI versions — needs a Procfile

Đang mở Phù hợp với người mới
#39 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Ngôn ngữ chính
Python
Star
54
Fork
36
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Summary

08-deploy-agent-to-cf.md instructs learners to set the start command via manifest.yml's command: field only:

​```yaml
command: python -m uvicorn server:app --host 0.0.0.0 --port $PORT --workers 1
No Procfile is mentioned anywhere in the exercise.

Effect
On cf push (reproduced on cf.exe version 8.6.1+b5a352a68.2023-02-27), staging fails with:

No start command specified by buildpack or via Procfile.
App will not start unless a command is provided at runtime.
despite manifest.yml's command: field being present and correctly formatted, exactly as the exercise instructs.

This appears to be a known behavior with CF CLI v7+/v8 — the command: manifest field is documented to work, but isn't always reliably honored during staging in practice. A Procfile is the more reliable mechanism. (This may be a Cloud Foundry platform/CLI-version issue rather than something specific to this repo's code — flagging here since it's a real, reproducible failure for anyone following the exercise as written, and the resulting error message gives no indication that a Procfile is the fix.)

Suggested fix
Add a Procfile (no file extension) alongside manifest.yml in the exercise instructions:
​ web: python -m uvicorn server:app --host 0.0.0.0 --port $PORT --workers 1 ​
Safe to include alongside the existing command: field in manifest.yml — redundant, not conflicting, and covers CF CLI versions/configurations where the manifest field alone isn't sufficient.

Environment
Reproduced on a personal SAP AI Core tenant, Python (CrewAI + LiteLLM) track, cf.exe version 8.6.1+b5a352a68.2023-02-27.

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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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 08-deploy-agent-to-cf.md và manifest.yml của bài tập, sau đó kiểm tra cách các hướng dẫn triển khai hiện chỉ định lệnh khởi động. Thêm Procfile đã đề cập bên cạnh manifest.yml với lệnh web được ghi trong tài liệu, giữ nguyên thiết lập manifest hiện có và xác minh rằng cf push cung cấp lệnh khởi động cũng như ứng dụng khởi động.

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

Đánh giá

Công nghệ
python
Lĩnh vực
cloud, documentation
Loại issue
Tài liệu
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
72/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.