bug(jobs): maxRunAttempts=1 reads back as 0
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
調査の方向性
go/job.go にあるピン留めされた Go Job API と、MaxRunAttempts のシリアライズを検証する request-builder テストから始めます。create request と、正確な ID による readback、および生成された multi-machine スキーマにおける zero の扱いを比較します。standalone Jobs が 1 という明示的な値を保持するのか、権威ある no-retry ポリシーを公開するのかを明らかにし、その契約がテストまたはドキュメントに反映されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Environment
- SDK:
github.com/lightning-ai/sdk/go - Version:
v0.0.0-20260903140713-8e137645d1a6 - Upstream commit/tag:
8e137645d1a6b829533f0bf3cc11d2abc6c7291d/v2026.09.03 - Machine:
CPU_SMALL(cpu-2) - Job: non-interruptible
The standalone-Job SDK contract says 0 means unset/backend default and 1
means one attempt with no retries. Its request builder maps
JobOptions.MaxRunAttempts to spec.maxRunAttempts, and its tests verify that
field is serialized. The generated multi-machine schema is more specific: it
calls 0 "unset (legacy, no retries)." The corresponding guarantee is not
stated for standalone Jobs.
Minimal reproduction
With github.com/lightning-ai/sdk/go imported as lit and authenticated
teamspace and studio handles already resolved:
interruptible := false
job, err := lit.RunJob("retry-policy-reproducer", lit.Machine("cpu-2"), "true", lit.JobOptions{
Teamspace: teamspace,
Studio: studio,
Interruptible: &interruptible,
MaxRunAttempts: 1,
})
if err != nil {
log.Fatal(err)
}
defer func() { _ = job.Stop() }()
fmt.Printf("created: max=%d current=%d\n", job.MaxRunAttempts(), job.CurrentRunAttempt())
readback, err := lit.GetJob(job.Name(), lit.JobOptions{Teamspace: teamspace})
if err != nil {
log.Fatal(err)
}
fmt.Printf("readback: max=%d current=%d\n", readback.MaxRunAttempts(), readback.CurrentRunAttempt())
The observed job was submitted through the Python SDK with
max_run_attempts=1. Both Python and the pinned Go SDK read the same exact job
back as 0; the Go SDK source and unit tests independently establish that its
create path serializes nonzero MaxRunAttempts. We did not spend another live
job merely to repeat the same backend request through Go.
Expected
The created and subsequently fetched job retain maxRunAttempts=1, or the API
returns another authoritative field proving that the job cannot retry.
Actual
The submission path set max_run_attempts=1, but the created job and later
exact-ID readback reported:
current_run_attempt=1
max_run_attempts=0
The job was stopped before entering Running; started_at remained null.
Impact
For a cost-bounded executor, current_run_attempt=1 only describes the current
history. It does not prove that a second attempt cannot occur after a later
failure. Because the documented meaning of 0 is "unset/backend default," the
readback cannot attest the requested no-retry policy before compute effects.
The safe response is therefore to reject and stop the job.
Questions
- Is normalizing
maxRunAttempts=1to0intentional? - For standalone Jobs, does
0have the same stable legacy-no-retry meaning
documented for multi-machine jobs, or may a backend default retry? - If
0guarantees no retries, can that guarantee be documented in the
standalone-Job API and exposed as an effective retry policy? - Otherwise, can the service preserve and return the explicit value
1?
References
- 主要言語
- Python
- スター
- 13
- フォーク
- 4
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 40
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Lightning-AI/sdk のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Lightning-AI/sdk#259 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
Lightning-AI/sdk#171 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
Lightning-AI/sdk#132 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
Lightning-AI/sdk の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
openfoodfacts/openfoodfacts-python#573 ·
メンテナーはふだん 2 日以内に返信
-
Rasterio reads over HTTPS do not send the Earthdata token and return 500 "HTTP response code: 404"オープンcredentials rasterio
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
developmentseed/titiler-cmr#359 ·
メンテナーはふだん 1 日以内に返信
-
namespace team:operations
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
EclipseFdn/open-vsx.org#16444 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
EbookFoundation/free-programming-books#13696 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信