Skip to content

Feature Request(CLI): print "Running" batch line when model evaluation starts (not only on completion) #5904

Open

Description

@ShantanuKumar

Problem

During sqlmesh run / plan evaluation, the formatted per-batch lines only appear after a batch finishes:

[1/1] silver.model1        [insert 2026-07-17 13:45:00-14:59:59]                                              3.44s
[1/1] silver.model2        [insert 2026-07-17 13:45:00-14:59:59, audits passed 1]                             3.70s
[1/1] silver.model3        [insert 2026-07-17 13:45:00-14:59:59]                                              1.86s

While silver.model4 is running (often minutes to hours for heavy engines like ClickHouse), there is no equivalent line in the same format. The log looks idle or stuck until the batch completes.

This is especially painful when:

  • Tailing CI / cron logs (non-interactive, no Rich Live UI)
  • Running long INSERT … SELECT batches (warehouse / OLAP workloads)
  • Debugging which model/interval is currently executing

Related: #3096 (better in-progress terminal clarity).

Environment

SQLMesh: >=0.235.4
Engine: ClickHouse (sqlmesh[clickhouse])
Command: sqlmesh run prod (cron / CI)

Current behavior

  1. Scheduler.run_node() calls console.start_snapshot_evaluation_progress(snapshot) at batch start.
  2. Evaluation runs (SnapshotEvaluator.evaluate()).
  3. console.update_snapshot_evaluation_progress(..., duration_ms=...) is called in finally after completion.

In TerminalConsole.update_snapshot_evaluation_progress, the formatted line is printed only when duration_ms is truthy:

# sqlmesh/core/console.py (approx.)
if duration_ms:
    msg = f"{batch} {display_name}   {annotation}   {duration}"
    self.evaluation_progress_live.console.print(msg)

While a batch runs, the only built-in indicator is a separate Rich spinner row under Executing model batches, which:

  • Uses a different format than the completion lines.
  • Often does not appear in captured logs / CI output.
  • Does not show the interval annotation (insert 2026-07-17 13:45:00-14:59:59).
  • File logger does emit Evaluating snapshot … / Inserting batch (start, end) into …, but not in the aligned CLI format.

Desired behavior

When a batch starts, print a line in the same format as completions, with a running indicator:

[1/1] silver.model1        [insert 2026-07-17 13:45:00-14:59:59]                                              3.44s
[1/1] silver.model2        [insert 2026-07-17 13:45:00-14:59:59, audits passed 1]                             3.70s
[1/1] silver.model3        [insert 2026-07-17 13:45:00-14:59:59]                                              1.86s
[1/1] silver.model4        [insert 2026-07-17 13:45:00-14:59:59]                                              Running

When the batch completes, either:

  • Replace/update that line with the final duration (1.86s), or.
  • Print the completion line as today (acceptable if start line exists)

Activity

  1. added
    Feature
    on Aug 8, 2026
  2. mday-io commented on Nov 30, 2026

    @mday-io
    Collaborator

    Some notes on scope while #6102 is in review.

    #6102 covers the main case here: when output goes to CI, cron or a log file, there are no live progress bars, so a long batch leaves the log silent until it finishes. With the Running rows printed only for non-interactive output, those logs show what's executing without adding lines to the interactive view, where the progress bars already show it.

    One part it doesn't cover is the point about the interval. In an interactive terminal, the progress-bar row shows the model but not which batch or interval is running. Adding the batch and interval to that row would answer "what's running right now" without printing anything extra. That would be a separate follow-up, and I'd welcome a PR for it. @Vamsi-klu, if you're interested once #6102 lands, it builds on the same code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions