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

support self-hosted gitlab URLs instead of having to fill out the long form #448

Open
swzCuroverse opened this issue Sep 9, 2022 · 3 comments

Comments

@swzCuroverse
Copy link

From question on forum -- CWL-viewer seems to have issues viewing a cwl workflows form gitlabs-- I replicated it as well.
Link: https://gitlab.inria.fr/capsid.public_codes/CroMaSt/-/blob/main/CroMaSt.cwl

Link to question:
https://gitlab.inria.fr/capsid.public_codes/CroMaSt/-/blob/main/CroMaSt.cwl

I went and found a another CWL workflow from gitlabs here -- https://gitlab.com/iidsgt/biocwl/-/blob/master/Workflows/Build-RNA-Indexes.cwl and it also couldn't render it -- so it might be a general issue with gitlab URLs.

@cwl-bot
Copy link

cwl-bot commented Sep 9, 2022

This issue has been mentioned on Common Workflow Language Discourse. There might be relevant details there:

https://cwl.discourse.group/t/about-cwl-viewer/632/9

@kinow
Copy link
Member

kinow commented Sep 9, 2022

Hi, the URL provided, https://gitlab.inria.fr/capsid.public_codes/CroMaSt/-/blob/main/CroMaSt.cwl, does not pass the current regex tests in the JavaScript code

if (gitPattern.test(input)) {
var success = false;
if (input.startsWith("ssh") || input.startsWith("git@")) {
addWarning("url", "SSH is not supported as a protocol, please provide a HTTPS URL to clone");
} else {
success = true;
if (!$("#branch").val()) {
addWarning("branch", "You must provide a branch name for the workflow");
success = false;
}
if (!$("#path").val()) {
addWarning("path", "You must provide a path to the workflow or a directory of workflows");
success = false;
}
}
return success;
} else if (!githubPattern.test(input) && !gitlabPattern.test(input)) {
addWarning("url", "Must be a URL to a workflow or directory of workflows on Gitlab or Github, or a Git repository URL");
return false;
.

There are two regular expressions, one for GitHub, and for for GitLab. Respectively:

  • https?://github.com
  • https?://gitlab.com

So they expect that any URL provided to CWL Viewer starts with either github.com or gitlab.com.

@swzCuroverse now with so many companies hosting their own internal GitLab servers, I think maybe we should consider supporting other ways to verify if a URL is hosted on GitLab, GitHub, or any other git server (e.g. the Apache Software Foundation uses primarily gitweb, https://gitbox.apache.org/, but allows other projects to change and use gitlab/github with a mirror to gitweb/gitbox).

-Bruno

@mr-c mr-c changed the title CWL-viewer having issues recognizing gitlab URLs support self-hosted gitlab URLs instead of having to fill out the long form Sep 10, 2022
@cwl-bot
Copy link

cwl-bot commented Sep 10, 2022

This issue has been mentioned on Common Workflow Language Discourse. There might be relevant details there:

https://cwl.discourse.group/t/about-cwl-viewer/632/10

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

3 participants