[UX]: Make run status in UI and CLI easier to understand#2716
Merged
peterschmidt85 merged 14 commits intomasterfrom Jun 3, 2025
Merged
[UX]: Make run status in UI and CLI easier to understand#2716peterschmidt85 merged 14 commits intomasterfrom
peterschmidt85 merged 14 commits intomasterfrom
Conversation
r4victor
reviewed
Jun 2, 2025
olgenn
approved these changes
Jun 3, 2025
Commented ESLint (until warnigns are fixed)
r4victor
reviewed
Jun 3, 2025
Comment on lines
+353
to
+377
| def _get_error(termination_reason: Optional[JobTerminationReason]) -> Optional[str]: | ||
| if termination_reason == JobTerminationReason.INSTANCE_UNREACHABLE: | ||
| return "instance unreachable" | ||
| elif termination_reason == JobTerminationReason.WAITING_INSTANCE_LIMIT_EXCEEDED: | ||
| return "waiting instance limit exceeded" | ||
| elif termination_reason == JobTerminationReason.VOLUME_ERROR: | ||
| return "waiting runner limit exceeded" | ||
| elif termination_reason == JobTerminationReason.GATEWAY_ERROR: | ||
| return "gateway error" | ||
| elif termination_reason == JobTerminationReason.SCALED_DOWN: | ||
| return "scaled down" | ||
| elif termination_reason == JobTerminationReason.INACTIVITY_DURATION_EXCEEDED: | ||
| return "inactivity duration exceeded" | ||
| elif termination_reason == JobTerminationReason.TERMINATED_DUE_TO_UTILIZATION_POLICY: | ||
| return "utilization policy" | ||
| elif termination_reason == JobTerminationReason.PORTS_BINDING_FAILED: | ||
| return "ports binding failed" | ||
| elif termination_reason == JobTerminationReason.CREATING_CONTAINER_ERROR: | ||
| return "runner error" | ||
| elif termination_reason == JobTerminationReason.EXECUTOR_ERROR: | ||
| return "executor error" | ||
| elif termination_reason == JobTerminationReason.MAX_DURATION_EXCEEDED: | ||
| return "max duration exceeded" | ||
| else: | ||
| return None |
Collaborator
There was a problem hiding this comment.
Maybe define a mapping instead of a big if? Also I think we'll forget to update this when adding new termination reasons unless there is a test that checks all reasons are mapped.
Contributor
Author
There was a problem hiding this comment.
Fixed, also added tests
r4victor
reviewed
Jun 5, 2025
| # We can attach to run multiple times if it goes from running to pending (retried). | ||
| while True: | ||
| with MultiItemStatus(f"Launching [code]{run.name}[/]...", console=console) as live: | ||
| while not _is_ready_to_attach(run): |
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.
Fixes #2655
Statuscolumn (both CLI and UI), show a human-readable status explaining the termination reason from the last job submission (ExampleFailed->Exited (137);Failed->No offers, etc)AbortedorNo offers, use Yellow)Errorcolumn (both CLI and UI), show a human-readable status only in case theStatusinformation is not enough (e.g. do not show anything in case ofNo offersorExited (137).Reservationcolumn into theInstance typecolumnStatuschanges in the output ofdstack applyin case the run has failed due toNo offersorExited (X)