Repository navigation
air: Shorten MLflow run names and IDs the same way in air list - #7582
Merged
Merged
Conversation
The MLflow column of `air list` cut a long run name to its first characters, but showed the last characters of the run ID when the run had no name. Rows with long names sharing a prefix looked identical. The column now shows the run's name, or its ID when the name is unknown, and shortens either one the same way: a label that doesn't fit keeps its end behind a leading "…". Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Collaborator
✅ Integration test reportCommit: 5b94fb6
Top 6 slowest tests (at least 2 minutes):
|
Contributor
|
Non-blocking: the shared |
maggiewang-db
approved these changes
Nov 13, 2026
Covers the list row's width budget when a retry note follows a shortened label, and the whole run ID in the info pane. Also corrects the label's doc comment and widens the changelog entry to cover run IDs. Co-authored-by: Isaac <no-reply@databricks.com>
truncate measured display width but cut by character count, so a cell with wide (for example CJK) text overflowed its column. It now cuts by display width. truncateStart is the keep-the-end variant, and the MLflow label uses it instead of its own loop. Co-authored-by: Isaac <no-reply@databricks.com>
Member
Author
|
Done in 60bd00e rather than as a follow-up: |
Collaborator
❌ Integration test reportCommit: d06516a
57 interesting tests: 45 FAIL, 9 RECOVERED, 3 KNOWN
Top 50 slowest tests (at least 2 minutes):
|
idelafuente-oc
pushed a commit
to idelafuente-oc/cli
that referenced
this pull request
Nov 14, 2026
…databricks#7583) ## Changes In the interactive `air list` table, the Experiment and User columns now shrink to fit the terminal width instead of pushing the columns to their right past the window edge. - The list tracks the terminal width from `WindowSizeMsg` and lays the columns out against it, on resize and when a lazily loaded page arrives. - When the table is wider than the terminal, Experiment and User give up cells, widest first, down to floors of 12 and 8 cells. - A shortened Experiment keeps its end behind a leading `…`, the rule databricks#7582 uses for the MLflow column, because experiment names often share a prefix. A shortened User keeps its start, since emails differ there. - The one-shot table (piped output, `NO_COLOR`, `--limit`) is unchanged, including which end of a long Experiment it keeps. This PR builds on databricks#7582 (merged), which provides `truncateStart` and the display-width `truncate`. Known gaps: - The other columns have fixed widths, so the table only fits from about 136 columns up (measured on real runs; it depends on the statuses and durations shown). In narrower terminals it is narrower than before but the rightmost columns are still cut off. Fitting those widths means shrinking or hiding fixed columns, which this PR doesn't do. Tracked internally as CNXT-2619. - The full experiment name is meant to be read in the info pane (`i`), which shows `N/A` for many runs today. databricks#7587 fixes that. ## Why Every column was sized from its content, with Experiment and User capped at 36 cells, and nothing looked at the terminal width. With long experiment names the table was about 180 cells wide, so the columns to the right of Experiment were unreadable in most terminals. Internal ticket: CNXT-2610. In a 133-column terminal against real runs, cutting 14 distinct experiment names to 12 cells at their end left 7 distinct labels; keeping the end leaves all 14 distinct. ## Tests - Unit tests for the width allocation at 80, 120, 134, 160 and 200 columns, for relayout on resize and on a lazily loaded page, for which end each column keeps, and for the unchanged one-shot table. - `go test ./cmd/air`, `./task lint-q`. ## Manual test `air list --all-status --all-users` against a staging workspace in a 133-column terminal: Experiment shrank to 12 cells and User to 8. All 20 Experiment cells kept their end behind a leading `…`, and all 20 User cells kept their start. The table was 136 cells wide, so the `Accelerators` header lost its last 3 characters. The list model with fixture rows, long Experiment and User values: 160 columns, w/o fix (cut at the window edge): ``` Run ID Experiment Status Started Duration Progress MLflow User ▸ 684127395104822 /Users/someone.longname@example.com… ● SUCCESS 2026-10-23T17:32:39 1h 14m - qwen-run-001 someone.with.a.long.name.for ``` 160 columns, w/ fix: ``` Run ID Experiment Status Started Duration Progress MLflow User Accelerators ▸ 684127395104822 …art/qwen-finetune-lora ● SUCCESS 2026-10-23T17:32:39 1h 14m - qwen-run-001 someone.with.a.long.na… 8x H100 ``` 120 columns, w/ fix (Accelerators still cut off): ``` Run ID Experiment Status Started Duration Progress MLflow User ▸ 684127395104822 …netune-lora ● SUCCESS 2026-10-23T17:32:39 1h 14m - qwen-run-001 someone… ``` This pull request and its description were written by Isaac. --------- Co-authored-by: Isaac <no-reply@databricks.com>
idelafuente-oc
pushed a commit
to idelafuente-oc/cli
that referenced
this pull request
Nov 14, 2026
…` and `air get` (databricks#7601) ## Changes - A new `stripControl` helper in `cmd/air` removes terminal escape sequences (CSI, OSC, DCS, ...) and C0/C1 control characters from a string. Printable text, including non-ASCII, is kept. - It is applied where server-supplied names become display values: - the MLflow run name as it is fetched (`fetchMLflowRunName`), before it is shortened to the column width or written to the `air list` cache; - every `air list` table cell (`cell`), which also covers rows read from a cache written before this change; - the Experiment, MLflow Run and User fields of the `air get` box and the `air list` info pane (`renderFields`). - JSON output and link targets are unchanged. - The logs pane and `air logs` are out of scope: training logs legitimately contain colour codes. ## Why `air list` and `air get` printed the MLflow run name, experiment name and user name exactly as the server sent them. A name carrying a set-window-title sequence (OSC 0), a clear-screen sequence (CSI 2J) or a carriage return reached the terminal of anyone who listed the run, for example with `--all-users`, so whoever named a run could clear the screen, retitle the window, write the clipboard (OSC 52) or overwrite a line so a fake row appeared. Not code execution; low to moderate severity. Pre-existing before databricks#7582. Internal ticket: CNXT-2620. ## Tests - `TestStripControl`: OSC terminated by BEL and by ST, OSC 52, CSI clear-screen and colour, carriage return, tab and newline, DEL, C1 controls, NUL, a two-byte escape sequence, a trailing ESC; plain and non-ASCII text are unchanged. - `TestFetchMLflowRunName` gains a case where the MLflow API returns a name with an OSC, a CSI and a carriage return. - `TestRenderFieldsStripsControlCharacters` and `TestRenderRowStripsControlCharacters` cover the `air get` box and the `air list` row, and check that column widths still line up. - New acceptance test `acceptance/air/control-chars`: `air get` and `air list` text output with escapes in the run name, experiment name and creator; `air list -o json` shows the strings passed through unchanged. Verified to fail without the fix. This pull request and its description were written by Isaac. --------- Co-authored-by: Dima Kotlyarov <dima.kotlyarov@your.hostname.com> Co-authored-by: Isaac <no-reply@databricks.com>
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.
Changes
air list, the MLflow column shows the run's name, or its run ID when the name is unknown, and shortens both the same way: a label wider than the column keeps its end behind a leading…. For example,qwen-finetune-2026-10-23-lr-3e-5shows as…ne-2026-10-23-lr-3e-5instead ofqwen-finetune-2026-10….…bcdef0123456789abcdef) instead of...plus the last 8 characters.air getand theair listinfo pane have no column to fit, so an unnamed run's MLflow Run field now shows the whole run ID instead of...plus its last 8 characters. A named run is unchanged there.air listcells are cut by display width, so a value with wide (for example CJK) characters no longer overflows its column. This applies to every column, not only MLflow: the sharedtruncatemeasured display width but cut by character count.truncateStartis its keep-the-end variant, which the MLflow label uses.The link target and the JSON output are unchanged.
Why
The column cut a long run name to its beginning but showed the end of the run ID for an unnamed run. Run names often share a prefix and differ at the end, so rows with long names looked the same while unnamed rows stayed distinguishable. The complete run ID is behind the cell's link and in the info pane's MLflow URL; the complete name is on the linked MLflow page. Internal ticket: CNXT-2611.
The unnamed-run label used to mirror the Python CLI's
...plus last-8 format (_get_mlflow_run_name). It now differs on purpose, so that names and IDs follow one rule.Tests
TestMLflowRunLabelcovers a long name, a short name, a name exactly at the width, an unnamed run, a short ID, wide characters, and no width limit.TestUnnamedOlderRetryLabelFitsTheListColumnAndIsWholeInTheInfoPanecovers a shortened label followed by a retry note in the list row, and the whole run ID in the info pane.TestTruncateFitsDisplayWidthcoverstruncateandtruncateStartwith wide characters, a cut that lands inside a wide character, combining marks, and widths of 0 to 2.go test ./cmd/air,go test ./acceptance -run TestAccept/air/,./task lint-q.This pull request and its description were written by Isaac.