Integrate INITIALIZING job status#249
Merged
Merged
Conversation
The updated tensorleapapi adds JOBSTATUS_INITIALIZING (the engine/node-server
report a job's build-dependencies phase as a first-class status). Add it to
IsJobRunning so every job-status check treats it as in-progress:
- the version status indicator (model/utils.go) shows RUNNING for a version
whose latest job is initializing, instead of falling through to FINISHED.
- the push/code/model/project wait loops already key only on
IsJobFinished/IsJobFailed, so an INITIALIZING job correctly falls through
and keeps polling.
IsJobFailed/IsJobFinished are unchanged (INITIALIZING is neither terminal nor
a failure), and the event-status mapping (mapStatus) is untouched since
INITIALIZING is a job status, not a per-event StatusEnum.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
roytl
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The regenerated
tensorleapapiaddsJOBSTATUS_INITIALIZING— the engine scheduler / node-server now report a job's build-dependencies (pippin) phase as a first-class status. This integrates it into every place the CLI checks job status.Change
pkg/api/utils.go—IsJobRunningnow includesJOBSTATUS_INITIALIZING.That's the single behavioral change; it's the central predicate, so it propagates everywhere:
pkg/model/utils.go): a version whose latest job isINITIALIZINGnow shows RUNNING instead of falling through to FINISHED.pkg/code,pkg/model,pkg/projectapi.go): they switch only onIsJobFinished/IsJobFailed, so anINITIALIZINGjob already falls through and keeps polling — no change needed, just confirmed correct.Left unchanged (intentionally)
IsJobFailed/IsJobFinished—INITIALIZINGis neither terminal nor a failure.mapStatus(StatusEnum→StepStatus) — that maps per-event statuses;INITIALIZINGis a job status, not an event status, so events never carry it.Test plan
go build ./...cleango vet ./pkg/api/... ./pkg/model/...cleanleap push -ewith changed deps → version shows RUNNING during the initialization phase, then transitions normallyleapversion listing shows the running indicator (not v/x) for an initializing versionPaired with
🤖 Generated with Claude Code