fix: unique deployment names for cluster job#97
Merged
Conversation
ajbeattie
commented
Jun 16, 2026
Contributor
- Ensure that the set of deployment names submitted in the cluster job are unique. For duplicates (e.g. during an active rollout), break ties by preferring running over terminal pods and preferring the newest among running pods
- Also add individual record logging for parity with the individual record posting path, and easier debugging
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves startup “bulk cluster sync” reporting by ensuring only a single (unique) deployment_name is submitted per snapshot job, with deterministic tie-breaking during rollouts, and adds per-record INFO logging to match the single-record posting path.
Changes:
- Deduplicate startup sync records to ensure unique
deployment_namevalues, resolving digest collisions by preferring running pods over terminal pods and otherwise choosing the newest pod. - Add per-record INFO logging for accepted records after the cluster job is queued (excluding records rejected at submission).
- Add targeted unit tests covering rollout/tie-breaking behavior and uniqueness guarantees.
Show a summary per file
| File | Description |
|---|---|
| internal/controller/reporting.go | Dedupes sync records by deployment_name, adds tie-break logic and per-record sync logging. |
| internal/controller/reporting_test.go | Adds regression and behavior tests for rollout collision handling and uniqueness. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 4
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
malancas
approved these changes
Jun 17, 2026
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.