File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,22 @@ func convertToVerificationStatusMapResult(job v1alpha1.JobStatus) (*releasecontr
4141 if state == releasecontroller .ReleaseVerificationStateSucceeded && url == "" {
4242 state = releasecontroller .ReleaseVerificationStatePending
4343 }
44+ // The ReleasePayload controller sets AggregateState=Pending for retryable jobs
45+ // that have failed but haven't exhausted their retries. The release-controller's
46+ // retry logic needs to see Failed (not Pending) to trigger a retry with backoff.
47+ // Detect this by checking whether all results are failures while aggregate is Pending.
48+ if state == releasecontroller .ReleaseVerificationStatePending && job .MaxRetries > 0 && len (job .JobRunResults ) > 0 {
49+ allFailed := true
50+ for _ , r := range job .JobRunResults {
51+ if r .State != v1alpha1 .JobRunStateFailure && r .State != v1alpha1 .JobRunStateAborted && r .State != v1alpha1 .JobRunStateError {
52+ allFailed = false
53+ break
54+ }
55+ }
56+ if allFailed {
57+ state = releasecontroller .ReleaseVerificationStateFailed
58+ }
59+ }
4460 status := & releasecontroller.VerificationStatus {
4561 Retries : getVerificationStatusRetries (job ),
4662 PreviousAttemptURLs : getVerificationStatusPreviousAttemptURLs (job .JobRunResults , url ),
You can’t perform that action at this time.
0 commit comments