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

🏗 Make nailgun server stoppage a time-bound operation and log errors if any #24648

Merged
merged 1 commit into from Sep 20, 2019
Merged

🏗 Make nailgun server stoppage a time-bound operation and log errors if any #24648

merged 1 commit into from Sep 20, 2019

Conversation

rsimha
Copy link
Contributor

@rsimha rsimha commented Sep 19, 2019

It's possible that the operation to stop the nailgun server after gulp dist occasionally causes Travis builds to stall. Since this is a non-essential cleanup step, it makes sense to make the operation time-bound and non-blocking.

This PR implements the idea in #24487 (comment) and gives the process 5 seconds to execute before printing a warning and continuing.

Reference: See the timeout option of child_process.spawnSync()

Potential fix for #24487

@rsimha rsimha self-assigned this Sep 19, 2019
@rsimha
Copy link
Contributor Author

rsimha commented Sep 19, 2019

Tested this by adding a sleep 10 && to stopNailgunServerCmd and running gulp nailgun-stop. The process was terminated as expected after the 5 second timeout.

@rsimha rsimha merged commit f480db0 into ampproject:master Sep 20, 2019
@rsimha rsimha deleted the 2019-09-19-NailgunStopStall branch September 20, 2019 15:42
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.

None yet

3 participants