Skip to content

WDL needs a fail function #703

@markjschreiber

Description

@markjschreiber

It would be useful for a WDL script to be able to indicate to the engine that something has happened that requires the engine to fail the workflow. For example:

    input {
        Array[Float] downsample_fractions
    }

    # later ...

    scatter (fraction in downsample_fractions) {
        if (fraction <= 0.0 || fraction >= 1.0) {
            fail("all downsample fractions must be greater than 0 and less than 1")
        }
    }

Although the validation could be done by a task this would be very heavy weight for such a simple check. I would propose two forms of the fail function:

  1. fail(String) - The engine will fail the workflow and emit the error message. Any tasks still running when the fail call is made will keep running but no new tasks will start. The reason to keep running tasks running is mostly for call caching/ resume purposes. Essentially a graceful fail.
  2. fail(String, Boolean) - Same as above but if the Boolean is true then the engine will halt and fail any running tasks and fail and exit the workflow as soon as possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    S02-needs-owner(State) An issue that needs an individual to write an RFC.Z-good-first-issue(Metadata) An issue that would be good as a first issue to work on.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions