Skip to content

Misleading exception when trying to submit a workflow with no runs #822

@aplowman

Description

@aplowman

This workflow has no actions:

yml = """
name: test
template_components:
  task_schemas:
    - objective: t1
      inputs:
        - parameter: p1
tasks:
  - schema: t1
    inputs:
      p1: 1
"""
wk = hf.Workflow.from_YAML_string(YAML_str=yml)
wk.submit()

But when we submit it we get a ZeroDivisionError when using the (default) zarr store. When we use the json store we get no exception, but an odd "Submitted 0 jobscripts" message. In both cases, I think we should get a message about the submission having no runs to execute, like we raise here:

raise ValueError("No pending element action runs to submit!")
.

Metadata

Metadata

Assignees

No one assigned

    Labels

    actionsRelated to usage, creation, documentation etc of task schema actionsbugSomething isn't workingsubmissionRelated to workflow submission

    Type

    Projects

    Status

    🔲 Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions