dockerContainerStats: the first container of every refresh keeps docker stats' clear-screen codes in its id
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 75/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- docker, typescript
調査の方向性
docker-stats.service.ts の DockerStatsService.processStatsLine(92 行目)から始めます。issue によるとエスケープコードが削除されている箇所です。正規表現を、再現例の erase-display シーケンスおよび cursor-home シーケンスと比較します。必要に応じて、useDockerContainerStats.ts と DockerContainerStatCell.vue で報告された ID の照合動作を確認します。更新のたびに、公開されるすべての ID が期待されるサーバー ID および container ID の形式に一致すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Environment
Unraid OS Version: 7.3.4 (Docker 29.8.2)
Are you using a reverse proxy? No
Pre-submission Checklist
- I have verified that my Unraid OS is up to date
- I have tested this issue by accessing my server directly (not through a reverse proxy)
- This is not an Unraid Connect related issue
Issue Description
DockerStatsService.processStatsLine (docker-stats.service.ts:92) strips escape codes with /\x1B\[[0-9;]*[mK]/g. That removes colour and erase-line codes but not the erase-display and cursor-home pair (\x1B[J\x1B[H) that docker stats writes at every refresh, so the first container of every refresh is published with the pair in front of its ID, and a client that matches stats to containers by ID never gets that container's stats. The Docker overview component would show "—" for it, since it stores stats under the published ID (useDockerContainerStats.ts:18) and looks them up by the container's ID (DockerContainerStatCell.vue:16), but it is not enabled on 7.3.4 (DockerContainersPageModification.shouldApply returns false).
Steps to Reproduce
- On the server, run
docker stats --format '{{.ID}}' --no-trunc | od -c: every refresh starts with033 [ J 033 [ Hbefore the first ID. - Subscribe to
subscription { dockerContainerStats { id } }. - Watch the IDs for a few seconds.
Expected Behavior
Every ID is <server-id>:<container-id>.
Actual Behavior
The first ID of each refresh is <server-id>:\u001b[J\u001b[H<container-id>, the same container every time here. Replaying 7 s of docker stats output from this server (33 containers, 12 refreshes) through DockerStatsService, 12 of the 396 published IDs match no running container.
Additional Context
Stripping every CSI sequence fixes it: /\x1B\[[0-9;?]*[ -/]*[@-~]/g. The socket-based rewrite proposed in #2008 (for #2007) would also remove it, since it stops parsing docker stats output. #2120 is a different problem in the same service.
- 主要言語
- TypeScript
- スター
- 123
- フォーク
- 25
- 平均マージ
- 2日 16時間
- マージ済み PR(30日)
- 9
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
unraid/api のほかの issue
-
Temperature metrics: lm-sensors voltages, fan speeds and power are reported as temperatures (°C)オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
flash { guid } always fails: resolver no longer returns guid but the schema marks it non-nullableオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
yavorsky/unbuilt.app#65 ·
-
CVE security
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
mckinsey/agents-at-scale-ark#4091 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
factory:subtask
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
NUS-Project-SaBai/project-sabai#386 ·
メンテナーはふだん 3 日以内に返信
-
android needs clarification
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
super-productivity/super-productivity#12105 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信