Skip to content

No way of knowing a tool is valid without actually parsing or running it #224

@patmagee

Description

@patmagee

Problem

In the process of building a service that consumes WDL tools from a public TRS API, we realized that there was no mechanism in the TRS spec to detect whether a tool is "valid" according to the language specification that it is written or, or what execution engines it has previously been tested on. WE discovered that nearly 40% of the tools in the TRS repo did not even parse with MiniWDL making them unusable as a resource.

Because we were unable to rely on validity of the tools being specified by the TRS specification, we needed to implement a separate service entirely that exhaustively scrapes the TRS API, parsing and validating each tool and each tool version whenever a new tool is added, or the meta-version is updated. This is a large amount of duplication work which other members of the community will likely encounter when run

There were two classes of errors we discovered (both are valuable to report): Semantic errors and Structural / execution based errors. The semantic errors occur when the descriptor simply does not follow the defined language rules. This is hard to categorise as with WDL different engines have varying levels of strictness when it comes to what is "semantically correct". We chose to be spec compliant here and say tools that do not parse with miniwdl are semantically "incorrect".

The second class of errors (the structural / execution errors) occurred because some workflow engines interpret properties/config differently then others, OR the workflow itself (although semantically correct) simply failed reproducible for one reason or another

Both of these classes of errors can largely be mitigated by including some sort of "validity" property in the Tool version object in the TRS API.

Solutions

I think the simplest approach would be to have a valid field in the tool version with the simplest definition of this field being: "The workflow is semantically correct". We can probably say that if Any workflow engine is able to properly parse the workflow then it is "semantically correct", but of course I there is likely degrees of strictness here, and landing on a common definition may technically be hard in practice (really just for WDL).

The above fix would solve one class of errors, but it does not solve errors generated from different engines operating differently or the workflow just failing. I am not too sure how to represent this, but I think it would be very helpful to know what engines (and maybe even engine versions) a workflow has been successfully run against. Maybe we can add a more complex field like below? Also, I totally forgot that a single tool may be written in multiple descriptors, so we would some how need to account for that as well

{
  "validations": {
    "parses": true,
    "engines": [
      {
        "name": "cromwell",
        "version": "79",
        "status": "pass"
      },
      {
        "name": "miniwdl",
        "version": "1.5.2",
        "status": "fail"
      }
    ]
  }
}

A natural problem with the above suggestions is answering "Where do these validations come from". One approach is relying on the TRS implementation to test or parse every single workflow it serves. This places a fairly high burden on the TRS implementation and it is unlikely that they will have full coverage of all workflow engines / langauges. Another option would be allowing the users to self attest or provide some sort of "proof" to the validity of the workflows. To be honest, I am not sure what the right approach is here

┆Issue is synchronized with this Jira Story
┆Project Name: Zzz-ARCHIVE GA4GH tool-registry-service
┆Issue Number: TRS-60

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions