Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions internal/controller/reporting.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand Down
6 changes: 6 additions & 0 deletions pkg/deploymentrecord/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down Expand Up @@ -340,6 +341,11 @@ func (c *Client) WaitForClusterJob(ctx context.Context, cluster string, jobID in
if status.Status == "completed" || status.Status == "failed" {
return status, nil
}
slog.Info("waiting for cluster job completion",
"job_id", jobID,
"status", status.Status,
"attempt", attempt,
)

delay := time.Duration(math.Min(
float64(initialDelay)*math.Pow(2, float64(attempt)),
Expand Down