Signal failure status from fsck in headless mode#878
Open
roger2hk wants to merge 1 commit intotransparency-dev:mainfrom
Open
Signal failure status from fsck in headless mode#878roger2hk wants to merge 1 commit intotransparency-dev:mainfrom
roger2hk wants to merge 1 commit intotransparency-dev:mainfrom
Conversation
709ad2a to
ffb92a0
Compare
AlCutter
approved these changes
Mar 5, 2026
| } | ||
| klog.V(1).Infof("Completed ranges:\n%s", f.Status()) | ||
|
|
||
| checkErr <- err |
Collaborator
There was a problem hiding this comment.
nit: strictly, you should probably close(checkErr) here.
| } | ||
| f := fsck.New(*origin, v, src, defaultMerkleLeafHasher, fsck.Opts{N: *N}) | ||
|
|
||
| checkErr := make(chan error, 1) |
Collaborator
There was a problem hiding this comment.
Maybe rename this checkResult? I spend some time trying to reason about the replacement of ctx.Done with <-checkErr in the loop below before I noticed that you just send whatever err is, even if it's nil.
Probably worth a comment to that effect on this channel, too as it's a little unusual.
| klog.V(1).Infof("Completed ranges:\n%s", f.Status()) | ||
|
|
||
| checkErr <- err | ||
| cancel() |
Collaborator
There was a problem hiding this comment.
should this cancel() now live in the loop below just before the return in the <-checkErr case? (I think it's +/- equivalent, but mirrors the cancellation in the if *ui {} side.
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.
No description provided.