Page MenuHomePhabricator

Display natural language representation of cron string

Authored by sashank on Sep 11 2019, 5:01 AM.


Group Reviewers
Restricted Project
R1:31ac063cbbd2: Display natural language representation of cron string

Displays natural string representation of cron string instead of the cron string in the dagit scheduler UI. See

Also, the cron strings in the examples were set incorrectly (daily instead of hourly) and are fixed in this diff.

Test Plan

cd /dagster/examples/dagster_examples/experimental
dagit -p 3333
open http://localhost:3000/scheduler

Diff Detail

R1 dagster
Lint OK
No Unit Test Coverage

Event Timeline

sashank created this revision.Sep 11 2019, 5:01 AM
sashank edited the test plan for this revision. (Show Details)Sep 11 2019, 5:02 AM
sashank updated this revision to Diff 4595.Sep 11 2019, 5:21 AM

Update snapshots

sashank added inline comments.Sep 11 2019, 5:22 AM
95 ↗(On Diff #4595)

Is there anyway we keep these compiled classnames consistent so that we don't have to update snapshots whenever we make a dagit change?

schrockn requested changes to this revision.Sep 11 2019, 2:15 PM
schrockn added a subscriber: schrockn.

What do we do in the case where there is a cron string that is difficult or impossible to translate to a string?

95 ↗(On Diff #4595)

We should just hide the snapshot files from phab by default. We do this for generated typescript files. It's some setting in phab that I don't know off the top of my head

This revision now requires changes to proceed.Sep 11 2019, 2:15 PM
sashank updated this revision to Diff 4629.Sep 11 2019, 10:10 PM

Handle invalid cron strings

sashank added inline comments.Sep 11 2019, 10:14 PM

@schrockn added this check for invalid cron strings. If a cron string is valid, this library can translate it.

can you post screenshot of UI with a complicated cron string

Harbormaster completed remote builds in B3718: Diff 4631.
schrockn accepted this revision.Sep 11 2019, 10:21 PM
This revision is now accepted and ready to land.Sep 11 2019, 10:21 PM