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

Let aws-sdk retry upload especially when conflict with parallel uploads #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ikedam
Copy link
Contributor

@ikedam ikedam commented Jul 3, 2022

Issue #, if available:

#129

Description of changes:

Parallel execution of awsCodeBuild results fillowing error:

[AWS CodeBuild Plugin] Unexpected exception upon uploading source zip to S3: The request to the service failed with a retryable reason, but resetting the request input stream has failed. See exception.getExtraInfo or debug-level logging for the original failure that caused this retry.; If the request involves an input stream, the maximum stream buffer size can be configured via request.getRequestClientOptions().setReadLimit(int)

This means aws-sdk tries to retry upload using InputStream#reset ( https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html#reset-- ) but it failed.
Actually, I'm not so sure why reset() it fails but we can easily retry that re-opening the target file.
I introduced ResetableFilePathInputStream which re-opens the file if reset() is called.

This contribution is under the Apache 2.0 license.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

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

Successfully merging this pull request may close these issues.

None yet

1 participant