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

scs library client (singularity 3.6.x) requires all lowercase to push #331

Closed
atharvnagarikar opened this issue Dec 21, 2020 · 17 comments
Closed

Comments

@atharvnagarikar
Copy link

Hi, I followed all your guidelines and setup GUI for the singularity registry server and I also verify the token and all but while trying to push the image to the collection I encountered the following fatal error
err5

Following image will show you the GUI along with the collection
err6

Can you please help me with this

@vsoch
Copy link
Member

vsoch commented Dec 21, 2020

That looks correct - what version of Singularity are you using? sregistry is tested up to 3.5.x. The error message I see seems to be coming from Singularity so something is changed or erroneous there.

@atharvnagarikar
Copy link
Author

I'm using Singularity 3.6.4 version

@vsoch
Copy link
Member

vsoch commented Dec 21, 2020

Could you please try 3.5.2 or 3.5.1? That will rule out a version upgrade issue.

@vsoch
Copy link
Member

vsoch commented Dec 21, 2020

It looks like they've added a new check that checks against this regular expression: https://github.com/sylabs/scs-library-client/blob/31250b63795e4a20afd8f4f00b2ad3b34ec188e0/client/util.go#L28. So my thinking is that the issue is that you have a capital letter. Could you try an all lowercase name, no special characters, and if that works I can do an update to sregistry to enforce it as well?

@vsoch
Copy link
Member

vsoch commented Dec 21, 2020

Yeah, try changing your username to all lowercase, e.g., see how it matches after we do that:

# Doesn't match regex and fails check as is now
re.search("^(library://)?([a-z0-9]+(?:[._-][a-z0-9]+)*/){2}([a-z0-9]+(?:[._-][a-z0-9]+)*)(:[a-z0-9]+(?:[,._-][a-z0-9]+)*)?$", "library://Singularity_CDAC_LSM/ai/test:latest")
# no match is returned

# passes
re.search("^(library://)?([a-z0-9]+(?:[._-][a-z0-9]+)*/){2}([a-z0-9]+(?:[._-][a-z0-9]+)*)(:[a-z0-9]+(?:[,._-][a-z0-9]+)*)?$", "library://singularity_cdac_ssm/ai/test:latest")
<re.Match object; span=(0, 45), match='library://singularity_cdac_ssm/ai/test:latest'>

@vsoch vsoch changed the title Unable to push .sif image to localhost or personal cloud scs library client (singularity 3.6.x) requires all lowercase to push Dec 21, 2020
@atharvnagarikar
Copy link
Author

ok, I'll try and let you know

@vsoch
Copy link
Member

vsoch commented Dec 21, 2020

If the lowercase works, here is a PR for you to test that should create the same username, all lowercase. #332 I have to be off to bed, looking forward to hearing how it goes!

@atharvnagarikar
Copy link
Author

lowercase work and now I can push the image to loaclhost

@vsoch
Copy link
Member

vsoch commented Dec 22, 2020

Great! Could you test the pull request and confirm that when you login with your username the username with capital letters is already all lowercase? If we merge this pull request then the issue will be fixed for future users. Thanks for your help!

@atharvnagarikar
Copy link
Author

For pulling an image, should I use singularity registry client

@vsoch
Copy link
Member

vsoch commented Dec 22, 2020

No, you should use singularity with the library endpoint.

@atharvnagarikar
Copy link
Author

ok

@atharvnagarikar
Copy link
Author

I pulled the image successfully

@vsoch
Copy link
Member

vsoch commented Dec 22, 2020

Have you tested the PR?

@vsoch
Copy link
Member

vsoch commented Dec 22, 2020

@atharvnagarikar thank you for opening this issue - and I'm glad we have resolved it. You should consider in the future that open source is a two way street - I help you here, and when I create a solution for you, it is good practice to test it to confirm that it fixes your issue. If you want to have good relationships with maintainers, not just here but anywhere on GitHub, you should try to be more helpful.

@vsoch vsoch closed this as completed Dec 22, 2020
@atharvnagarikar
Copy link
Author

@vsoch, thank you for your guidance and I was not able to come online due to some personal issues

@atharvnagarikar
Copy link
Author

Can you please elaborate #332

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