-
Notifications
You must be signed in to change notification settings - Fork 42
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
[Asset Inventory] Run fetchers periodically #2902
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
d3171b9
run asset inventory fetchers periodically
kubasobon c365097
update test setup
kubasobon 7f8b20b
test asset inventory cycles
kubasobon 638fcef
handle PublishAll calls
kubasobon e6fd5af
handle PublishAll calls
kubasobon 2071af8
make counter atomic
kubasobon 9059026
skip in short test suite
kubasobon f431f4e
drop explicit zero
kubasobon 2e32a94
fix expected value
kubasobon 7f1495f
be consistent, use val
kubasobon 8d6a00a
extract duplicate code to runAllFetchersOnce()
kubasobon dcf2c4b
add test for runAllFetchersOnce
kubasobon 5bd515f
Merge branch 'main' into asset-inventory-period
kubasobon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can omit this const?
locally we can tweak
cloudbeat/deploy/asset-inventory/cloudbeat-gcp-asset-inventory.yml
Line 14 in 56579fc
and users have a hard-coded value, for example - https://github.com/elastic/integrations/blob/56d0473a2ed4900b7b24b6a254795b9bc82cb713/packages/cloud_asset_inventory/data_stream/asset_inventory/agent/stream/gcp.yml.hbs#L1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather keep it. It's not a default value, but a guardian value. If the customer sets value too low, this will start to spawn many goroutines that hit API. I can lower it if you think it makes sense, but we definitely need to make sure there is a reasonable minimum threshold. Obviously the worst-case scenario is
period: 0s
, where we get an infinite loop of new goroutines, but even5s
or10s
is too small IMHO.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL:
https://github.com/elastic/cloudbeat/pull/2902/files#diff-151451acd3d777673443e215b546390195bf895e79500c18a34bdf0029222fbfR57-R59
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
np with keeping it imo. but this value isn't configurable by the users, it's hardcoded in the integration package.