Fix flaky @babel/cli test#14385
Conversation
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/51553/ |
|
I love this PR |
nicolo-ribaudo
left a comment
There was a problem hiding this comment.
This might still not solve it because it just "waits more", but 2s should be more then enough 👍
| run: | | ||
| yarn constraints | ||
| - name: 'Check for duplicate dependencies (fix w/ "yarn dedupe")' | ||
| if: steps.yarn-cache.outputs.cache-hit != 'true' |
There was a problem hiding this comment.
We do we always run it now?
There was a problem hiding this comment.
Good catch. I should have left a comment here. This step was previously in the prepare-yarn-cache job including the step yarn-cache. Not long ago it was extracted to a separate job yarn-validate which can't access the yarn-cache output anymore, so the condition here is always true now. The dedupe check is around 2 seconds so we can just leave it here.
|
I'm merging this with a single review because it doesn't affect any source code, and it fixes a super annoying problem that makes ~30% of CI runs fail. |
|
There seems to be a failure for the same reason. We can consider adding a watch ready output. Or consider the following changes: await new Promise(resolve => setTimeout(resolve, 2000));
fs.writeFileSync("./file.txt", "Updated!"); let i = 0;
setInterval(() => {
fs.writeFileSync("./file.txt", `Updated${i++}!`);
}, 300); |
@babel/cliwatch test is flaky because lack of inter-process communicationTo re-run the
@babel/clitest again and again, I have pushed some CI maintenance commits.