Skip to content

fix: unique deployment names for cluster job#97

Merged
ajbeattie merged 3 commits into
mainfrom
fix/deployment-name-dedupe
Jun 17, 2026
Merged

fix: unique deployment names for cluster job#97
ajbeattie merged 3 commits into
mainfrom
fix/deployment-name-dedupe

Conversation

@ajbeattie

Copy link
Copy Markdown
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

@ajbeattie ajbeattie requested a review from a team as a code owner June 16, 2026 23:12
@ajbeattie ajbeattie requested review from Copilot and malancas June 16, 2026 23:12
GitHub Advanced Security started work on behalf of ajbeattie June 16, 2026 23:13 View session
GitHub Advanced Security finished work on behalf of ajbeattie June 16, 2026 23:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_name values, 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

Comment thread internal/controller/reporting.go
Comment thread internal/controller/reporting.go Outdated
Comment thread internal/controller/reporting.go Outdated
Comment thread internal/controller/reporting.go Outdated
GitHub Advanced Security started work on behalf of ajbeattie June 16, 2026 23:21 View session
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
GitHub Advanced Security finished work on behalf of ajbeattie June 16, 2026 23:22
GitHub Advanced Security started work on behalf of ajbeattie June 16, 2026 23:22 View session
GitHub Advanced Security finished work on behalf of ajbeattie June 16, 2026 23:23
@ajbeattie ajbeattie merged commit fe863cc into main Jun 17, 2026
8 checks passed
@ajbeattie ajbeattie deleted the fix/deployment-name-dedupe branch June 17, 2026 16:20
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.

3 participants