-
Notifications
You must be signed in to change notification settings - Fork 5
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
Normalise URL in conda package while using them to generate target image #786
Normalise URL in conda package while using them to generate target image #786
Conversation
Signed-off-by: munishchouhan <hrma017@gmail.com>
Tested locally:
CMD:
|
…rl-in-conda-packages
Signed-off-by: munishchouhan <hrma017@gmail.com>
Signed-off-by: munishchouhan <hrma017@gmail.com>
…rl-in-conda-packages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test similar to this
wave/src/test/groovy/io/seqera/wave/util/ContainerHelperTest.groovy
Lines 435 to 496 in 5fe4b4c
def 'should make request target' () { | |
expect: | |
ContainerHelper.makeTargetImage(BuildFormat.DOCKER, 'quay.io/org/name', '12345', null, null) | |
== 'quay.io/org/name:12345' | |
and: | |
ContainerHelper.makeTargetImage(BuildFormat.SINGULARITY, 'quay.io/org/name', '12345', null, null) | |
== 'oras://quay.io/org/name:12345' | |
and: | |
def conda = '''\ | |
dependencies: | |
- salmon=1.2.3 | |
''' | |
ContainerHelper.makeTargetImage(BuildFormat.DOCKER, 'quay.io/org/name', '12345', conda, null) | |
== 'quay.io/org/name:salmon-1.2.3--12345' | |
} | |
@Shared def CONDA1 = '''\ | |
dependencies: | |
- samtools=1.0 | |
''' | |
@Shared def CONDA2 = '''\ | |
dependencies: | |
- samtools=1.0 | |
- bamtools=2.0 | |
- multiqc=1.15 | |
''' | |
@Shared def CONDA3 = '''\ | |
dependencies: | |
- samtools=1.0 | |
- bamtools=2.0 | |
- multiqc=1.15 | |
- bwa=1.2.3 | |
- xx | |
- yy | |
- zz | |
''' | |
@Shared def PIP1 = '''\ | |
channels: | |
- bioconda | |
- conda-forge | |
dependencies: | |
- pip | |
- pip: | |
- pandas==2.2.2 | |
'''.stripIndent(true) | |
@Shared def PIP2 = '''\ | |
channels: | |
- bioconda | |
- conda-forge | |
dependencies: | |
- pip | |
- pip: | |
- pandas==2.2.2 | |
- numpy=1.0 | |
'''.stripIndent(true) |
…rl-in-conda-packages
Signed-off-by: munishchouhan <hrma017@gmail.com>
I added the tests but with this approach, image names are getting too big after appending the package URLs @pditommaso please let me know your thoughts |
Im inclined to remove it at all, @ewels what do you think? |
Can't we just leave it to the normal "URI is too long, shorten it" method? Could also aim to be a bit clever and match GitHub URLs, stripping of the uninformative bits, as GitHub will account for almost all of these in practice I think. But yeah, I'm ok with falling back to a hash of just the URL if needed. |
Then we need to have a function specific for github url |
but it can be any repo, not just github. I'd keep simpler and remove. It's not meant to be an exhaustive list |
in current logic, its generic I remove the protocol and domain name and only keep the rest of the part and there is a limit of 5 package names, but since we are not sure what part of the URL is the package name, I am adding all of it after domain name @ewels if you are ok with not adding the URL in the image name, I will go ahead with it |
…rl-in-conda-packages
Signed-off-by: munishchouhan <hrma017@gmail.com>
in my latest commit, I have updated the logic to ignore URLs |
…rl-in-conda-packages
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
This PR will add noramliseUrl method, which will do the followings: