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

Undeploy of processor with missing or invalid CWL causes Internal Server Error in ADES #38

Open
njunike opened this issue Aug 15, 2023 · 2 comments

Comments

@njunike
Copy link

njunike commented Aug 15, 2023

Calling the URL DELETE {userId}/wps3/processes/{processorId} will cause ADES to fail with HTTP 500 Internal Server Error when the URL pointing to CWL used to deploy the processor no longer is valid.

When the CWL-file is missing, the error is:
{ "title": "NoApplicableCode", "type": "NoApplicableCode", "detail": "Can't download the file: cwlVersion: v1.0\n$namespaces:\n s: https:\/\/schema.org\/\nschemas:\n- http:\/\/schema.org\/version\/9.0\/schemaorg-current-http.rdf\n\n#version of this processor app:\ns:softwareVersion: 1.0.0\n\n$graph:\n- class: Workflow\n doc: Simple demonstration workflow for ieoto that computes one or more check sums on each of the inputs provided.\n id: test-app\n requirements:\n - class: ScatterFeatureRequirement\n inputs:\n algorithm:\n doc: The algorithms to be used for checksum calculation. Allowed values are md5sum, sha256sum or sha512sum.\n label: checksum algorithm\n type: string[]\n input:\n doc: >\n Input products. Note that the input products are provided as URLs on request level and are \n transformed into directory elements by the ieoto processing framework internally.\n label: Input dir\n type: Directory[]\n label: pb-ades-test-processor\n outputs:\n - id: wf_outputs\n outputSource:\n - checksum_step\/results\n type:\n Directory[]\n steps:\n checksum_step:\n scatter: [algorithm]\n #scatterMethod: flat_crossproduct\n in:\n algorithm: algorithm\n input:\n source: input\n out:\n - results\n run: '#checksum'\n\n- id: checksum \n class: CommandLineTool\n baseCommand: \/app\/checksum_runner.sh\n inputs:\n algorithm:\n type: string\n inputBinding:\n position: 1\n input:\n type: Directory[]\n inputBinding:\n position: 2\n outputs:\n results:\n outputBinding:\n glob: .\n type: Directory\n requirements:\n InlineJavascriptRequirement: {}\n DockerRequirement:\n dockerPull: registry.gitlab.com\/petabite\/pb-internal\/pscout\/pb-ades-test-processor:main\n #dockerPull: pb-ades-test-processor:latest\n #stderr: std.err\n #stdout: std.out\n" }

When the CWL-file exists but is invalid, the error is e.g. (exact message depends on issue in CWL file):
{ "title": "NoApplicableCode", "type": "NoApplicableCode", "detail": "yaml-cpp: error at line 12, column 47: illegal map value" }

A re-download of CWL file should not be needed to delete a processor-resource. And ADES providing the original CWL in the error message of "missing"-case proves, that ADES already has all the information available to perform the delete.

The undeploy should be always possible as otherwise there may remain undeletable artifacts that can never be removed, e.g. when the resource hosting the CWL file changes.

Tested with ADES V2.0.17

@rconway
Copy link
Contributor

rconway commented Aug 16, 2023

I thought this was a previously known issue, that we remedied.
@bbrauzzi Can you remind me.

@rconway
Copy link
Contributor

rconway commented May 8, 2024

Tested with chart zoo-dru-dru-0.2.6 (app=0.1.8) - as per v1.4.

Steps:

  • Deploy using href to CWL (github raw reference)
  • Delete the CWL asset so that it no longer exists (wait for github raw caches to flush ~5 mins)
  • Delete the deployed process

Following these steps the processes was successfully undeployed.

@gfenoy I think this can be closed.

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

2 participants