forked from testcontainers/testcontainers-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issues in BuildImage() (testcontainers#2626)
* Don't accumulate errors The code already logs them so no need to return them all to the caller - the calling code will likely log them too. This will result in the same errors being logged twice. This is confusing for the user. * RetryNotify -> RetryNotifyWithData * Do not reuse buildOptions.Context buildOptions.Context cannot be reused because it might have been partially consumed by the failed ImageBuild(). So, the next invocation will send a partial context, which will not work correctly. * Always close the response body * Always close the build context This ensures all resources are released properly.
- Loading branch information
Showing
2 changed files
with
30 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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