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

bugfix: drone component failed to run and the process could not be terminated normally #3135

Closed
wants to merge 2 commits into from

Conversation

zc2638
Copy link

@zc2638 zc2638 commented Sep 5, 2021

When the drone starts, if one of the coroutines fails to execute, it should exit the program.

Because errgroup is used, the program will only exit when all the coroutines have ended.

The fastest way to test is to let drone server listen an occupied port.

@bradrydzewski
Copy link

bradrydzewski commented Sep 5, 2021

Instead of removing errgroup, I feel like we could fix with a small change to use errgroup.WithContext. When the derived context is cancelled it should cancel all remaining subroutines, since all of the subroutines accept context.

WithContext returns a new Group and an associated Context derived from ctx.
The derived Context is canceled the first time a function passed to Go returns a non-nil error or the first time Wait returns, whichever occurs first.

@zc2638
Copy link
Author

zc2638 commented Sep 5, 2021

Instead of removing errgroup, I feel like we could fix with a small change to use errgroup.WithContext. When the derived context is cancelled it should cancel all remaining subroutines, since all of the subroutines accept context.

I agree with you. I'll revise it.

@zc2638
Copy link
Author

zc2638 commented Sep 5, 2021

@bradrydzewski Please take a look.

@CLAassistant
Copy link

CLAassistant commented Jan 19, 2022

CLA assistant check
All committers have signed the CLA.

@zc2638
Copy link
Author

zc2638 commented Mar 25, 2022

/cc @marko-gacesa

@hitesharinga hitesharinga changed the base branch from master to drone October 4, 2023 02:44
@bot2-harness
Copy link
Collaborator

This PR has been automatically closed due to inactivity.

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.

None yet

4 participants