Skip to content

tools: add cache to lint-js-and-md - #66412

Closed
aduh95 wants to merge 2 commits into
nodejs:mainfrom
aduh95:cache-eslint-results
Closed

aduh95 wants to merge 2 commits into
nodejs:mainfrom
aduh95:cache-eslint-results

Conversation

@aduh95

@aduh95 aduh95 commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Assisted-by: Devin
Refs: #64972

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/actions

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to Node.js builds or CI infrastructure. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. labels Sep 30, 2026
@panva

panva commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

attempt one has rate limit warnings

@aduh95

aduh95 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor Author

attempt one has rate limit warnings

Unfortunately it looks like actions/cache does not handle that at all: actions/cache#1758
Still, seems to be worth it for the times it does hit the caches

@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.37%. Comparing base (8bf7793) to head (e4a6cfa).
⚠️ Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66412      +/-   ##
==========================================
- Coverage   90.39%   90.37%   -0.02%     
==========================================
  Files         792      792              
  Lines      275580   275580              
  Branches    52840    52829      -11     
==========================================
- Hits       249104   249054      -50     
- Misses      16897    16948      +51     
+ Partials     9579     9578       -1     

see 30 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@panva panva added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Sep 30, 2026
@aduh95 aduh95 added the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 30, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. and removed commit-queue PRs queued for automated landing through the Commit Queue. labels Oct 2, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Commit Queue failed

   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
   ✖  This PR needs to wait 120 more hours to land (or 0 minutes if there is one more approval)
   ✖  No Jenkins CI runs detected

The pull request was removed from the Commit Queue and labeled commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. . After resolving the failure, remove that label and add commit-queue PRs queued for automated landing through the Commit Queue. to retry.

Full Commit Queue output
�[36m⠋�[39m Loading data for nodejs/node/pull/66412
�[36m⠋�[39m Loading data for nodejs/node/pull/66412
�[36m⠋�[39m Getting collaborator contacts from README of nodejs/node
�[36m⠋�[39m Getting PR from nodejs/node/pull/66412
�[36m⠋�[39m Getting reviews from nodejs/node/pull/66412
�[36m⠋�[39m Getting comments from nodejs/node/pull/66412
�[36m⠋�[39m Getting commits from nodejs/node/pull/66412
✔  Done loading data for nodejs/node/pull/66412
----------------------------------- PR info ------------------------------------
Title      tools: add cache to `lint-js-and-md` (#66412)
   ⚠  Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch     aduh95:cache-eslint-results -> nodejs:main
Labels     build, meta, author ready, needs-ci, commit-queue
Commits    2
 - tools: add cache to `lint-js-and-md`
 - fixup! tools: add cache to `lint-js-and-md`
Committers 1
 - Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66412
Refs: https://github.com/nodejs/node/issues/64972
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/66412
Refs: https://github.com/nodejs/node/issues/64972
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Wed, 30 Sep 2026 12:35:05 GMT
   ✔  Approvals: 1
   ✔  - Filip Skokan (@panva) (TSC): https://github.com/nodejs/node/pull/66412#pullrequestreview-5370024850
   ✖  This PR needs to wait 120 more hours to land (or 0 minutes if there is one more approval)
   ✔  Last GitHub CI successful
   ✖  No Jenkins CI runs detected
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu

View workflow run

@aduh95
aduh95 requested a review from MikeMcC399 October 2, 2026 21:17
@aduh95 aduh95 removed needs-ci PRs that need a full CI run. commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. labels Oct 2, 2026

@MikeMcC399 MikeMcC399 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR improves Lint JavaScript re-runs in the same branch. It does however not resolve issue #64972. The first run may time out after 15 minutes, since there is no cache available. Caches are tied to branches in GitHub Actions. Also if a run is cancelled due to timeout, no cache is saved.

I tested this in my fork and can demonstrate a big improvement on re-run (overall time down from 7m to 2.5m). I also saw a timeout on the first run with caching enabled though - this was a chance occurrence. It could also have succeeded, depending on the multi-tenant load in the GitHub Actions runner probably.

Sequence Caching Lint JavaScript Lint markdown lint-js-and-md result
1 disabled 6m 37s 2m 48s 10m 7s succeeded
2 enabled no hit 11m 31s cancelled 15m 33s cancelled / timeout
3 enabled no hit 4m 17s 1m 59s 7m 0s succeeded
4 enabled and hit 8s 1m 51s 2m 36s succeeded

Even if the PR does not solve #64972, it should still go ahead.

panva pushed a commit that referenced this pull request Oct 3, 2026
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #66412
Refs: #64972
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
@panva

panva commented Oct 3, 2026

Copy link
Copy Markdown
Member

Landed in 253ebd2

@panva panva closed this Oct 3, 2026
@aduh95
aduh95 deleted the cache-eslint-results branch October 3, 2026 10:15
aduh95 added a commit that referenced this pull request Oct 3, 2026
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #66412
Refs: #64972
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
@MikeMcC399

Copy link
Copy Markdown
Contributor

Rate limiting (429 - too many requests) prevents caching when multiple PRs are landed concurrently, such as through Commit CI.

See for example https://github.com/nodejs/node/actions/runs/37114420969

The PR can only assist some runs of lint-js-and-md to be faster, but not all of them.

aduh95 added a commit that referenced this pull request Oct 3, 2026
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #66412
Refs: #64972
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
@inoway46

inoway46 commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Could PR cache writes be contributing to the 429s? Would it help to stop saving caches in PR runs and only save on pushes to main/release branches?

This would give up PR-specific caches for reruns, but if it reduces the 429s, more reliable reuse of base branch caches across PRs might be a worthwhile trade-off.

Tested in my fork: main populated the caches, and a PR restored them without saving. Implementation diff.

@MikeMcC399

Copy link
Copy Markdown
Contributor

@inoway46

I don't think that your suggestion would be beneficial, however if you want to propose it for discussion, it would be better to open a new issue, rather than continue commenting on this closed PR.

My comments were only about the effects. I wasn't suggesting any further change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. build Issues and PRs related to Node.js builds or CI infrastructure. meta Issues and PRs related to the general management of the project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants