Skip to content

Feat: improve message when no models are ready to run#3513

Merged
izeigerman merged 5 commits intomainfrom
trey/no-run-msg
Dec 20, 2024
Merged

Feat: improve message when no models are ready to run#3513
izeigerman merged 5 commits intomainfrom
trey/no-run-msg

Conversation

@treysp
Copy link
Contributor

@treysp treysp commented Dec 13, 2024

This PR updates the message displayed when the sqlmesh run command is executed but no models are ready to run.

The new message includes the time when the next model will be ready to run in UTC and local timezone.

Old output

Run finished for environment 'prod'

New output

No models are ready to run. Please wait until a model `cron` interval has elapsed.

Next run will be ready at 2024-12-13 6:00PM CST (2024-12-14 12:00AM UTC).

Implementation details:

  • Variable capturing run completion status changed from boolean to ternary ENUM success/failure/nothing to do
  • Start of next ready interval calculated as minimum over all models' interval_unit.cron_next(now())

@sungchun12
Copy link
Contributor

Love the formatting of the message. I bet some users will want the ability to configure the local timezone, but not needed for this PR.

@treysp treysp force-pushed the trey/no-run-msg branch 7 times, most recently from 3dd4b05 to a9b5650 Compare December 18, 2024 20:09
@treysp treysp marked this pull request as ready for review December 18, 2024 20:09
@treysp treysp requested a review from a team December 18, 2024 20:10
@treysp treysp force-pushed the trey/no-run-msg branch 3 times, most recently from 91a982f to d5a5339 Compare December 19, 2024 23:02
@izeigerman izeigerman merged commit 1f71537 into main Dec 20, 2024
@izeigerman izeigerman deleted the trey/no-run-msg branch December 20, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants