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

Offen Anfängerfreundlich
#39 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Python
Sterne
54
Forks
36
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit 08-deploy-agent-to-cf.md und der manifest.yml der Übung und prüfe anschließend, wie die Bereitstellungsanweisungen derzeit den Startbefehl angeben. Füge die erwähnte Procfile neben manifest.yml mit dem dokumentierten web-Befehl hinzu, behalte die vorhandene Einstellung im Manifest bei und überprüfe, dass cf push einen Startbefehl bereitstellt und die App startet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
cloud, documentation
Issue-Typ
Dokumentation
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Ruhig
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
72/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.