Skip to content

Versions list: fix V/✔ shown for terminated combined-push jobs#246

Merged
asafyehezkel merged 1 commit into
masterfrom
fix-terminated-push-v-state
Jun 11, 2026
Merged

Versions list: fix V/✔ shown for terminated combined-push jobs#246
asafyehezkel merged 1 commit into
masterfrom
fix-terminated-push-v-state

Conversation

@moshe-kabala

Copy link
Copy Markdown
Contributor

Summary

The version selector in the CLI was rendering a green ✔ next to versions whose push job had been terminated (e.g. user hits Ctrl-C at step 3 of the Push pipeline after the model record has already been written).

Root cause: GetRunsStatusesPerVersionId only queries the legacy split push subtypes:

subTypes := []tensorleapapi.JobSubType{
    tensorleapapi.JOBSUBTYPE_IMPORT_MODEL,
    tensorleapapi.JOBSUBTYPE_CODE_PARSE,
}

Pushes after the code-parse + import-model merger run as a single JOBSUBTYPE_PUSH job. The call returns an empty list for those versions, CalcVersionStatus's for _, job := range lastJobByType loop runs zero iterations, and the function falls through to VersionStatus_FINISHED whenever hasModel is true — exactly the "terminated at step 3" case the user reported.

Fix: add JOBSUBTYPE_PUSH to the subtype filter. The classifier now sees the terminated combined-push job, IsJobFailed matches (Terminated/Stopped/Failed), and the version renders ✖.

Cases covered

Push subtype shape Terminated when? hasModel Before After
combined Push early (no model yet) false ✖ (via !hasModel)
combined Push late (model written) true ✔ (bug)
legacy Code Parse + Import Model any either ✖ (unchanged)
any subtype finished cleanly true ✔ (unchanged)

Test plan

  • Push a version on a project running the new combined-push engine, terminate it mid-pipeline, open the version selector → row shows ✖
  • Push a version on a project still emitting the legacy split jobs, terminate it → row still shows ✖ (regression check)
  • Push a version that finishes cleanly → row still shows ✔

GetRunsStatusesPerVersionId only queried the legacy IMPORT_MODEL +
CODE_PARSE subtypes; the new combined JOBSUBTYPE_PUSH (used by every
push after the code-parse + import-model merger) wasn't fetched.
CalcVersionStatus then saw zero jobs, never hit its IsJobFailed
branch, and — if the version's modelId had already been written
before termination — returned FINISHED, rendering a green ✔ next to
a terminated push.

Add JOBSUBTYPE_PUSH to the subtype filter so the loop can see and
classify the terminated Push job as failed (✖). Versions that were
terminated *before* a model record was created continue to flag as
failed via the existing !hasModel guard.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@asafyehezkel asafyehezkel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@asafyehezkel asafyehezkel merged commit efb7597 into master Jun 11, 2026
2 checks passed
@asafyehezkel asafyehezkel deleted the fix-terminated-push-v-state branch June 11, 2026 07:34
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.

2 participants