Skip to content

Fix TransferListener callbacks for unknown content length uploads#6898

Merged
alextwoods merged 7 commits intomasterfrom
alexwoo/fix_tm_progress_unknown_length
Apr 25, 2026
Merged

Fix TransferListener callbacks for unknown content length uploads#6898
alextwoods merged 7 commits intomasterfrom
alexwoo/fix_tm_progress_unknown_length

Conversation

@alextwoods
Copy link
Copy Markdown
Contributor

Fix TransferListener callbacks for unknown content length uploads

Motivation and Context

TransferListener callbacks like transferInitiated and transferComplete were not being called for single part, unknown-content length uploads.

Modifications

  • Always call progressListener.subscriberOnComplete() for successful single part uploads.

Why not set REPORT_PROGRESS_IN_SINGLE_CHUNK for this case instead?
For unknown content length we don't know ahead of time whether this will be a single chunk or multipart (this decision happens deep in UploadWithUnknownContentLengthHelper after the transfer manager has already set REPORT_PROGRESS_IN_SINGLE_CHUNK.

Testing

Added new unit tests + manual reproduction of issue.

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.

License

  • I confirm that this pull request can be released under the Apache 2 license

@alextwoods alextwoods requested a review from a team as a code owner April 23, 2026 21:57
@sonarqubecloud
Copy link
Copy Markdown

@alextwoods alextwoods enabled auto-merge April 23, 2026 23:15
@alextwoods alextwoods added this pull request to the merge queue Apr 24, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 24, 2026
@alextwoods alextwoods added this pull request to the merge queue Apr 24, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 24, 2026
@davidh44 davidh44 added this pull request to the merge queue Apr 24, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 24, 2026
@alextwoods alextwoods enabled auto-merge April 25, 2026 00:16
@alextwoods alextwoods added this pull request to the merge queue Apr 25, 2026
Merged via the queue into master with commit 8ff786e Apr 25, 2026
11 of 12 checks passed
@github-actions
Copy link
Copy Markdown

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants