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

Google storage push is broken #252

Closed
tschoonj opened this issue Feb 12, 2020 · 6 comments
Closed

Google storage push is broken #252

tschoonj opened this issue Feb 12, 2020 · 6 comments

Comments

@tschoonj
Copy link
Contributor

Describe the bug

Trying to upload an image to a google storage bucket does not work with httplib2 >= 0.16.0 due to changes introduced in that version that are currently not handled by the google-api-client-api library.

What currently happens is a 'hanging' upload due to an exception being thrown:

Traceback (most recent call last): 0/168 MB - 00:00:00
  File "/dls_sw/apps/python/anaconda/4.6.14/64/envs/python3.8/bin/sregistry", line 11, in <module>
    load_entry_point('sregistry', 'console_scripts', 'sregistry')()
  File "/home/awf63395/github/sregistry-cli/sregistry/client/__init__.py", line 391, in main
    main(args=args, parser=parser, extra=extra)
  File "/home/awf63395/github/sregistry-cli/sregistry/client/push.py", line 33, in main
    cli.push(path=image, name=args.name, tag=args.tag)
  File "/home/awf63395/github/sregistry-cli/sregistry/main/google_storage/push.py", line 44, in push
    manifest = self._upload(
  File "/home/awf63395/github/sregistry-cli/sregistry/main/google_storage/push.py", line 87, in upload
    progress, response = request.next_chunk()
  File "/dls_sw/apps/python/anaconda/4.6.14/64/envs/python3.8/lib/python3.8/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/dls_sw/apps/python/anaconda/4.6.14/64/envs/python3.8/lib/python3.8/site-packages/googleapiclient/http.py", line 986, in next_chunk
    resp, content = http.request(self.resumable_uri, method='PUT',
  File "/dls_sw/apps/python/anaconda/4.6.14/64/envs/python3.8/lib/python3.8/site-packages/oauth2client/transport.py", line 173, in new_request
    resp, content = request(orig_request_method, uri, method, body,
  File "/dls_sw/apps/python/anaconda/4.6.14/64/envs/python3.8/lib/python3.8/site-packages/oauth2client/transport.py", line 280, in request
    return http_callable(uri, method=method, body=body, headers=headers,
  File "/dls_sw/apps/python/anaconda/4.6.14/64/envs/python3.8/lib/python3.8/site-packages/httplib2/__init__.py", line 1982, in request
    (response, content) = self._request(
  File "/dls_sw/apps/python/anaconda/4.6.14/64/envs/python3.8/lib/python3.8/site-packages/httplib2/__init__.py", line 1685, in _request
    raise RedirectMissingLocation(
httplib2.RedirectMissingLocation: Redirected but the response is missing a Location: header.

which is caught by the retry call, so had to remove the decorator to actually get this far 😄

To Reproduce
Steps to reproduce the behavior: install sregistry with google-storage backend support using the latest versions of all required dependencies.

This may also affect other (google-) backends but I haven't tested this.

Version of Singularity and Singularity Registry Client
sregistry-client: 0.2.33

Anything else?

Should we pin the version of httplib2 in the conda repo to <= 0.15.0 until the google-api-client library contains a fix?

@vsoch
Copy link
Member

vsoch commented Feb 12, 2020

Yes pinning the version to what previously worked is a good bet for now. I’d be happy to review a PR for this.

tschoonj added a commit to tschoonj/sregistry-feedstock that referenced this issue Feb 12, 2020
tschoonj added a commit to tschoonj/sregistry-cli that referenced this issue Feb 13, 2020
Temporary fix for singularityhub#252. Definitive fix will need to be implemented in
google-api-client.
@vsoch
Copy link
Member

vsoch commented Feb 13, 2020

Fixed with #253

@vsoch vsoch closed this as completed Feb 13, 2020
tschoonj added a commit to regro-cf-autotick-bot/sregistry-feedstock that referenced this issue Feb 13, 2020
@tschoonj
Copy link
Contributor Author

This is fixed upstream now, may be useful to change pinning here, and revert the corresponding PR.

@vsoch
Copy link
Member

vsoch commented Dec 15, 2020

@tschoonj that's a good idea - revert would remove all the commits done for that PR (which I don't think we want to do) but if you have bandwidth in the next few weeks, do you want to open a simple PR to bump the version and change pinning? We could then update the conda force recipe to match.

@tschoonj
Copy link
Contributor Author

First thing tomorrow morning!

@vsoch
Copy link
Member

vsoch commented Dec 15, 2020

Woot! Thanks @tschoonj !

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