inab / WfExS-backend

Workflow Execution Service Backend
Apache License 2.0
17 stars 6 forks source link

Misidentified workflow entrypoint from WorkflowHub entry #128

Open jmfernandez opened 1 month ago

jmfernandez commented 1 month ago

(originally submitted by @kbarrass1252)

Hi @jmfernandez ! TY so much!

However - we still have an issue as follows:

"(.pyWEenv) **@ip----**:~/wfexs/WfExS-backend$ python3 WfExS-backend.py -L config/local_config_admin.yaml execute -W omopworkflow/omop-workflow.stage 2024-10-16 08:33:14,835 - [INFO] Setting up docker to /usr/bin/docker (derived from docker) (core: True) 2024-10-16 08:33:14,836 - [INFO] Setting up git to /usr/bin/git (derived from git) (core: False) 2024-10-16 08:33:14,836 - [INFO] Setting up java to /usr/bin/java (derived from java) (core: True) 2024-10-16 08:33:14,836 - [INFO] Setting up singularity to /usr/local/bin/singularity (derived from singularity) (core: True) 2024-10-16 08:33:14,836 - [INFO] Setting up staticBash to /usr/bin/bash-linux-x86_64 (derived from bash-linux-x86_64) (core: False)

However - our fallback test which is to run the CWL through cwltool through conda runs the CWL without any error :(

Originally posted by @kbarrass1252 in https://github.com/inab/WfExS-backend/issues/124#issuecomment-2416133553

jmfernandez commented 1 month ago

@kbarrass1252 This issue is happening because although old heuristics are obtaining the workflow repo from the RO-Crate, they are not realising about the workflow entrypoint within the repo.

I have performed an inspection of the RO-Crate, and it has all what it is needed for that, so implementation and heuristics are incomplete.

I'm going to write a fix for these cases.

kbarrass1252 commented 1 month ago

Amazing! - TY @jmfernandez !

jmfernandez commented 1 month ago

@kbarrass1252 I have merged a commit with a partial fix to main branch.

It is partial, because it works only when the relative internal structure of the RO-Crate (where the mainEntity of the workflow is declared) matches the relative internal structure of the original repository, and the default branch of the repo contains it. Details about the specific commit, branch or tag used when the WorkflowHub entry was created or updated do not appear in the RO-Crate (at least, not yet).

Once this issue is solved, I'm tagging 1.0.0rc2

beforan commented 1 month ago

@jmfernandez just to add to this, this is something I also encountered when testing my TRS implementation as a possible solution to airgapped executions (sourcing workflows from a local TRS service rather than public internet).

Happy to test changes to this going forwards in our regular collaboration.

jmfernandez commented 1 month ago

@beforan I would love to test it with a local TRS service, so I can stress the codepath at

https://github.com/inab/WfExS-backend/blob/main/wfexs_backend/wfexs_backend.py#L2448-L2495

I wrote that code ages ago in order to support "pure" TRS implementations like Dockstore and Sapporo, but I have not tested it recently. The only prerequisite is having either remote_workflow_entrypoint declared in its metadata, or all the involved workflow files plus the workflow_entrypoint in its metadata.