Closed ironfroggy closed 5 years ago
@ironfroggy Can you grab the results from the server including headers? ie, grab the url, then 'curl -v' or http -v --follow
on the original url?
And, or, a copy of the mazer log file from DEBUG level with the error?
@alikins Unfortunately, I can't. Not right now, because the problem that caused that has been resolved on the server. We can try to do it again temporarily post-launch?
@alikins my current local dev environment gives a result that causes the same mazer response, here is the server results:
(vmaz) awc:code$ curl -v http://localhost:8000/download/awcrosby-collection_reqs_test-0.0.3.tar.gz
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8000 (#0)
> GET /download/awcrosby-collection_reqs_test-0.0.3.tar.gz HTTP/1.1
> Host: localhost:8000
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 404 Not Found
< X-Powered-By: Express
< Access-Control-Allow-Origin: *
< content-type: text/plain; charset=utf-8
< content-length: 14
< date: Thu, 30 May 2019 20:14:18 GMT
< server: Python/3.6 aiohttp/3.5.4
< connection: close
<
* Closing connection 0
404: Not Found(vmaz) awc:code$
(vmaz) awc:code$
(vmaz) awc:code$
(vmaz) awc:code$ mazer install awcrosby.collection_reqs_test
Installing:
awcrosby.collection_reqs_test,*
WARNING| - awcrosby.collection_reqs_test,0.0.3 was NOT installed successfully: Error opening the tar file /tmp/tmp-ansible-galaxy-content-archive-2kr4h0vk.tar.gz with flags: r:gz for repo: awcrosby.collection_reqs_test,0.0.3
Error opening the tar file /tmp/tmp-ansible-galaxy-content-archive-2kr4h0vk.tar.gz with flags: r:gz for repo: awcrosby.collection_reqs_test,0.0.3:
- you can use --ignore-errors to skip failed collections and finish processing the list.
(vmaz) awc:code$
@ironfroggy ah, I'm not using requests.raise_for_exception() for the downloads, so the 404 isn't raising errors (rest_api does this, I need to update download to do it as well).
Bug Report
MAZER VERSION
CONFIGURATION
defaults
SUMMARY
If something is wrong with the API server's file serving and an HTTP error response comes back from a request to fetch an artifact tarball, Mazer does not detect this, saves the HTML error page contents as a
.tar.gz
and tries to unpack it. We should detect this and give a more appropriate, earlier error to the user.STEPS TO REPRODUCE
I don't know how to intentionally reproduce this at this time. It happened when we deployed and tested on galaxy-qa because of a misconfiguration, but that has been resolved. I can imagine intermittent network errors causing something like this unpredictably and would like to be prepared for that.
EXPECTED RESULTS
An error message that indicates a network or server error has occured.
ACTUAL RESULTS
The actual error looks like a corrupted tarball, which feels like a problem with the build I uploaded rather than the server at this time, and doesn't actually indicate the source of the problem.