Skip to content

Conversation

@connorjclark
Copy link
Collaborator

This allows us to run these tests in parallel now.

ref #13943 (comment)

@connorjclark connorjclark requested a review from a team as a code owner May 2, 2022 20:02
@connorjclark connorjclark requested review from adamraine and removed request for a team May 2, 2022 20:02
return {
lhr: result.lhr,
artifacts: result.artifacts,
log,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

also we get logs now

if (typeof globalThis === 'undefined') {
// @ts-expect-error - exposing for loading of dt-bundle.
global.globalThis = global;
if (!isMainThread && parentPort) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm kinda on the fence about having this in a single file. It's nice to have a single file for all of our bundled smoke stuff, but it also means you have to read the same file in two different contexts. Is having the worker stuff in the same file necessary for this to work?

At the very least, can we highlight the "worker" section and the "main thread" section with comments?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW, since the worker only does one thing and then dies, it doesn't actually need to receive messages. The worker can just load from workerData and get rid of some of this complexity.

@connorjclark connorjclark requested a review from brendankenny May 4, 2022 00:32
Copy link
Contributor

@adamraine adamraine left a comment

Choose a reason for hiding this comment

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

Looks like you can merge from master to solve CI, LGTM

global.globalThis = global;
// This runs only in the worker. The rest runs on the main thread.
if (!isMainThread && parentPort) {
(async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

technically don't we have top-level await? We might not want to break that seal yet, though

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

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

Last comments are just style variations on what you already have, so take anything or leave it. Change looks great!

@connorjclark connorjclark merged commit f1c1f4e into master May 5, 2022
@connorjclark connorjclark deleted the smoke-bundle-worker branch May 5, 2022 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants