Repository navigation
Conversation
| // Otherwise, if the error is non-nill and already retriable (in the | ||
| // case that the underlying reader `r.reader` is itself a | ||
| // `*RetriableReader`, return the error wholesale: | ||
| if err == nil || err == io.EOF || errors.IsRetriableError(err) { |
Contributor
Author
|
Travis seems to be misreporting builds as having failed, even though all of the tests are passing as expected. I kicked off a restart of the builds and will begin the 1.4.1 release process as soon as this is merged in. |
chrisd8088
added a commit
that referenced
this pull request
Aug 5, 2026
In PR #1454 we added the RetriableReader structure to our "tools" package, and then in commit a9bbe0e of PR #1482 we introduced several Go test functions to exercise the structure's methods under various conditions. We defined these functions in our "tools/iotools_test.go" source file and set the Go package name in the file to "tools_test" rather than just "tools". One consequence of this difference is that we then need to import our own "tools" package into the "tools/iotools_test.go" source file even though it resides in the same directory as the rest of our "tools" package's source files. Previously, in commit 1ef2d43 of PR #1265, we moved the definition of the CopyWithCallback() function from our "lfs" package to our "tools" package, and also moved the corresponding TestCopyWithCallback() test function at the same time. These functions were previously defined in the "util.go" and "util_test.go" source files, respectively, in our "lfs" package. However, while we now define both functions in our "tools" package, the CopyWithCallback() function is located in a source file named "iotools.go" but the TestCopyWithCallback() function is still located in a source file named "util_test.go". In a subsequent commit in this PR we intend to move the TestCopyWithCallback() function into the "tools/iotools_test.go" source file, to align with the location of the corresponding CopyWithCallback() function in the "tools/iotools.go" file. As well, in other future commits in this PR we expect to migrate the "closingByteReader" structure and its related methods from the "tools/copycallback.go" source file to the "tools/iotools.go" file, and to add a new test function to the "tools/iotools_test.go" source file which exercises the structure's Close() method. At present, any test functions in the "tools/iotools_test.go" source file must explicitly reference the structures and methods they test using the "tools." prefix, since the source file specifies a distinct "tools_test" Go package name. To simplify the changes we expect to make in subsequent commits in this PR, we therefore first change the package name in the "tools/iotools_test.go" source file to just "tools", and update the existing test functions for the RetriableReader structure to remove the "tools." prefix from their references to the NewRetriableReader() function.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull-request is a small addendum to @larsxschneider's #1454 to add tests around the
RetriableReader.The only behavior change in this PR is that
RetriableReaderwill no longer re-wrap already retriable errors, per #1454 (comment)./cc @technoweenie @larsxschneider for 💭 and 👀