Skip to content

Repair wp/7.1 branch Actions: Disable the node_modules cache in the Storybook check - #84178

Open
desrosj wants to merge 1 commit into
fix-actions-7.1/fix-flaky-openverse-image-drag-and-drop-testfrom
fix-actions-7.1/disable-node-modules-cache-in-storybook-check
Open

desrosj wants to merge 1 commit into
fix-actions-7.1/fix-flaky-openverse-image-drag-and-drop-testfrom
fix-actions-7.1/disable-node-modules-cache-in-storybook-check

Conversation

@desrosj

@desrosj desrosj commented Oct 7, 2026

Copy link
Copy Markdown
Member

Part of #82781.

What?

Sets cache: false on the ./.github/setup-node step in the Storybook check workflow (.github/workflows/storybook-check.yml), so the job neither restores nor saves the node_modules and npm caches.

Why?

The Storybook check runs ./.github/setup-node, then runs npm install --no-save @storybook/test-runner@..., which adds and changes packages inside node_modules. At the end of the job, the node_modules cache step saves that modified tree. Its cache key only covers the OS, architecture, Node.js version and lockfile hash, so the modified tree is saved as if it were a clean install. Later jobs on the same ref restore it, skip npm ci, and fail.

For example, on #84039 the Storybook check (https://github.com/WordPress/gutenberg/actions/runs/37631035082) saved the cache after npm install --no-save reported "added 101 packages, changed 29 packages". The Unit Tests run (https://github.com/WordPress/gutenberg/actions/runs/37631034438) restored it a few minutes later, and "Build JavaScript assets for PHP unit tests" failed with TS2307: Cannot find module 'http' and other missing Node.js type errors.

How?

Uses the cache input that #83400 adds to .github/setup-node/action.yml on this branch. With cache: false, the Storybook check always runs a fresh npm ci and never writes its modified node_modules back to the shared cache.

Trunk fixed this differently in b7fb03b, which removed the npm install --no-save step. That change depends on a storybook workspace that this branch does not have.

Use of AI Tools

This PR was created by Claude Code under my supervision. All code should be treated as AI-produced and not yet reviewed by a human until this PR is marked Ready for Review.

🤖 Generated with Claude Code

@desrosj desrosj added the [Type] Build Tooling Issues or PRs related to build tooling label Oct 7, 2026
@desrosj desrosj self-assigned this Oct 7, 2026
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d922d7f1-bc2a-4f20-a15c-abe943a0a4ef

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: desrosj <desrosj@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@desrosj
desrosj removed this pull request from stack #83629 October 8, 2026 21:07
@desrosj
desrosj changed the base branch from fix-actions-7.1/fix-flaky-openverse-image-drag-and-drop-test to wp/7.1 October 8, 2026 21:08
@desrosj
desrosj force-pushed the fix-actions-7.1/disable-node-modules-cache-in-storybook-check branch from c10caf8 to c9f3ea3 Compare October 8, 2026 21:08
@github-actions github-actions Bot added the [Tool] Env /packages/env label Oct 8, 2026
@desrosj
desrosj changed the base branch from wp/7.1 to fix-actions-7.1/fix-flaky-openverse-image-drag-and-drop-test October 8, 2026 21:10
@desrosj
desrosj added this pull request to stack #84346 October 8, 2026 21:10
@desrosj
desrosj removed this pull request from stack #84346 October 9, 2026 23:21
@desrosj
desrosj changed the base branch from fix-actions-7.1/fix-flaky-openverse-image-drag-and-drop-test to wp/7.1 October 9, 2026 23:21
@desrosj
desrosj force-pushed the fix-actions-7.1/disable-node-modules-cache-in-storybook-check branch from c9f3ea3 to 59a44ae Compare October 9, 2026 23:22
@desrosj
desrosj changed the base branch from wp/7.1 to fix-actions-7.1/fix-flaky-openverse-image-drag-and-drop-test October 9, 2026 23:23
@desrosj
desrosj added this pull request to stack #84466 October 9, 2026 23:23
@desrosj
desrosj force-pushed the fix-actions-7.1/disable-node-modules-cache-in-storybook-check branch from 59a44ae to 1dc3c89 Compare October 13, 2026 01:54
@github-actions github-actions Bot removed the [Tool] Env /packages/env label Oct 13, 2026

This branch has not been deployed

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

Labels

[Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant