Excessive memory usage when processing history leads to Javascript Heap Exhaustion
@HenrikDK がすでに取り組んでいます。
2026年7月1日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- github-actions, node.js, typescript
- 領域
- ci-cd, performance, testing-qa
調査の方向性
github-test-reporter action の「Processing previous results」パスから開始し、提供された pytest/CTRF 設定、previous-results-max: 2、および 60 MB のレポートを使って失敗を再現します。履歴の処理中のメモリ使用量を比較します。このワークロードで JavaScript ヒープを枯渇させずに main ブランチのレポートが完了すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Problem, we have a pretty large test suite in python with around 1250+ tests, and when we try to use the github-test-reporter action on main, we get:
Run ctrf-io/github-test-reporter@v1
📜 Preparing CTRF report
⏮️ Processing previous results
Starting workflow runs processing...
(node:402) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
<--- Last few GCs --->
[402:0x2ecac000] 100072 ms: Mark-Compact 4089.6 (4126.8) -> 4089.6 (4130.8) MB, pooled: 0 MB, 50.99 / 0.00 ms (average mu = 0.450, current mu = 0.031) allocation failure; scavenge might not succeed
[402:0x2ecac000] 100155 ms: Mark-Compact 4090.0 (4131.1) -> 4090.0 (4131.1) MB, pooled: 0 MB, 82.29 / 0.00 ms (average mu = 0.206, current mu = 0.005) allocation failure; scavenge might not succeed
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
Note that this is not a problem on branches and pr's it is exclusively a problem on the main branch.
I have tried limiting the length of the history from the default 10 to 2, but still the problem persists.
Config:
steps:
- uses: actions/checkout@v6
- name: Install pytest
run: pip3 install pytest pytest-json-ctrf pytest-cov pytest-xdist pytest-mock pyfakefs
shell: bash
- name: Test all workflows
id: run-pytest
run: |
pytest -n auto -m "not serial" --cov=scripts --cov-report=xml --ctrf ctrf-report.json
rm -f github-summary.env
shell: bash
- name: Publish Test Report
uses: ctrf-io/github-test-reporter@v1
if: always()
with:
report-path: 'ctrf-report.json'
summary-delta-report: true
insights-report: true
flaky-rate-report: true
upload-artifact: true
pull-request-report: true
overwrite-comment: true
previous-results-max: 2
comment-tag: PR Test Report
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
When i run the test suite with json output enabled locally the resulting report produced is 60mb large vs 170kb for junit.
I guess this could help explain the data volumes, but it still seems excessive to use 4GB of ram to process 2x60 mb of json?
Relevant logs:
- 主要言語
- TypeScript
- スター
- 380
- フォーク
- 43
- 平均マージ
- 3日 11時間
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ctrf-io/github-test-reporter のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
ctrf-io/github-test-reporter#309 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
ctrf-io/github-test-reporter#297 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
ctrf-io/github-test-reporter#282 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
ctrf-io/github-test-reporter#258 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
ctrf-io/github-test-reporter#255 ·
ctrf-io/github-test-reporter の issue をすべて見る
似ている issue
-
type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
0️⃣ phase/new
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
microsoft/playwright#43640 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100