fix(api): DELETE /sandboxes/{id} returns 500/404 with no structured log — root cause invisible
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 58/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- go
- 領域
- api, backend, observability
調査の方向性
DeleteSandboxesSandboxID handler から開始し、ErrSandboxOperationFailed、not-found パス、deleteSnapshot の失敗を含む、各 terminal error ブランチを調査します。文書化された DELETE シナリオを再現し、その後、各レスポンスによって sandbox_id、team_id、および完全なエラーを適切なレベルで含む構造化ログが生成されることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Problem
DeleteSandboxesSandboxID can return HTTP 500 or 404 with no structured log entry that explains why, making production incidents hard to diagnose.
500 — ErrSandboxOperationFailed path has no log at all
case errors.Is(err, orchestrator.ErrSandboxOperationFailed):
a.sendAPIStoreError(c, http.StatusInternalServerError, ...) // no log, no telemetry
return
This is the most common 500 cause (node unreachable, gRPC error during kill), yet nothing is written to Loki and no span error is recorded. The only signal is the ALB upstream status code.
404 — logged at Debug level, missing teamID
logger.L().Debug(ctx, "Sandbox not found for deletion", logger.WithSandboxID(sandboxID))
Debug level is suppressed in production by default, so 404 responses leave no queryable trace. There is also no teamID field, preventing per-team filtering.
deleteSnapshot failure message is ambiguous
telemetry.ReportError(ctx, "error deleting sandbox", ...) does not distinguish between a kill failure and a snapshot DB failure.
Impact
- On-call cannot distinguish node crash (500) from DB error (500) without reading gRPC traces
- 404 frequency per team is invisible — no Loki query possible
- Incident response requires guessing which layer failed
Reproduction
Any DELETE /sandboxes/{id} where:
- The orchestrator node is unreachable → 500 with zero log
- The sandbox never existed → 404 with zero visible log
Expected behaviour
Each terminal branch emits a structured log at the appropriate level (Error / Info) with sandbox_id, team_id, and the full error field so operators can query Loki directly.
- 主要言語
- Go
- スター
- 1.6k
- フォーク
- 438
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
e2b-dev/runtime のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
sandbox cache: StartRemoving state transition not broadcast, all allocations see stale Running stateオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
e2b-dev/runtime の issue をすべて見る
似ている issue
-
area/proxy kind/bug priority/backlog triage/accepted
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
lexfrei/cloudflare-tunnel-gateway-controller#840 ·
メンテナーはふだん 1 日以内に返信
-
area:chat bug sev:papercut
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
Agent-Field/CodeAF#1592 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 7 日以内に返信
-
bug needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug P2 reliability
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
afreidah/s3-orchestrator#1564 ·
メンテナーはふだん 1 日以内に返信