Skip to content

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

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions