Skip to content

[build-tools] Add npm cache fallback to install_node_modules step#3924

Open
AbbanMustafa wants to merge 5 commits into
mainfrom
npm-cache-fallback-install-node-modules
Open

[build-tools] Add npm cache fallback to install_node_modules step#3924
AbbanMustafa wants to merge 5 commits into
mainfrom
npm-cache-fallback-install-node-modules

Conversation

@AbbanMustafa

@AbbanMustafa AbbanMustafa commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Why

The npm cache install fallback only covered the managed prebuild install (prebuildAsync). Workflow and generic jobs install dependencies through the eas/install_node_modules step, which called installDependenciesAsync directly and had no fallback.

How

  • Routed eas/install_node_modules through installDependenciesWithNpmCacheFallbackAsync instead of installDependenciesAsync, so the step applies the cache registry per-spawn and, on a cache-registry failure, retries once against the default registry.

Test Plan

  • New installNodeModules.test.ts verifies the step installs through the cache registry on the first attempt and retries without it (dropping NPM_CONFIG_REGISTRY) when the cache install fails, and does not retry when the npm cache is not enabled.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Subscribed to pull request

File Patterns Mentions
**/* @douglowder

Generated by CodeMention

Warning: The preamble and epilogue options in commentConfiguration are deprecated. Use template instead.

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.21%. Comparing base (52e6fd0) to head (0f2823f).

Additional details and impacted files
@@                      Coverage Diff                       @@
##           npm-cache-registry-scoping    #3924      +/-   ##
==============================================================
+ Coverage                       59.17%   59.21%   +0.04%     
==============================================================
  Files                             935      935              
  Lines                           41070    41069       -1     
  Branches                         8646     8646              
==============================================================
+ Hits                            24300    24315      +15     
+ Misses                          16675    16659      -16     
  Partials                           95       95              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@AbbanMustafa AbbanMustafa force-pushed the npm-cache-fallback-install-node-modules branch from b3c77aa to 7861230 Compare July 1, 2026 03:51
@AbbanMustafa AbbanMustafa changed the base branch from main to npm-cache-registry-scoping July 1, 2026 03:51
@AbbanMustafa AbbanMustafa added the no changelog PR that doesn't require a changelog entry label Jul 1, 2026
@AbbanMustafa AbbanMustafa force-pushed the npm-cache-fallback-install-node-modules branch from 7861230 to 9a53e4f Compare July 1, 2026 05:08
@AbbanMustafa AbbanMustafa force-pushed the npm-cache-registry-scoping branch from ae7e235 to 8597524 Compare July 1, 2026 05:14
@AbbanMustafa AbbanMustafa force-pushed the npm-cache-fallback-install-node-modules branch from 9a53e4f to a467670 Compare July 1, 2026 05:15
@AbbanMustafa AbbanMustafa force-pushed the npm-cache-fallback-install-node-modules branch from a467670 to abb39a9 Compare July 1, 2026 17:35
@AbbanMustafa AbbanMustafa force-pushed the npm-cache-fallback-install-node-modules branch from abb39a9 to 0f2823f Compare July 1, 2026 19:50
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

⏩ The changelog entry check has been skipped since the "no changelog" label is present.

Base automatically changed from npm-cache-registry-scoping to main July 2, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog PR that doesn't require a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant