Skip to content

Validate cwl#206

Merged
grallewellyn merged 4 commits intodevelopfrom
validate-cwl
Feb 26, 2026
Merged

Validate cwl#206
grallewellyn merged 4 commits intodevelopfrom
validate-cwl

Conversation

@grallewellyn
Copy link
Member

Checks the syntax of the cwl in the API so that it fails on the POST request for the user, for example for running James's cwl the API POST request fails with

{"type": null, "title": "CWL file is not in the right format or is invalid.", "status": 400, "detail": "CWL file is not in the right format or is invalid.", "instance": ""}

This is deployed on DIT for testing

Copy link
Member

@marjo-luc marjo-luc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When validating CWL for MAAP, we've been using both cwltool and ap-validator (the latter provides OGC validation). Should we be using both for here as well to make sure we are validating CWLs consistently?

See here: https://github.com/MAAP-Project/ogc-app-pack-generator

@grallewellyn
Copy link
Member Author

@marjo-luc I agree and made the change

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@grallewellyn grallewellyn merged commit 09ba154 into develop Feb 26, 2026
2 of 3 checks passed
@grallewellyn grallewellyn deleted the validate-cwl branch February 26, 2026 22:22
@sujen1412
Copy link
Collaborator

I do not agree with the way this is implemented. We should not run subprocess commands in an API.
Please look for a pythonic way to do this. Under heavy load in our current setup the api machine will start rejecting requests especially when we are relying on many external dependencies.

  • Network to download CWL
  • File IO to write to disk
  • Subprocess to now validate that.
    Please see if you can do all in memory so only dependency is network.

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

Successfully merging this pull request may close these issues.

3 participants