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
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 54
- Forks
- 36
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Öffne exercises/Python/08-deploy-agent-to-cf.md und überprüfe den Abschnitt „Update requirements.txt“ in den Zeilen 255-282. Füge den Schritt zur lokalen Installation hinzu und vermerke, dass er vor dem lokalen Testen erforderlich ist, während Cloud Foundry die Anforderungen während der Bereitstellung installiert. Überprüfe, dass die gerenderte Übung klar zwischen lokalem Testen und cf push unterscheidet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Aktivitätsstatus
- Ruhig
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 88/100