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

オープン 初心者向け
#39 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
54
フォーク
36
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

08-deploy-agent-to-cf.md と演習の manifest.yml から始め、デプロイ手順で現在どのように起動コマンドを指定しているかを確認します。言及されている Procfile を manifest.yml と同じ場所に、文書化されている web コマンドとともに追加し、既存の manifest 設定は維持して、cf push が起動コマンドを提供し、アプリが起動することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
cloud, documentation
issue の種類
ドキュメント
難易度
2/5
見積もり時間
1〜3時間
活発さ
静か
明瞭さ
明確に書かれている
初心者へのやさしさ
72/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。