Handle Skipped event status#245
Merged
Merged
Conversation
The api added STATUSENUM_SKIPPED. Engine marks events SKIPPED when their work isn't needed for the run (continue-evaluate with no new samples, or update-evaluate that doesn't request a given optional step). Outcome is equivalent to FINISHED — data either already exists or wasn't required — so the CLI should render the step in a distinct style and not block on it. - New StepStatusSkipped + cyan em-dash icon in pkg/log/log_steps.go. - StepsFromJob (pkg/api/utils.go) maps STATUSENUM_SKIPPED → StepStatusSkipped. - WaitForConditionWithSteps (pkg/api/wait.go) treats Skipped as terminal-success alongside Done: it counts toward isAllStepsEnded and is skipped over by markLastStepAsFailed. Extracted isStepStatusSucceeded helper for the shared "Done OR Skipped" check. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
c14a48c to
afdb9a2
Compare
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
Builds on the existing
Update apicommit (5efc2da3) which brought inSTATUSENUM_SKIPPEDfrom the regenerated tensorleapapi client. Wires the new status through the CLI's step pipeline.pkg/log/log_steps.go— newStepStatusSkippedconstant + cyan em-dash icon (—) so a skipped step is visually distinct from Done (green ✔) and Failed (red ✖). Matches the web UI's blue Skipped tint.pkg/api/utils.go—StepsFromJobmapsSTATUSENUM_SKIPPED→StepStatusSkipped(was previously falling into thedefault→StepStatusWaitingbranch, which madewaitloop on it forever).pkg/api/wait.go—isAllStepsEndednow counts Skipped as terminal alongside Done;markLastStepAsFailedskips over it when picking the first non-success step. Extracted the shared check intoisStepStatusSucceeded(status).No api or engine changes — purely how the CLI interprets the existing event status.
Test plan
go test ./pkg/log/... ./pkg/api/...passes (currently green locally)tensorleap run waiton a job whose engine produced a Skipped event (e.g. continue-evaluate with no new samples →train_and_evaluateSkipped) renders the step with the cyan dash and returns when the run finishes (doesn't hang)