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

Improvements for osqueryinstance's errgroup #2017

Merged
merged 14 commits into from
Jan 8, 2025

Conversation

RebeccaMahany
Copy link
Contributor

@RebeccaMahany RebeccaMahany commented Dec 30, 2024

  • Moves errgroup to its own package for reusability
  • Adds tests for errgroup
  • Adds more and better logging so that we can track whether shutdown tasks are taking a long time
  • Run repeated goroutine immediately after delay, rather than waiting for another interval
  • Recover panicking goroutines

@RebeccaMahany RebeccaMahany added the features-improvements Features and Improvements label Dec 31, 2024
type LoggedErrgroup struct {
errgroup *errgroup.Group
cancel context.CancelFunc
doneCtx context.Context // nolint:containedctx
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the same nolint exception we had previously, just moved from osqueryinstance to here. In the future I think we might be able to get rid of this entirely -- but the errgroup is very sensitive when it comes to updating anything that touches doneCtx so I want to do it in a separate PR at a later time.

@RebeccaMahany RebeccaMahany marked this pull request as ready for review January 8, 2025 21:10
James-Pickett
James-Pickett previously approved these changes Jan 8, 2025
zackattack01
zackattack01 previously approved these changes Jan 8, 2025
Copy link
Contributor

@zackattack01 zackattack01 left a comment

Choose a reason for hiding this comment

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

🔥 🔥 🔥

@RebeccaMahany RebeccaMahany added this pull request to the merge queue Jan 8, 2025
Merged via the queue into kolide:main with commit 8c898ba Jan 8, 2025
32 checks passed
@RebeccaMahany RebeccaMahany deleted the becca/errgroup branch January 8, 2025 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
features-improvements Features and Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants