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

Python track: exercise 08 doesn't mention re-running pip install after updating requirements.txt for local testing

Đang mở Phù hợp với người mới
#38 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

The "Update requirements.txt" section (08-deploy-agent-to-cf.md:255-282) instructs learners to add crewai[a2a] and a2a-sdk[http-server] to requirements.txt, then moves straight into creating manifest.yml for Cloud Foundry deployment. There's no pip install -r requirements.txt (or equivalent) command shown anywhere in the exercise.

Effect

This works fine for the actual CF deployment, since CF's Python buildpack automatically runs pip install -r requirements.txt during cf push — the deployed app gets the new dependencies without any local action needed.

However, if a learner wants to test the A2A server locally before deploying (a reasonable thing to want to do, and not explicitly discouraged anywhere), editing requirements.txt alone doesn't install anything into their existing venv. Running the server locally at that point fails with ModuleNotFoundError: No module named 'a2a', since the new packages were never actually installed — only added to a text file.

Suggested fix

Add an explicit step after the requirements.txt update, e.g.:
bash pip install -r requirements.txt ​
with a short note that this is needed if testing locally before cf push (even though CF's buildpack handles it automatically during deployment).

Environment

Reproduced on a personal SAP AI Core tenant, Python (CrewAI + LiteLLM) track, testing the A2A server locally before Cloud Foundry deployment.

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

Mở exercises/Python/08-deploy-agent-to-cf.md và xem lại phần “Update requirements.txt” ở các dòng 255-282. Thêm bước cài đặt cục bộ và ghi chú rằng bước này là cần thiết trước khi kiểm thử cục bộ, trong khi Cloud Foundry cài đặt các requirements trong quá trình triển khai. Xác minh rằng bài tập đã được render phân biệt rõ ràng giữa kiểm thử cục bộ và cf push.

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
documentation
Loại issue
Tài liệu
Độ khó
1/5
Thời gian dự kiến
Dưới một 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
88/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.