Feat: improve CLI evaluation progress bar#4000
Merged
Conversation
1119862 to
e76ebb8
Compare
erindru
reviewed
Mar 14, 2025
fddbf4d to
b5779b0
Compare
cf879e3 to
f9310ad
Compare
izeigerman
reviewed
Mar 28, 2025
izeigerman
reviewed
Mar 28, 2025
izeigerman
approved these changes
Mar 28, 2025
Collaborator
izeigerman
left a comment
There was a problem hiding this comment.
Please consider my suggestions. Looks good otherwise
708b301 to
ec659e4
Compare
4b0420b to
0cff15f
Compare
694999a to
0a16391
Compare
sungchun12
suggested changes
Mar 31, 2025
| action_str = "[green]promoted[/green]" if promoted else "[yellow]demoted[/yellow]" | ||
| self.promotion_progress.live.console.print( | ||
| f"{snapshot.display_name(self.environment_naming_info, self.default_catalog, dialect=self.dialect)} {action_str}" | ||
| f"{snapshot.display_name(self.environment_naming_info, self.default_catalog if self.verbosity < Verbosity.VERY_VERBOSE else None, dialect=self.dialect).ljust(self.PROGRESS_BAR_COLUMN_WIDTHS['name'])} {action_str}" |
Contributor
sungchun12
approved these changes
Mar 31, 2025
5b236c0 to
052f142
Compare
Co-authored-by: Sung Won Chung <sungwonchung3@gmail.com>
Co-authored-by: Sung Won Chung <sungwonchung3@gmail.com>
Co-authored-by: Sung Won Chung <sungwonchung3@gmail.com>
052f142 to
ef04ff7
Compare
afzaljasani
pushed a commit
that referenced
this pull request
Apr 8, 2025
Co-authored-by: Sung Won Chung <sungwonchung3@gmail.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.

This PR updates the CLI
planmodel evaluation progress bar output and modifies all progress bar labels.Evaluation progress bar
The evaluation progress bar prints one line of output for each executed batch.
Currently, it includes the node's batch number, node's name, and batch run time:
[3/7] sushi.customer_revenue_lifetime evaluated in 0.02sThe new output includes more information for each batch and is vertically aligned across batches. The column widths are static and specified in the code. If a model's information string is longer than the column width, the information is truncated with 3 dots (dots on left for node names so you see table, right for annotation so you see SQLMesh action).
This annotated screenshot below shows evaluation progress bar output from a modified version of the sushi project. The output includes an annotation of what SQLMesh did for each node:
raw.demographicsis an external model, and SQLMesh ran its auditssushi.added_modelis an hourly incremental by time model processing an interval <24h, so its interval start/end times are displayedsushi.raw_marketingis a full model, so SQLMesh fully refreshed the tablesushi.waiter_namesis a seed model, so SQLMesh inserted from fileassert_item_price_above_zerois a standalone audit, which SQLMesh ransushi.top_waitersis a view, so SQLMesh recreated the viewModel kind annotations not in screenshot:
INCREMENTAL_BY_UNIQUE_KEY: [insert or update rows]INCREMENTAL_BY_PARTITION: [insert partitions]All other model kinds display the processed interval start/ends, including time if the interval is <24h long.
Progress bar language
Creating physical tables-->Updating physical layerModel versions created successfully-->✔ Physical layer updatedEvaluating models-->Executing model batchesModel batches executed successfully-->✔ Model batches executedVirtually Updating 'prod'-->Updating virtual layerTarget environment updated successfully-->✔ Virtual layer updatedDefault catalog in display names
Currently, we only display a model's catalog if it was explicitly specified (and not if SQLMesh used the default catalog).
This PR updates very verbose mode (
sqlmesh plan -vv) to include default catalog in all model names.