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

Abierto Apto para principiantes
#39 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
Python
Estrellas
54
Forks
36
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con 08-deploy-agent-to-cf.md y el manifest.yml del ejercicio; después, comprueba cómo especifican actualmente las instrucciones de despliegue el comando de inicio. Añade el Procfile mencionado junto a manifest.yml con el comando web documentado, conserva la configuración existente del manifiesto y verifica que cf push proporcione un comando de inicio y que la aplicación se inicie.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
cloud, documentation
Tipo de issue
Documentación
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Tranquilo
Claridad
Bien especificado
Aptitud para principiantes
72/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.