Skip to content
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

test: Fix flaky babel-cli test #14535

Merged
merged 9 commits into from May 9, 2022
Merged

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented May 6, 2022

Q                       A
Fixed Issues? Second attempt (after #14385) to fix flaky babel-cli test
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

@babel-bot
Copy link
Collaborator

babel-bot commented May 6, 2022

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/51892/

@nicolo-ribaudo
Copy link
Member

We could also just retry the test 3 times if it fails.

@JLHwung
Copy link
Contributor Author

JLHwung commented May 6, 2022

We could also just retry the test 3 times if it fails.

That would have to be implemented in the test executor. I am avoiding that since the --verbose one seems to be the only flaky babel-cli test now.

@liuxingbaoyu
Copy link
Member

liuxingbaoyu commented May 8, 2022

We should probably use the readline package.

Because inputs are sometimes merged.

:)

FAIL  packages/babel-cli/test/index.js (32.406 s)
bin/babel > dir --out-dir --watch --verbose with external dependencies
    Error: "/home/runner/work/babel/babel/packages/babel-cli/lib/babel" "src" "--out-dir" "lib" "--watch" "--verbose": stderr:
    ["src/index.js -> lib/index.js\nsrc/main.js -> lib/main.js"]
    "Successfully compiled 2 files with Babel (123ms)."

["src/index.js -> lib/index.js\nsrc/main.js -> lib/main.js"]

@JLHwung JLHwung force-pushed the fix-flaky-babel-cli-test branch 2 times, most recently from 19dcc93 to 02d39f1 Compare May 9, 2022 15:21
@JLHwung
Copy link
Contributor Author

JLHwung commented May 9, 2022

After 6ea0e60 I have run CI test for five times. The good news is that I didn't see one babel-cli test failing, the bad news is that this one surfaces to be our new flaky error:

Parsing error: Cannot destructure property 'message' of 'WorkerClient[#worker_threads].receiveMessageOnPort(...)' as it is undefined.

@JLHwung JLHwung marked this pull request as ready for review May 9, 2022 18:35
@JLHwung JLHwung changed the title test: sort babel-cli log test: Fix flaky babel-cli test May 9, 2022
@nicolo-ribaudo
Copy link
Member

Yeah, we have had that error for one week, I spend multiple hours debugging it but didn't come to a conclusion 😬

Comment on lines 64 to 67
setTimeout(() => {
console.error("EXECUTOR TIMEOUT");
process.exit(1);
}, 5000);
}, 20000);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it can also be reverted.

…-verbose with external dependencies/executor.js
@JLHwung JLHwung merged commit 1d2e7e9 into babel:main May 9, 2022
@JLHwung JLHwung deleted the fix-flaky-babel-cli-test branch May 9, 2022 19:11
@JLHwung
Copy link
Contributor Author

JLHwung commented May 9, 2022

I am merging with one 👍 because this PR only update test files.

@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Aug 9, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants