toXlsx: the same input gives a different file on every call (zip timestamps)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
調査の方向性
packages/pivotkit-core/src/xlsx.js の250行目付近を読み、更新日時フィールドに関するfflateのzipオプションを確認してください。toXlsx に modified オプションを追加し、各zipエントリに渡してください。テストでは固定の日付を使用します。同じグリッドと更新日時で繰り返し呼び出したときに同一のファイルバイト列が生成され、ワークブックの内容は変わらないことを完了条件とします。
索引モデルが issue の本文から書いたものです。
説明
toXlsx produces a different file on every call for the same input, because the zip entries carry the current time. A workbook can't be compared by hash, and a scheduled report sends a "changed" file even when the data did not change.
Where: packages/pivotkit-core/src/xlsx.js line 250 calls zipSync(zipped, { level: 6 }) without a modification time, so fflate stamps each entry with the time of the call.
Not affected: the workbook content. Unzipped, every entry is byte-identical between runs; Excel and other readers don't care about the timestamps. Nothing has broken so far because no test or feature compares whole files.
Reproduce: call toXlsx twice on the same grid, compare SHA-256 of the two results: they differ; compare the unzipped entries: they match.
Fix: an option such as toXlsx(grid, { modified }) (a Date) that is passed as mtime to every zip entry, with a fixed default in tests. Check fflate's zip options for the exact field before building it. The headless report runner would pass the run's fire time, so a rerun of the same report gives the same bytes.
Found while probing headless runtimes for scheduled reports.
- 主要言語
- JavaScript
- スター
- 1
- フォーク
- 1
- 平均マージ
- 3時間 34分
- マージ済み PR(30日)
- 213
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
eizedev/pivotkit のほかの issue
-
area:server enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
area:server bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
area:server enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
documentation idea
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
area:tests idea
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
eizedev/pivotkit の issue をすべて見る
似ている issue
-
入群码过期オープン
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
aliyun/ai-agent-handbook#29 · コメント 1 件 ·
-
docs documentation need-triage SaaS
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
apache/cloudstack#14719 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信