singularityhub / sregistry-cli

Singularity Global Client for container management
https://singularityhub.github.io/sregistry-cli/
Mozilla Public License 2.0
14 stars 18 forks source link

s3 uri not supported when pushing #200

Closed tschoonj closed 5 years ago

tschoonj commented 5 years ago

Describe the bug

Even though mentioned in the docs, it doesn't appear to be possible to use the s3:// uri to push images to an S3 bucket.

Note: none of this possible without applying the patch in #199 first

To Reproduce

Try something like:

sregistry push --name s3://singularity-savu/centos6:test /scratch/singularity/images/rhel6-dev.simg

and ye shall receive:

usage: sregistry [-h] [--debug] [--quiet]
                 {version,backend,shell,images,inspect,get,add,mv,rename,rm,rmi,search,pull}
                 ...
sregistry: error: argument command: invalid choice: 'push' (choose from 'version', 'backend', 'shell', 'images', 'inspect', 'get', 'add', 'mv', 'rename', 'rm', 'rmi', 'search', 'pull')

What does work is:

export SREGISTRY_CLIENT=s3
sregistry push --name singularity-savu/centos6:test /scratch/singularity/images/rhel6-dev.simg

which is slightly less cool...

Expected behavior

The upload to proceed.

Version of Singularity and Singularity Registry Client

sregistry-cli: 0.1.41 (with patch #199 ) singularity: 2.6.1

vsoch commented 5 years ago

hey! Just a heads up that I'll look into debugging this over the weekend. I looked at the code briefly and it's not directly apparent why it's not working - needs a little extra debugging love :)

tschoonj commented 5 years ago

Thanks!

vsoch commented 5 years ago

hey @tschoonj ! In a nutshell, I think this comes down to a bad client design, and it's something I've been unhappy with for a bit. I did a redo of how it works (details in the PR) so if/when you are able, would you be able to test? https://github.com/singularityhub/sregistry-cli/pull/202

I don't have any current S3 accounts so I haven't tested - so please let me know if it works better or if there are issues!

vsoch commented 5 years ago

okay this should be fixed.