Added improved error handling around downloading and installing packages#326
Added improved error handling around downloading and installing packages#326siegfriedweber merged 9 commits intomainfrom
Conversation
…ges. Agent now specifically requests 'application/gzip' as content type in the download request and fails the download if it receives anything else.
|
The clean up after a failed installation cannot be tested with an integration test. The check of the content type could be automatically tested as follows:
The effort implementing this test case is large. Its meaningfulness is limited because the status "DownloadingBackoff" could result from another issue. It is in general a problem to test intermediate results in the Stackable Agent. So I would refrain from implementing it. I adapted the integration tests to return the expected content type (see stackabletech/agent-integration-tests#89). @soenkeliebau, @maltesander, @teozkr Are you okay if we merge this request without an integration test case? |
siegfriedweber
left a comment
There was a problem hiding this comment.
LGTM (after my changes 😁)
One downside of this approach is that the Agent tries to recover from a non-recoverable error.
The agent currently does not delete the target directory for package installations, if the installation fails. This PR adds handling to remove those directories on errors when extracting.
The agent now also specifically requests 'application/gzip' as content type.
We encountered issues with a webserver which provided our gzipped packages as 'application/tar' and moved the gzip to 'content_encoding' which caused reqwest to transparrently unpack the zip and the subsequent attempt by the agent to unzip this file to fail.
fixes #324
fixes #325
Description
Review Checklist