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
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 54
- 派生
- 36
- PR 合并指标
- 30 天内没有已合并 PR
描述
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.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
打开 exercises/Python/08-deploy-agent-to-cf.md,查看第 255-282 行的“Update requirements.txt”部分。添加本地安装步骤,并注明在本地测试之前需要执行该步骤,而 Cloud Foundry 会在部署期间安装 requirements。确认渲染后的练习清楚地区分本地测试和 cf push。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 活跃度
- 冷清
- 描述清晰度
- 描述清楚
- 新手友好度
- 88/100