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

[cmd/opampsupervisor] Fix restart delay when agent process exits unexpectedly #30238

Closed
wants to merge 14 commits into from

Conversation

srikanthccv
Copy link
Member

Description:

Reset should called only on stopped or expired timers with drained channels. If the timer already expired (and the channel was not cleared) it reads from the timer's channel to clear it.

Link to tracking Issue:
Fixes #27891

Testing:

Manually verified while working on something else

@evan-bradley
Copy link
Contributor

Thank you for taking care of this. Could you add a changelog entry?

@srikanthccv
Copy link
Member Author

I think the failed test is relevant. I will fix it.

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jan 18, 2024
Copy link
Contributor

@codeboten codeboten left a comment

Choose a reason for hiding this comment

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

@srikanthccv have you had a chance to look at the failing test?

@codeboten codeboten removed the Stale label Jan 18, 2024
@srikanthccv
Copy link
Member Author

Yes @codeboten, There were timers in other places as well. I will test out the changes and push the fix soon.

Copy link
Contributor

@evan-bradley evan-bradley left a comment

Choose a reason for hiding this comment

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

Overall this looks good, most of my comments are just to clean things up for the future.

Could you add a changelog entry?

cmd/opampsupervisor/supervisor/commander/commander.go Outdated Show resolved Hide resolved
cmd/opampsupervisor/supervisor/commander/commander.go Outdated Show resolved Hide resolved
@srikanthccv
Copy link
Member Author

I noticed I already added the CHANGELOG entry. PTAL.

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Feb 13, 2024
@srikanthccv
Copy link
Member Author

Not stale, I didn't get a chance to look into the review comments yet. I will get back to this soon.

Comment on lines +79 to +80
c.doneCh = make(chan struct{}, 1)
c.exitCh = make(chan struct{}, 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should just create these once on startup then drain them above. That way we can let the caller figure out multicasting.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry for tripping, I was reactively making changes to comments. Let me go through the changeset again and address the comment.

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Mar 13, 2024
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Mar 28, 2024
@srikanthccv srikanthccv deleted the issue-27891 branch April 23, 2024 18:33
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.

Restart delay not working when agent process exits unexpectedly
4 participants