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

Backport of deployment watcher: fix goroutine leak when job is purged into release/1.6.x #20360

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #20348 to be assessed for backporting due to the inclusion of the label backport/1.6.x.

The below text is copied from the body of the original PR.


The deployment watcher on the leader makes blocking queries to detect when the set of active deployments changes. It takes the resulting list of deployments and adds or removes watchers based on whether the deployment is active. But when a job is purged, the deployment will be deleted. This unblocks the query but the query result only shows the remaining deployments.

When the query unblocks, ensure that all active watchers have a corresponding deployment in state. If not, remove the watcher so that the goroutine stops.

Fixes: #19988


Overview of commits

@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/19988-deploymentwatcher-goroutine-leak/carefully-saved-mastiff branch from 166aca7 to fa09cca Compare April 11, 2024 18:51
@vercel vercel bot temporarily deployed to Preview – nomad April 11, 2024 18:52 Inactive
@vercel vercel bot temporarily deployed to Preview – nomad-storybook-and-ui April 11, 2024 19:00 Inactive
@tgross tgross merged commit 153b497 into release/1.6.x Apr 11, 2024
24 of 26 checks passed
@tgross tgross deleted the backport/19988-deploymentwatcher-goroutine-leak/carefully-saved-mastiff branch April 11, 2024 19:10
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

2 participants