Skip to content

Runtime key type checking should be version-aware #811

Description

@claymcleod

I came across this while running sprocket lint on the broadinstitute/warp codebase. Several tasks there declare cpu as a String (e.g., cpu: "1"), and sprocket lint flags these as errors. I put up a fix in broadinstitute/warp#1811, but in doing so I realized the lint diagnostic isn't quite right for WDL 1.0 documents.

The WDL 1.0 spec does not formally define the cpu key. In 1.0, runtime keys are essentially arbitrary:

The runtime section defines key/value pairs for runtime information needed for this task. Individual backends will define which keys they will inspect so a key/value pair may or may not actually be honored depending on how the task is run.

(WDL 1.0 spec, Runtime Section)

Only docker and memory are given "recommended conventions" in 1.0. The formal type definitions for cpu, gpu, disks, maxRetries, and returnCodes were introduced in WDL 1.1.

Flagging a String-typed cpu value as an error in a version 1.0 document is technically incorrect, since the spec imposes no type constraint there. The type checking for these keys should only apply to documents declaring version 1.1 or later.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions