This repository was archived by the owner on Sep 30, 2024. It is now read-only.
refactor file writing#54673
Merged
Merged
Conversation
7530c69 to
e46c546
Compare
Contributor
|
Codenotify: Notifying subscribers in CODENOTIFY files for diff 6f99e7d...e46c546.
|
| }() | ||
|
|
||
| // Wrap the file reader | ||
| indexReader, err := newGzipReadSeeker(tempFile) |
Contributor
There was a problem hiding this comment.
AFAICT, we're missing a write to the file in the first place... so we won't be able to read anything here.
Contributor
|
I'm going to merge this PR and make some smaller tweaks in my PR. |
2 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
cc @varungandhi-src Re-commented the flow and refactored so that we favor early-exits over global state (buf/indexReader being nil-able was confusing to determine what states were valid). I think the only behavioral change is we hard-error on the creation of a temp file instead of logging+doing our best. We can preserve that old behavior if it was an intentional design decision.