Skip to content

fix(core): check job.health field in waitForJobToComplete for pod-status health sources - #144

Merged
birme merged 1 commit into
mainfrom
fix/143-waitforjob-health-field
Jul 7, 2026
Merged

birme merged 1 commit into
mainfrom
fix/143-waitforjob-health-field

Conversation

@birme

@birme birme commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

  • waitForJobToComplete now checks both job.status and job.health against terminal success/failure sets
  • Services like eyevinn-ffmpeg-s3 that use a pod-status health source signal completion via job.health === 'SuccessCriteriaMet' — job.status is never set to a terminal value for these services
  • Failure via job.health (e.g. 'Failed', 'FailureTarget') is also detected and thrown correctly

Root cause

The previous fix (#129) added SuccessCriteriaMet as a recognised job.status value. However for eyevinn-ffmpeg-s3 the orchestrator never sets job.status to SuccessCriteriaMet — it sets job.health instead. The two fields are populated by different health sources and are independent.

Test plan

  • Existing status-based tests still pass
  • New tests: job.health === 'SuccessCriteriaMet' resolves, job.health === 'Complete' resolves, job.health === 'Failed' throws, job.health === 'FailureTarget' throws

Closes #143

Lessons

job.status and job.health are populated by different orchestrator health sources and are independent — a service can have a terminal health value while status stays non-terminal. Any completion predicate must check both fields.

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

…tus health sources (#143)

Services like eyevinn-ffmpeg-s3 signal completion via job.health === 'SuccessCriteriaMet'
rather than job.status. The previous implementation only checked job.status, causing
waitForJobToComplete to spin all 1000 iterations (~16 min) even after the job had finished.

Now both job.status and job.health are checked against the terminal success and failure sets.

Closes #143

Co-Authored-By: Claude <noreply@anthropic.com>
@birme birme self-assigned this Jul 7, 2026
@birme
birme merged commit a2df373 into main Jul 7, 2026
1 check passed
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.

waitForJobToComplete never resolves for eyevinn-ffmpeg-s3 (polls wrong field)

1 participant