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

Add wrapper to enforce timeout for extension tables #2077

Merged
merged 9 commits into from
Jan 30, 2025

Conversation

RebeccaMahany
Copy link
Contributor

@RebeccaMahany RebeccaMahany commented Jan 30, 2025

  • Add a tablewrapper package to ensure that osquery does not ever have to wait on a call to generate for more than four minutes by default
  • Update to use this package everywhere
  • Enforce tablewrapper usage via lint rule

ee/tables/tablewrapper/tablewrapper.go Outdated Show resolved Hide resolved
ee/tables/tablewrapper/tablewrapper.go Outdated Show resolved Hide resolved
Comment on lines 36 to 37
// Kick off running the query
resultChan := make(chan *generateResult)
Copy link
Contributor

Choose a reason for hiding this comment

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

I love that this has the effect is interrupting no matter what's happening. But I'm also slightly leery of these piling up. Is there any way to clean this up? I assume not. So maybe we need to add something only spawn one generate (per table) at a time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discussed offline -- I will add some limits in a follow-up PR

ee/tables/tablewrapper/tablewrapper.go Outdated Show resolved Hide resolved
@RebeccaMahany RebeccaMahany added the features-improvements Features and Improvements label Jan 30, 2025
James-Pickett
James-Pickett previously approved these changes Jan 30, 2025
Copy link
Contributor

@James-Pickett James-Pickett left a comment

Choose a reason for hiding this comment

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

Nice

cesarfda
cesarfda previously approved these changes Jan 30, 2025
@RebeccaMahany RebeccaMahany marked this pull request as ready for review January 30, 2025 20:21
@RebeccaMahany RebeccaMahany added this pull request to the merge queue Jan 30, 2025
Merged via the queue into kolide:main with commit 6ebf35f Jan 30, 2025
32 checks passed
@RebeccaMahany RebeccaMahany deleted the becca/table-timeouts branch January 30, 2025 21:19
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.

4 participants