s3: fix multipart upload debug log#219
Merged
giacomo-alzetta-aiven merged 1 commit intoAiven-Open:mainfrom Jan 14, 2026
Merged
Conversation
The log would raise an exception whenever the total number of parts is unknown. The issue could have been detected by the current tests if we weren't mocking the logger. Pytest already offers better ways to capture the logs and assert expected logs, so use the `caplog` fixture instead. Additionally I also switched the tests to use `tmp_path` fixture which is better than creating a regular temp file as it will be in dedicated dirs associated to test names.
51a4c9d to
e4bac81
Compare
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.
About this change - What it does
The log would raise an exception whenever the total number of parts is unknown because it tried to format
<?>as a number (introduced by #215).Why this way
The issue could have been detected by the current tests if we weren't mocking the logger.
Pytest already offers better ways to capture the logs and assert expected logs, so use the
caplogfixture instead.Additionally I also switched the tests to use
tmp_pathfixture which is better than creating a regular temp file as it will be in dedicated dirs associated to test names.