Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cwl-runner validate fails after upgrade #69

Open
BJWiley233 opened this issue Jul 12, 2021 · 12 comments
Open

cwl-runner validate fails after upgrade #69

BJWiley233 opened this issue Jul 12, 2021 · 12 comments

Comments

@BJWiley233
Copy link

BJWiley233 commented Jul 12, 2021

The files are all existing and in correct folder structure after I moved them. Now when I run cwl-runner --validate I get this error below and org.w3id.cwl.cwl.File is no where in this yml file.

Tool definition file:///Users/****/****/UKBB/analysis-workflows/definitions_v1.1/tools/vep.cwl failed validation:
definitions_v1.1/tools/vep.cwl:5:1:                       checking field `requirements`
...more lines
...more lines
definitions_v1.1/types/vep_custom_annotation.yml:20:11:                   Field `type` references
                                                                          unknown identifier `org.w3id.cwl.cwl.File`,
                                                                          tried
                                                                          file:///Users/brian/Bolton/UKBB/analysis-workflows/definitions_v1.1/types/vep_custom_annotation.yml#vep_custom_annotation/annotation/org.w3id.cwl.cwl.File,

The line is under type: File below

  annotation:
    type:
      type: record
      name: info
      fields:
        file:
          type: File
          label: 'File to be used for annotation, include index file'

However when I run cwl-runner validate on the vep.cwl tool itself it works

@tetron
Copy link
Member

tetron commented Jul 12, 2021

So if I understand correctly, before upgrading, it validates correctly, but the upgraded version fails to validate?

There were some recent changes in the behavior of schema-salad, and cwl-upgrader has an unpinned dependency on schema salad, so that seems related.

Is this part of a SchemaDefRequirement?

@BJWiley233
Copy link
Author

BJWiley233 commented Jul 12, 2021

Yes it is! under vep.cwl tool:

requirements:
- class: InlineJavascriptRequirement
- class: SchemaDefRequirement
  types:
  - $import: ../types/vep_custom_annotation.yml

I already have schema-salad installed

@mr-c
Copy link
Member

mr-c commented Jul 12, 2021

@BJWiley233 Can you try with https://pypi.org/project/schema-salad/8.0.20210624154013/ instead of the latest version?

@BJWiley233
Copy link
Author

BJWiley233 commented Jul 12, 2021

Ah you replied at exact same time I updated. Let me check.

Anyways I got same error. Any time I have a type: File it fails. Examples are these 2 types:

https://github.com/genome/analysis-workflows/blob/master/definitions/types/vep_custom_annotation.yml
https://github.com/genome/analysis-workflows/blob/master/definitions/types/trimming_options.yml

I get same error with schema-salad-tool vep_custom_annotation.yml along lines of:

../../definitions/types/vep_custom_annotation.yml:19:19:         Field `type` references unknown
                                                                 identifier `File`, tried

@BJWiley233
Copy link
Author

Actually I just tested and my original v1.0 again with cwl-runner --validate and it doesn't work. My cwl-runner must have been updated.

@tetron
Copy link
Member

tetron commented Jul 13, 2021

Ok, so that is a regression in cwltool. The workaround is to go back a version or two.

Is your CWL publicly available somewhere, or would you be willing to share it, so we can debug it?

@ghost
Copy link

ghost commented Jul 13, 2021

Yes so it's not pretty because I was testing a lot of stuff but the most final I have and gives this org.w3id.cwl.cwl.File with cwl-runner/cwltool version 3.1.20210628163208 and schema-salad-tool version 8.1.20210627200047 is here. https://github.com/kbolton-lab/analysis-workflows/blob/master/definitions/pipelines/CH_exome_Final2.cwl

@mr-c
Copy link
Member

mr-c commented Nov 15, 2021

@bolton-lab Thanks for the testing document, however when I run cwltool --validate I get an error, so it is making it difficult to confirm if we have fixed your issue or not:

cwltool --validate https://github.com/kbolton-lab/analysis-workflows/raw/403afbbad8d4197166bad8e407e8b99fec0f4f49/definitions/pipelines/CH_exome_Final2.cwl
INFO /home/michael/cwl-upgrader/env310/bin/cwltool 3.1.20211107152837
[many warnings elided]
ERROR Tool definition failed validation:
https://github.com/kbolton-lab/analysis-workflows/raw/403afbbad8d4197166bad8e407e8b99fec0f4f49/definitions/pipelines/CH_exome_Final2.cwl:481:9: Step is missing
                                                                                                                                                required parameter
                                                                                                                                                'reference'

@BJWiley233
Copy link
Author

BJWiley233 commented Nov 15, 2021

ok ill update it now.

@mr-c it is updated now. just tested and it works with version 3.1.20211020155521

@mr-c
Copy link
Member

mr-c commented Nov 15, 2021

ok ill update it now.

@mr-c it is updated now. just tested and it works with version 3.1.20211020155521

Great news, thanks!

@mr-c mr-c closed this as completed Nov 15, 2021
@jonassmedegaard
Copy link

jonassmedegaard commented Jan 18, 2022

Is this issue perhaps not truly fixed yet?

Using cwl-upgrader 1.2.2 and then cwltool 3.1.20211104071347, both with schema-salad 8.2.20211104054942, on sample file Lancet.cwl, fails like this:

$ schema-salad-tool --print-rdfs Lancet.cwl
/usr/bin/schema-salad-tool Current version: 8.2.20211104054942
Schema `Lancet.cwl` failed link checking:
Lancet.cwl:13:1:  checking field `inputs`
Lancet.cwl:16:3:    checking field `TumorInput`
Lancet.cwl:17:5:      Field `type` references unknown identifier `File`, tried
                     file:///home/jonas/projects/DEBIAN/tmp/Joep/bio-cwl-tools/Lancet/Lancet.cwl#File
Lancet.cwl:23:3:    checking field `NormalInput`
Lancet.cwl:24:5:      Field `type` references unknown identifier `File`, tried
                     file:///home/jonas/projects/DEBIAN/tmp/Joep/bio-cwl-tools/Lancet/Lancet.cwl#File
Lancet.cwl:30:3:    checking field `Reference`
Lancet.cwl:31:5:      Field `type` references unknown identifier `File`, tried
                     file:///home/jonas/projects/DEBIAN/tmp/Joep/bio-cwl-tools/Lancet/Lancet.cwl#File
Lancet.cwl:56:3:    checking field `BedFile`
                     Field `type` references unknown identifier `File`, tried
                     file:///home/jonas/projects/DEBIAN/tmp/Joep/bio-cwl-tools/Lancet/Lancet.cwl#File
Lancet.cwl:255:1: checking field `outputs`
Lancet.cwl:256:3:   checking field `vcf`
Lancet.cwl:258:5:     Field `type` references unknown identifier `stdout`, tried
                      file:///home/jonas/projects/DEBIAN/tmp/Joep/bio-cwl-tools/Lancet/Lancet.cwl#stdout

@mr-c mr-c reopened this Jan 19, 2022
@jonassmedegaard
Copy link

Identical failure with cwltool 3.1.20220119140128 and schema-salad 8.2.20220103095339, in case that is helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants