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

dev: don't exit immediately in ./dev ui watch #76742

Merged

Conversation

sjbarag
Copy link
Contributor

@sjbarag sjbarag commented Feb 17, 2022

./dev ui watch previously didn't wait for the command context for webpack commands to complete before returning. This caused the 'watch' subcommand to stop immediately, then the 'ui' subcommand, then the entire 'dev' command to stop, exiting the entire process likely before webpack could even start. Wait for the webpack commands to complete (which they never should, since they're meant to run indefinitely) before returning from ./dev ui watch's implementation.

Release note: None

@sjbarag sjbarag requested a review from a team as a code owner February 17, 2022 17:58
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@sjbarag
Copy link
Contributor Author

sjbarag commented Feb 17, 2022

I suspect ./dev ui watch has been broken since it initially landed — I think I accidentally removed the <- ctx.Done() line while cleaning up some debugging code before the original PR 😬

Copy link
Contributor

@irfansharif irfansharif left a comment

Choose a reason for hiding this comment

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

🧑‍🔬 Worth bumping DEV_VERSION, we've done it for less.

@sjbarag
Copy link
Contributor Author

sjbarag commented Feb 17, 2022

🧑‍🔬 Worth bumping DEV_VERSION, we've done it for less.

On it! What's your preference: separate commit in the same PR, separate PR, or just one commit?

@rickystewart
Copy link
Collaborator

On it! What's your preference: separate commit in the same PR, separate PR, or just one commit?

You can do it in the same commit, same PR. No reason to separate it out.

@sjbarag sjbarag force-pushed the ui-watch_wait-for-webpack-commands branch from 4266d95 to a389d78 Compare February 17, 2022 18:09
@sjbarag
Copy link
Contributor Author

sjbarag commented Feb 17, 2022

bors r+

@craig
Copy link
Contributor

craig bot commented Feb 17, 2022

This PR was included in a batch that was canceled, it will be automatically retried

@craig
Copy link
Contributor

craig bot commented Feb 17, 2022

Build failed (retrying...):

@rickystewart
Copy link
Collaborator

bors r-

@craig
Copy link
Contributor

craig bot commented Feb 17, 2022

Canceled.

@rickystewart
Copy link
Collaborator

Looks like you should dev test pkg/cmd/dev and get the tests working again :) Looks like it's timing out, probably because of this very change to not have the command exit immediately.

@sjbarag
Copy link
Contributor Author

sjbarag commented Feb 17, 2022

Looks like you should dev test pkg/cmd/dev and get the tests working again :) Looks like it's timing out, probably because of this very change to not have the command exit immediately.

D'oh, you're right. The original version also included a if isTesting IIRC so I'm not sure where all that went 🤔

@sjbarag sjbarag force-pushed the ui-watch_wait-for-webpack-commands branch from a389d78 to 7248624 Compare February 18, 2022 18:37
@sjbarag
Copy link
Contributor Author

sjbarag commented Feb 18, 2022

Ah! Looks like this got weird with the switch to datadriven testing in 43f4b29 (dev: test using datadriven, 2022-02-03), but it should be all good now 😃

./dev ui watch previously didn't wait for the command context for
webpack commands to complete before returning. This caused the 'watch'
subcommand to stop immediately, then the 'ui' subcommand, then the
entire 'dev' command to stop, exiting the entire process likely before
webpack could even start. Wait for the webpack commands to complete
(which they never should, since they're meant to run indefinitely)
before returning from ./dev ui watch's implementation.

Release note: None
@sjbarag sjbarag force-pushed the ui-watch_wait-for-webpack-commands branch from 7248624 to c09fad8 Compare February 18, 2022 22:42
@sjbarag sjbarag requested a review from irfansharif February 22, 2022 17:19
@irfansharif
Copy link
Contributor

I'll bors on your behalf to make up for the delayed review. Thanks Sean!

bors r+

@craig
Copy link
Contributor

craig bot commented Feb 24, 2022

Build succeeded:

@craig craig bot merged commit 5b42a98 into cockroachdb:master Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants