Skip to content

[9.3] Fix Moon webpack dependency cache invalidation (#258940)#259477

Merged
kibanamachine merged 1 commit intoelastic:9.3from
kibanamachine:backport/9.3/pr-258940
Mar 25, 2026
Merged

[9.3] Fix Moon webpack dependency cache invalidation (#258940)#259477
kibanamachine merged 1 commit intoelastic:9.3from
kibanamachine:backport/9.3/pr-258940

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.3:

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Mar 25, 2026
@kibanamachine kibanamachine enabled auto-merge (squash) March 25, 2026 00:06
Moon cached webpack-built shared dependency bundles using only local source files and webpack config as inputs. When a dependency like `@elastic/eui` changed after bootstrap, Moon did not see any relevant
input change for `@kbn/ui-shared-deps-npm`, so it could restore a stale cached bundle. That left the installed dependency tree newer than the built artifact, which is why code present under
`node_modules/@elastic/eui` was missing from the emitted shared deps bundle.

This change makes Moon invalidate those webpack bundle caches when, and only when, the actual resolved dependency graph for the bundle changes. Instead of keying off the entire workspace yarn.lock, it adds an exact
transitive dependency fingerprint for each affected webpack-built package. That gives correct rebuilds for updated dependencies, including transitive ones, without broadly uncaching on unrelated lockfile churn.

---------

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
(cherry picked from commit 41b1f04)
@tylersmalley tylersmalley force-pushed the backport/9.3/pr-258940 branch from 850e070 to e7619e5 Compare March 25, 2026 16:46
@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Mar 25, 2026

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #1 / With pipelines Pipeline flyout Error panel should render a create pipeline warning if @custom pipeline does not exist
  • [job] [logs] Jest Tests #1 / EditForm should return the schedule editing form

History

cc @tylersmalley

@kibanamachine kibanamachine merged commit be3c07f into elastic:9.3 Mar 25, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants