Skip to content

fix: match pod names truncated by apiserver generateName - #16

Merged
Breee merged 1 commit into
mainfrom
fix/pod-name-truncation
Sep 4, 2026
Merged

fix: match pod names truncated by apiserver generateName#16
Breee merged 1 commit into
mainfrom
fix/pod-name-truncation

Conversation

@Breee

@Breee Breee commented Sep 4, 2026

Copy link
Copy Markdown
Member

The Job controller sets the pod generateName to job.Name + "-" and the apiserver truncates that base to 58 chars (63 minus the 5-char random suffix) before appending the suffix. Argo Rollouts names its Jobs .., and the 36-char UID means a metric name over ~18 chars pushes the base past the limit, so the attempt suffix and the dash are silently cut from the pod name.

buildQuery derived its regex from the untruncated Job name, so it could never match those pods and the log pane came up empty. Reproduce the apiserver rule via podNamePrefix so the regex is correct for any Job name length: unchanged below 58 chars, truncated to the same prefix above it.

The Job controller sets the pod generateName to job.Name + "-" and the
apiserver truncates that base to 58 chars (63 minus the 5-char random
suffix) before appending the suffix. Argo Rollouts names its Jobs
<analysisRun UID>.<metric>.<attempt>, and the 36-char UID means a metric
name over ~18 chars pushes the base past the limit, so the attempt suffix
and the dash are silently cut from the pod name.

buildQuery derived its regex from the untruncated Job name, so it could
never match those pods and the log pane came up empty. Reproduce the
apiserver rule via podNamePrefix so the regex is correct for any Job name
length: unchanged below 58 chars, truncated to the same prefix above it.
@Breee
Breee merged commit 5aa302d into main Sep 4, 2026
5 checks passed
@Breee
Breee deleted the fix/pod-name-truncation branch September 4, 2026 10:57
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.

1 participant