HomePhabricator

Create Scheduler UI in Dagit

Authored by Sashank Thupukari <s@thupukari.com> on Aug 21 2019, 4:23 PM.

Description

Create Scheduler UI in Dagit

Summary:
This diff introduces a UI for the scheduler. It is hidden behind the scheduler feature flag. It displays the list of schedule definitions and a list of currently running schedules. The running schedule rows are pretty empty for now, but we can use the space to add operational info (such as past runs, whether they succeeded, etc.).

Test Plan:

  1. Set scheduler feature flag in $DAGSTER_HOME/dagster.cfg:
[FEATURES]
scheduler=

Or simply:

echo "[FEATURES]\nscheduler=" > $DAGSTER_HOME/dagster.cfg
  1. Create a repository with a scheduler:
# repository.yaml

repository:
  file: repo.py
  fn: define_repo
# repo.py

from dagster import solid, pipeline, RepositoryDefinition, ScheduleDefinition
from dagster_cron import SystemCronScheduler

@solid
def hello_world(_):
    return "Hello world"

@pipeline
def hello_world_pipeline():
    return hello_world()

def define_repo():
    hello_world_every_minute_schedule = ScheduleDefinition(
        "hello_world_every_minute",
        cron_schedule="* * * * *",
        execution_params={
            "environmentConfigData": {"storage": {"filesystem": None}},
            "selector": {"name": "hello_world_pipeline", "solidSubset": None},
            "mode": "default",
        },
    )

    return RepositoryDefinition(
        name="demo_repository",
        pipeline_defs=[hello_world_pipeline],
        experimental={
            'scheduler': SystemCronScheduler,
            'schedule_defs': [hello_world_every_minute_schedule],
        },
    )
  1. Run dagster schedules start hello_world_every_minute
  1. Run dagit -p 3333

Reviewers: #ft, bengotow, alangenfeld

Reviewed By: #ft, alangenfeld

Subscribers: schrockn, alangenfeld, prha

Differential Revision: https://dagster.phacility.com/D855

Details

Committed
Sashank Thupukari <s@thupukari.com>Sep 11 2019, 2:08 AM
Reviewer
Restricted Project
Differential Revision
D855: Create Scheduler UI in Dagit
Parents
R1:17bc83991ad5: fix expand view for composite solids
Branches
Unknown
Tags
Unknown