common-workflow-language / common-workflow-language/cwlviewer
errors getting raw url as part of RO Bundle for not GitHub / GitLab repos
- Dominant language
- Java
- Stars
- 52
- Forks
- 29
- Avg merge
- 5h 12m
- Merged PRs (30d)
- 6
Description
`{'url': 'https://gitlab.bsc.es/lrodrig1/structuralvariants_poc.git', 'branch': '1.0.7', 'path': 'structuralvariants/cwl/subworkflows/bwa_index.cwl'}`
```
2022-12-31 16:30:23,369 ERROR [task-4] org.commonwl.view.researchobject.ROBundleService: Could not pack workflow when creating Research Object: While fetching https://gitlab.bsc.es/lrodrig1/structuralvariants_poc.git, got content-type of 'text/html'. Expected one of ['text/plain', 'application/json', 'text/vnd.yaml', 'text/yaml', 'text/x-yaml', 'application/x-yaml', 'application/octet-stream'].
ERROR Tool definition failed validation:
https://gitlab.bsc.es/lrodrig1/structuralvariants_poc.git:5:17: mapping values are not allowed here
org.commonwl.view.cwl.CWLValidationException: While fetching https://gitlab.bsc.es/lrodrig1/structuralvariants_poc.git, got content-type of 'text/html'. Expected one of ['text/plain', 'application/json', 'text/vnd.yaml', 'text/yaml', 'text/x-yaml', 'application/x-yaml', 'application/octet-stream'].
ERROR Tool definition failed validation:
https://gitlab.bsc.es/lrodrig1/structuralvariants_poc.git:5:17: mapping values are not allowed here
at org.commonwl.view.cwl.CWLTool.runCwltoolOnWorkflow(CWLTool.java:121)
at org.commonwl.view.cwl.CWLTool.getPackedVersion(CWLTool.java:60)
at org.commonwl.view.researchobject.ROBundleService.createBundle(ROBundleService.java:204)
at org.commonwl.view.researchobject.ROBundleFactory.createWorkflowRO(ROBundleFactory.java:80)
at org.commonwl.view.researchobject.ROBundleFactory$$FastClassBySpringCGLIB$$c15d1fdc.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
```
Due to not detecting that https://gitlab.bsc.es is a GitLab based host
https://github.com/common-workflow-language/cwlviewer/blob/91a06b908b75247691b9d1b04c42c747a4353baa/src/main/java/org/commonwl/view/git/GitDetails.java#L98
https://github.com/common-workflow-language/cwlviewer/blob/91a06b908b75247691b9d1b04c42c747a4353baa/src/main/java/org/commonwl/view/git/GitDetails.java#L195-L196
A harder example: `{'url': 'https://git.wur.nl/unlock/cwl.git', 'branch': 'master', 'path': 'cwl/workflows/workflow_indexbuilder.cwl'}` (also GitLab based host)
This raw URL is needed to pack the workflow; why aren't we using the local git checkout?
https://github.com/common-workflow-language/cwlviewer/blob/91a06b908b75247691b9d1b04c42c747a4353baa/src/main/java/org/commonwl/view/researchobject/ROBundleService.java#L203-L204
Contributor guide
Assessment
This issue has not been assessed yet.