-
Notifications
You must be signed in to change notification settings - Fork 2.6k
chore(repo): split slow e2e tests - react module federation, remix, v… #33008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…ite-legacy, and web-legacy Split the following test suites into smaller, more focused tests: - react module federation webpack tests (different lib versions, library type var, promise-based remotes) - remix tests (npm, standalone, yarn basic/error-checking/unit-test-runner, ts-solution import-path/jest-vitest) - vite-legacy tests (esm only, incremental building, libs vitest custom/default, react apps, web apps) - web-legacy tests (build options, components, index html interpolation)
The latest updates on your projects. Learn more about Vercel for GitHub.
💡 Enable Vercel Agent with $100 free credit for automated AI reviews |
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
View your CI Pipeline Execution ↗ for commit e3bee66
☁️ Nx Cloud last updated this comment at |
9ff714d
to
4bbca35
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nx Cloud has identified a possible root cause for your failed CI:
The PR splits large e2e test suites into smaller, focused test files to improve CI performance. All three failing tasks exhibit environmental failure patterns unrelated to the code changes:
-
React Module Federation Test (exit 130): The test received SIGINT during execution, likely due to resource constraints or timeouts in the CI environment. The failure is non-deterministic (one test variant passed, another failed with identical setup). Multiple warnings about missing source maps in external package @module-federation/[email protected] indicate environmental issues with the dependency. No correlation exists between the test reorganization and the process interruption.
-
Remix Yarn Tests (yarn cache corruption): Both failing Remix tests encounter identical errors related to missing yarn cache files:
ENOENT: no such file or directory, open '/home/workflows/.cache/yarn/v6/npm-cli-cursor-3.1.0-.../node_modules/cli-cursor/.yarn-tarball.tgz'
. This is a classic yarn cache corruption issue in the CI environment. The PR only creates test setup files and splits tests without modifying package.json, yarn configuration, or dependency versions. -
System Environment Issues: The
spawnSync /bin/sh ENOENT
error indicates the shell binary is not found in the expected location, pointing to system environment configuration problems rather than code issues.
The PR changes are purely organizational - creating setup files and splitting monolithic test files into smaller ones. No modifications were made to:
- Application code or business logic
- Test assertions or expectations
- Dependencies or package configurations
- Build or webpack configurations
- Module federation setup
All failures demonstrate environmental instability (process interruption, cache corruption, missing system binaries) that would occur regardless of how the test files are organized. These are transient CI environment issues that should resolve on retry or with environment cleanup.
A code change would likely not resolve this issue, so no action was taken.
🎓 To learn more about Self Healing CI, please visit nx.dev
}, 200_000); | ||
}); | ||
|
||
100_000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This standalone value 100_000;
appears to be an orphaned timeout parameter that isn't attached to any test function. It should either be removed entirely or properly attached to a test as a timeout parameter (e.g., it('should do something', () => {...}, 100_000);
).
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
const envFileContents = ` | ||
NX_PUBLIC_VARIABLE=foo | ||
SOME_OTHER_VARIABLE=bar | ||
}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There appears to be a syntax error in the .env
file template. The closing curly brace }
at the end of the environment variable definitions is not needed and could prevent proper parsing of the environment variables. This should be removed for the file to be correctly formatted as a standard .env
file.
const envFileContents = ` | |
NX_PUBLIC_VARIABLE=foo | |
SOME_OTHER_VARIABLE=bar | |
}`; | |
const envFileContents = ` | |
NX_PUBLIC_VARIABLE=foo | |
SOME_OTHER_VARIABLE=bar | |
`; |
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
it('should be able to watch tests', async () => { | ||
let cp: ChildProcess; | ||
try { | ||
cp = await runCommandUntil(`test ${lib} --watch`, (output) => { | ||
return output.includes('Waiting for file changes...'); | ||
}); | ||
} catch (error) { | ||
console.error(error); | ||
} | ||
|
||
if (cp && cp.pid) { | ||
await killProcessAndPorts(cp.pid); | ||
} | ||
}, 100_000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error handling pattern in this test could mask failures. If an error occurs during runCommandUntil
, the test will continue and potentially pass incorrectly since the error is only logged but not propagated. Consider either re-throwing the error after logging it or using a more robust pattern that ensures test failures are properly reported when the command fails to execute as expected.
it('should be able to watch tests', async () => { | |
let cp: ChildProcess; | |
try { | |
cp = await runCommandUntil(`test ${lib} --watch`, (output) => { | |
return output.includes('Waiting for file changes...'); | |
}); | |
} catch (error) { | |
console.error(error); | |
} | |
if (cp && cp.pid) { | |
await killProcessAndPorts(cp.pid); | |
} | |
}, 100_000); | |
it('should be able to watch tests', async () => { | |
let cp: ChildProcess; | |
try { | |
cp = await runCommandUntil(`test ${lib} --watch`, (output) => { | |
return output.includes('Waiting for file changes...'); | |
}); | |
// Ensure the command process was started successfully | |
expect(cp).toBeDefined(); | |
expect(cp.pid).toBeDefined(); | |
} catch (error) { | |
console.error(error); | |
throw error; // Re-throw to fail the test | |
} finally { | |
// Clean up resources even if the test fails | |
if (cp && cp.pid) { | |
await killProcessAndPorts(cp.pid); | |
} | |
} | |
}, 100_000); |
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
d8a093e
to
d4137fc
Compare
d4137fc
to
e3bee66
Compare
…ite-legacy, and web-legacy
Split the following test suites into smaller, more focused tests:
Fixes CLOUD-3756
Current Behavior
Expected Behavior
Related Issue(s)
Fixes #