treasure-data / digdag

Workload Automation System
https://www.digdag.io/
Apache License 2.0
1.3k stars 221 forks source link

should be possible to disable a scheduled workflow #30

Closed danielnorberg closed 7 years ago

danielnorberg commented 8 years ago

Currently the only way to disable a scheduled workflow (so that it doesn't get run) is to push another revision to the same repo.

frsyuki commented 8 years ago

How do you want to declare that a schedule is disabled? Why don't you use commenting out? Or do you want to disable a schedule temporarily?

frsyuki commented 8 years ago

Do you mean that deleting repository is not supported? Then please update the title.

danielnorberg commented 8 years ago

I mean something that allows a user to disable/stop a pushed/scheduled workflow from executing without having to modify and push a new revision.

E.g. something like

# Disable the workflow
digdag disable <repo> <+name>

# ... Until
digdag enable <repo> <+name>

One of the useful scenarios for this is when a user (either the original author or another person in the same organization) doesn't actually have access to the workflow yaml file.

To make a parallell with e.g. travis-ci/circle-ci, it's possible to administratively stop/pause/disable the CI of a repo using the admin UI without having to make changes to .{travis,circle}.yml

frsyuki commented 8 years ago

OK. My idea was to add temporary-disabled-flag to a revision (like this: https://github.com/treasure-data/digdag/blob/master/digdag-core/src/main/java/io/digdag/core/database/DatabaseMigrator.java#L285 ) but adding flag to a schedule seems better.

I think this is useful also in production if an external service is in maintenance and we don't want to start workflow until it comes back.

Adding a disable flag to a workflow feels that require>: +name and call>: +name fails if +name is disabled. We need to decide...workflow or schedule.

frsyuki commented 7 years ago

309 added REST API to do this.

danielnorberg commented 7 years ago

https://github.com/treasure-data/digdag/pull/321

frsyuki commented 7 years ago

done