Repository navigation
s3: do not store an empty object when a failed stream is written twice #45241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
robobun
wants to merge
1
commit into
main
Choose a base branch
from
robobun/4fcfaad3/s3-stored-error-stream-retry
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 nit (optional): maintainers reading this match will take the new comment as describing the
Filearm it now sits above, and it documents code that no longer exists. src/CLAUDE.md says never to add comments to deleted code blocks and to avoid comments that are not necessary; src/runtime/webcore/s3/client.rs:839-840 narrates the removedBytesarm ("is not refused here") instead of anything the code does. Fix: drop the two lines, or if a pointer is wanted, put a one-line note at the native attach site (client.rs:990,take_pending_error) saying it also covers a stored error, so the match reads as plainFilehandling.Why this was flagged
The diff deletes the
ReadableStreamPtr::Bytes(_)arm inupload_streamand replaces it with a two-line comment at src/runtime/webcore/s3/client.rs:839-840 that describes the absence of the deleted check. The comment is placed directly aboveReadableStreamPtr::File(_) =>at client.rs:841, which still contains the identical take-the-error-and-reject logic, so a reader sees a sentence about aBytessource attached to theFilearm. src/CLAUDE.md:23 says NEVER add comments to deleted code blocks and src/CLAUDE.md:25 says avoid unnecessary comments; the repository review guidance also says never narrate the change. On the base branch the arm existed and the comment did not. No runtime behaviour is affected; this is a convention violation that leaves a misleading comment next to the sibling arm.Verification: nit. Triggering condition: anyone reading the
match readable_stream.ptrinupload_stream. TheReadableStreamPtr::Bytes(_)arm is deleted and replaced by the two-line comment at src/runtime/webcore/s3/client.rs:839-840, which sits directly aboveReadableStreamPtr::File(_) =>at line 841. src/CLAUDE.md:23 states "NEVER add comments to deleted code blocks."