feat: add configurable initial delay with jitter to CAS backend validation#2530
Merged
migmartri merged 2 commits intochainloop-dev:mainfrom Nov 10, 2025
Merged
Conversation
migmartri
commented
Nov 9, 2025
Implement two separate background checkers to optimize validation frequency: - Default backends: every 30 minutes with 1min base + 0-5min jitter - All backends: every 24 hours without initial check Implementation: - Added InitialDelay field to CASBackendCheckerOpts for configurable delays - Added SkipFirstCheck flag to allow periodic-only validation - Changed OnlyDefaults from bool to *bool to distinguish explicit false from default true - Renamed CheckAllBackends to checkBackends (unexported) - Added toPtr helper function for pointer creation - Start two separate checker goroutines with different intervals and scopes This prevents thundering herd issues during pod startup, provides frequent validation for critical default backends, and comprehensive daily validation for all backends without excessive overhead. Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
16b813d to
0b16165
Compare
jiparis
approved these changes
Nov 10, 2025
Member
jiparis
left a comment
There was a problem hiding this comment.
Approving, check my comments please.
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Before, we were validating all the CAS backends at boot; now, we only validate the default ones with some jitter.
Additionally, the check for all backends happen at a 24 hours interval now.
Fixes #2516