Skip to content

Conversation

@migmartri
Copy link
Member

@migmartri migmartri commented Nov 9, 2025

Summary

  • Implement dual CAS backend validation with different frequencies
  • Default backends validated every 30 minutes with startup jitter
  • All backends validated every 24 hours without initial check overhead

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

@migmartri migmartri requested review from javirln and jiparis November 9, 2025 21:25
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>
@migmartri migmartri force-pushed the 2516-move-validation branch from 16b813d to 0b16165 Compare November 9, 2025 21:56
Copy link
Member

@jiparis jiparis left a comment

Choose a reason for hiding this comment

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

Approving, check my comments please.

Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
@migmartri migmartri merged commit 0bb0266 into chainloop-dev:main Nov 10, 2025
16 of 17 checks passed
@migmartri migmartri deleted the 2516-move-validation branch November 10, 2025 11:56
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.

review cas-backend validation on-boot

2 participants