From d110f02a96131be7c4d19ab7ab8bc71c732893ee Mon Sep 17 00:00:00 2001 From: Naoyuki Sogo Date: Thu, 3 Sep 2026 11:28:45 +0900 Subject: [PATCH 1/2] docs: note WHEEL_DEBUG_METADATA_{JSON,XML} overwrite behavior MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dump path is fixed (the env-var value, no component name / suffix) and written with node:fs/promises writeFile (flag 'w', truncate): - multiple inputFiles in one HPCI-SS / HPCISS-tar component => a single dump (gatherComponentMetadata / componentMetadataToXml run once per _hpcissHandler call; extra inputFiles only add wheel.workflow xattr targets). - 2+ HPCI-SS components, or one component re-run in a loop => each run overwrites the same path; only the last survives. Each dump is a whole-project snapshot. Documented in gfarm.md's "デバッグ用メタデータ書き出し" section with a new "上書き挙動" subsection, plus a discoverability pointer from configuration.md section 4 (WHEEL_* env var list). Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_017xw6DdyQhrdTZMjYbKvFZi --- documentMD/design/configuration.md | 7 +++++++ documentMD/design/gfarm.md | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/documentMD/design/configuration.md b/documentMD/design/configuration.md index b8d47791..34529b2f 100644 --- a/documentMD/design/configuration.md +++ b/documentMD/design/configuration.md @@ -103,6 +103,13 @@ WHEELの設定は **c12** ライブラリを使用してロードされ、複数 | `WHEEL_ANONYMOUS_LOGIN` | `YES` に設定すると匿名ログインユーザーを作成し認証を有効化 | | `WHEEL_ANONYMOUS_PASSWORD` | 匿名ユーザーのパスワード(省略時はランダム生成) | +### デバッグ変数(環境変数専用・`server.json` にマッピングされない) + +| 環境変数 | 説明 | +|---------|------| +| `WHEEL_DEBUG_METADATA_JSON` | HPCI-SS メタデータJSONを指定パスに書き出す。固定パスへ毎回上書き(詳細・上書き挙動は `gfarm.md` の「デバッグ用メタデータ書き出し」節を参照) | +| `WHEEL_DEBUG_METADATA_XML` | 同上のXML版 | + ## 5. 型の自動変換(coerce) 環境変数はすべて文字列として渡されるため、以下のルールで自動変換される。 diff --git a/documentMD/design/gfarm.md b/documentMD/design/gfarm.md index 268cca17..f2ab09ac 100644 --- a/documentMD/design/gfarm.md +++ b/documentMD/design/gfarm.md @@ -244,6 +244,24 @@ gfarm:///path/to/project/output # プロジェクト配下 WHEEL_DEBUG_METADATA_XML=/tmp/debug_metadata.xml npm start -w server ``` +#### 上書き挙動 + +書き出し先は環境変数で指定した**固定パス**で、コンポーネント名や連番は付与されない。 +`writeFile`(`node:fs/promises`、フラグ `w` = truncate)で書き込むため、既存内容は毎回上書きされる。 + +- **1つの HPCI-SS / HPCISS-tar コンポーネント内に `inputFiles` が複数ある場合** — 書き出しは + **1回だけ**。`gatherComponentMetadata` / `componentMetadataToXml` は `_hpcissHandler` + (`dispatcher.js`)内で1回のみ呼ばれ、複数の `inputFiles` は Gfarm 拡張属性 + `wheel.workflow` の付与先が増えるだけで、生成される JSON/XML は共通。 +- **プロジェクト内に HPCI-SS / HPCISS-tar コンポーネントが2つ以上ある場合、または同一コンポーネントが + loop 内・再実行で複数回実行される場合** — 実行のたびに同じパスへ書き出すため上書きされ、 + **最後の実行分だけが残る**。 +- 各書き出しはその時点の**プロジェクト全体のスナップショット**(対象コンポーネントだけではない)。 + 実行タイミングが異なれば各コンポーネントの `state` 等が変わり、内容も異なり得る。 + +複数コンポーネント分をすべて残したい場合は、パスへ連番/コンポーネントID/タイムスタンプを +付与する改修が必要(現状の実装では非対応)。 + ## 9. タイムアウト設定 各GFarm操作関数はデフォルトのタイムアウト(秒)が設定されている。 From 51a44d150e9279b032cd47f3cdb24a8baac2b643 Mon Sep 17 00:00:00 2001 From: "version-number-updater[bot]" Date: Thu, 3 Sep 2026 11:35:55 +0900 Subject: [PATCH 2/2] [skip ci] update version number --- server/app/db/version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/app/db/version.json b/server/app/db/version.json index 6604efce..128da255 100644 --- a/server/app/db/version.json +++ b/server/app/db/version.json @@ -1 +1 @@ -{"version": "2026-0902-123259-beta" } \ No newline at end of file +{"version": "2026-0903-113554-beta" } \ No newline at end of file