Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Excessive memory usage when processing history leads to Javascript Heap Exhaustion

オープン
#302 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

@HenrikDK がすでに取り組んでいます。

2026年7月1日 から。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
github-actions, node.js, typescript

調査の方向性

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.

Image

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

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ctrf-io/github-test-reporter のほかの issue

ctrf-io/github-test-reporter の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。