Skip to content

Commit adcb451

Browse files
slorberclaude
andauthored
test(core): reproduce the build hang when only the server persistent cache is evicted (#13034)
* ci: reproduce the build hang when only the server persistent cache is invalid Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: link the repro PR Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(core): replace the repro workflow with a unit test A cache version test captures the cause of the hang (the client cache is kept when only the server target changes), without an extra CI workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 54e5a88 commit adcb451

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎packages/docusaurus/src/webpack/__tests__/base.test.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,16 @@ describe('base webpack config', () => {
232232
expect(oldNodeVersion).not.toBe(newNodeVersion);
233233
});
234234

235+
// TODO a warm client cache with a cold server cache hangs the build
236+
// See https://github.com/meta/docusaurus/pull/13034
237+
it('keeps the client cache when the server Node.js target changes', async () => {
238+
stubServerNodeTarget('24.11.1');
239+
const oldNodeVersion = await getCacheVersion({isServer: false});
240+
stubServerNodeTarget('24.11.2');
241+
const newNodeVersion = await getCacheVersion({isServer: false});
242+
expect(oldNodeVersion).toBe(newNodeVersion);
243+
});
244+
235245
it('is evicted when a plugin package version changes', async () => {
236246
const oldPluginVersion = await getCacheVersion({
237247
siteMetadata: createSiteMetadata({pluginVersion: '1.0.0'}),

0 commit comments

Comments
 (0)