From c4b397ee783e3c558adbd235f6be4a6b7008d374 Mon Sep 17 00:00:00 2001 From: Eric Pickard Date: Fri, 24 Jul 2026 12:07:34 -0400 Subject: [PATCH 1/3] adjust logging around cluster job Signed-off-by: Eric Pickard --- internal/controller/reporting.go | 5 +++-- pkg/deploymentrecord/client.go | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/internal/controller/reporting.go b/internal/controller/reporting.go index 367ee85..5c3fae0 100644 --- a/internal/controller/reporting.go +++ b/internal/controller/reporting.go @@ -215,6 +215,7 @@ func (c *Controller) makeSyncRecords(ctx context.Context, syncClusterPods []any) // During a rollout the same deployment_name can appear with multiple digests // (old and new pods running at once), so we must collapse to a single digest per workload and // container name. We pick the newest running pod so the snapshot reflects the rollout target. + slog.Info("making sync records...") winners := make(map[string]syncCandidate) for _, p := range syncClusterPods { pod, ok := p.(*corev1.Pod) @@ -271,7 +272,7 @@ func (c *Controller) makeSyncRecords(ctx context.Context, syncClusterPods []any) // Keep the newest running pod's digest and log the decision so the // rollout is visible. if isPreferredSyncPod(pod, existing.pod) { - slog.Info("Multiple digests observed for deployment_name during sync, choosing preferred pod", + slog.Debug("Multiple digests observed for deployment_name during sync, choosing preferred pod", "deployment_name", dn, "chosen_pod", pod.Name, "chosen_digest", digest, @@ -280,7 +281,7 @@ func (c *Controller) makeSyncRecords(ctx context.Context, syncClusterPods []any) ) winners[dn] = syncCandidate{pod: pod, container: container, wlName: wl.Name} } else { - slog.Info("Multiple digests observed for deployment_name during sync, keeping preferred pod", + slog.Debug("Multiple digests observed for deployment_name during sync, keeping preferred pod", "deployment_name", dn, "kept_pod", existing.pod.Name, "kept_digest", existingDigest, diff --git a/pkg/deploymentrecord/client.go b/pkg/deploymentrecord/client.go index d4e9249..b407761 100644 --- a/pkg/deploymentrecord/client.go +++ b/pkg/deploymentrecord/client.go @@ -262,6 +262,7 @@ func (c *Client) PostOne(ctx context.Context, record *Record) error { // Returns the job response (including job ID) and any authorization errors // for rejected deployments. func (c *Client) CreateClusterJob(ctx context.Context, records []*Record, cluster string) (*JobResponse, error) { + slog.Info("starting cluster job", "record_count", len(records)) if len(records) == 0 { return nil, errors.New("records cannot be empty") } @@ -339,6 +340,11 @@ func (c *Client) WaitForClusterJob(ctx context.Context, cluster string, jobID in } if status.Status == "completed" || status.Status == "failed" { return status, nil + } else { + slog.Info("waiting for cluster job completion", + "status", status, + "attempt", attempt, + ) } delay := time.Duration(math.Min( From f5db293894d6066bfec28ffaa746f4e23cce728d Mon Sep 17 00:00:00 2001 From: Eric Pickard Date: Fri, 24 Jul 2026 12:31:34 -0400 Subject: [PATCH 2/3] address linting issues Signed-off-by: Eric Pickard --- pkg/deploymentrecord/client.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkg/deploymentrecord/client.go b/pkg/deploymentrecord/client.go index b407761..405cd6a 100644 --- a/pkg/deploymentrecord/client.go +++ b/pkg/deploymentrecord/client.go @@ -340,12 +340,11 @@ func (c *Client) WaitForClusterJob(ctx context.Context, cluster string, jobID in } if status.Status == "completed" || status.Status == "failed" { return status, nil - } else { - slog.Info("waiting for cluster job completion", - "status", status, - "attempt", attempt, - ) } + slog.Info("waiting for cluster job completion", + "status", status, + "attempt", attempt, + ) delay := time.Duration(math.Min( float64(initialDelay)*math.Pow(2, float64(attempt)), From 4f6c16e5ef951232cd554f297a1e9f96b46b9a88 Mon Sep 17 00:00:00 2001 From: Eric Pickard Date: Fri, 24 Jul 2026 12:34:41 -0400 Subject: [PATCH 3/3] improve cluster job waiting log Signed-off-by: Eric Pickard --- pkg/deploymentrecord/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/deploymentrecord/client.go b/pkg/deploymentrecord/client.go index 405cd6a..38b9b59 100644 --- a/pkg/deploymentrecord/client.go +++ b/pkg/deploymentrecord/client.go @@ -342,7 +342,8 @@ func (c *Client) WaitForClusterJob(ctx context.Context, cluster string, jobID in return status, nil } slog.Info("waiting for cluster job completion", - "status", status, + "job_id", jobID, + "status", status.Status, "attempt", attempt, )