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
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 54
- Fork
- 36
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da 08-deploy-agent-to-cf.md e dal manifest.yml dell'esercizio, quindi controlla come le istruzioni di distribuzione specificano attualmente il comando di avvio. Aggiungi il Procfile menzionato accanto a manifest.yml con il comando web documentato, mantieni l'impostazione esistente del manifest e verifica che cf push fornisca un comando di avvio e che l'applicazione si avvii.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- cloud, documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Tranquilla
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 72/100