DEV-2771 Do not retry when Transfer.transfer exception is caused by missing source file (404)
#8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the
Transfer.transferfunction automatically retries 3 times when aTransferExceptionis raised. This behaviour is not desirable when the cause of the exception can not possibly be resolved by retrying the function. One such case is a 404 error indicating a missing file.As regards the
Transfer.transferfunction, theTransferExceptioncan be raised in the following places:_fetch_size(lines 126)_prepare_target_transfer(line 219)_transfer_file(lines 242, 252, 263, 269, 281, 287, 301, 312, 321)_fetch_size_prepare_target_transfer_transfer_file_transfer_file_transfer_file_transfer_file_transfer_file_transfer_file_transfer_file_transfer_file_transfer_fileA small refactor of the
_transfer_filefunction has been done as well to make the logic more legible and reduce nesting.As the documentation was outdated, I have pushed a commit to ensure that the
READMEsetup and testing documentation are correct. I have also updated theDockerfileso that the user has correct permissions for the workdir so tests work in the service's Docker container.