Page MenuHomePhabricator

Display natural language representation of cron string
ClosedPublic

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

Details

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

Displays natural string representation of cron string instead of the cron string in the dagit scheduler UI. See https://github.com/dagster-io/dagster/issues/1742

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

Repository
R1 dagster
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

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

Update snapshots

sashank added inline comments.Wed, Sep 11, 5:22 AM
js_modules/dagit/src/__tests__/__snapshots__/App.test.tsx.snap
95

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.Wed, Sep 11, 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?

js_modules/dagit/src/__tests__/__snapshots__/App.test.tsx.snap
95

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.Wed, Sep 11, 2:15 PM
sashank updated this revision to Diff 4629.Wed, Sep 11, 10:10 PM

Handle invalid cron strings

sashank added inline comments.Wed, Sep 11, 10:14 PM
js_modules/dagit/src/schedules/SchedulesRoot.tsx
131

@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.Wed, Sep 11, 10:21 PM
This revision is now accepted and ready to land.Wed, Sep 11, 10:21 PM