-
Notifications
You must be signed in to change notification settings - Fork 160
checksum-retry #200
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
checksum-retry #200
Conversation
…loy failure) Seeing a lot of networking issues, this is trying to make upload a bit more tolerant to network issues. There are two cases where we can get IOExceptions: * from the actual apache httpclient org.apache.http.client CloseableHttpClient * as a result of parsing the Artifactory response (JSON parsing) in private ArtifactoryUploadResponse uploadFile(DeployDetails details, String uploadUrl) The 1st case is handled by existing code, but the 2nd case isn't so far. This commit adds handling to the JSON parsing. Signed-off-by: André Draszik <andre.draszik@jci.com>
There are two issues: * in the mean time, upload can have succeeded (e.g. due to symlinked files) PreemptiveHttpClient will still keep trying to upload, although a checksum deploy would be enough in that case * SpecDeploymentConsumer has no way of noticing that PreemptiveHttpClient should not be continuing in that case Let's avoid it here, and delegate to SpecDeploymentConsumer so that we also benefit from checksum deploy. Signed-off-by: André Draszik <andre.draszik@jci.com>
@andred, |
Hi, To answer the first part: So this means b) above is a useful optimisation for me, because we upload large files (100s of MiB), where some files are just symlinks, and Artifactory doesn't really support symlinks transparently, but they work OK and fast with this change because of Artifactory's checksum deploy feature / checksum comparison. As for the last question: So yes, this patch here is maybe a work-around. But keep in mind that network issues are nothing unusual, so making the plugin more resilient against that doesn't seem like a bad idea. |
@andred, |
Thank you for sharing your thoughts. I think I remembered wrong, though. I looked at some older logs that our Artifactory admins shared with me last year:
As can be seen, there is 404 for the PUT of initial checksum deploy, which is fine and expected. Please correct me if I'm interpreting the log incorrectly. |
Thanks @andred - you are correct! |
Thanks. Unfortunately, there is no 'failed due to' in the request.log that I have. Would it have been in a different log file? Those three lines pasted above are the only mentions of the file involved. |
@andred - I discussed this with the developers. |
Since RTFACT-18518 tracks this issue, I think that this once cam be closed. |
These two patches make upload a bit more resilient against networking issues:
This is probably not the best way to solve this, open for better suggestions :-)