Conversation
|
Skipping CI for Draft Pull Request. |
Contributor
🚀 Build Images ReadyImages are ready for commit 6b37cea. To use with deploy scripts: export MAIN_IMAGE_TAG=5.0.x-198-g6b37cea837 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## worker-archetypes-foundation #22825 +/- ##
================================================================
- Coverage 51.83% 51.58% -0.25%
================================================================
Files 2906 2892 -14
Lines 182990 181836 -1154
================================================================
- Hits 94858 93808 -1050
+ Misses 79822 79819 -3
+ Partials 8310 8209 -101
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Split the monolithic watcher into two archetypes: - PeriodicWorker 'base-image-scheduler' handles the scheduling heartbeat (list repos, claim due ones, enqueue). Crash recovery runs once on first pass via sync.Once. - QueueConsumer 'base-image-scanner' drains claimed repos with bounded concurrency, replacing the manual semaphore + WaitGroup + goroutine spawning. Removes: concurrency.Stopper, sync.Once start/stop guards, semaphore, WaitGroup. The channel between scheduler and scanner makes the producer/consumer relationship explicit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W7RzcPcJyXMZUqeSXfqTZQ
ebensh
force-pushed
the
worker-archetypes-batch-3
branch
from
September 15, 2026 13:54
6207c28 to
6b37cea
Compare
ebensh
force-pushed
the
worker-archetypes-foundation
branch
from
September 15, 2026 13:54
72e18f8 to
44a57aa
Compare
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.
Description
Decomposes the monolithic base image watcher into two worker archetypes:
PeriodicWorker"base-image-scheduler" — scheduling heartbeat that lists repos, claims due ones via CAS, and enqueues them. Crash recovery (failInFlightScans) runs once on first pass viasync.Once.QueueConsumer"base-image-scanner" — drains claimed repos with bounded concurrency, replacing the manual semaphore + WaitGroup + goroutine spawning.The channel between scheduler and scanner makes the producer/consumer relationship explicit. Removes manual
concurrency.Stopper,semaphore.Weighted, andsync.WaitGroup.Both workers are registered with
backgroundworker.Globalfor/debug/workersvisibility.Depends on #22823 (foundation).
User-facing documentation
Testing and quality
Automated testing
How I validated my change
go test ./central/baseimage/watcher/...passesgo build ./central/baseimage/watcher/...passes🤖 Generated with Claude Code
https://claude.ai/code/session_01W7RzcPcJyXMZUqeSXfqTZQ