Skip to content
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

migrate repo verify to new cmds library. #4764

Closed
wants to merge 1 commit into from

Conversation

Stebalien
Copy link
Member

License: MIT
Signed-off-by: Steven Allen steven@stebalien.com

@ghost ghost assigned Stebalien Mar 4, 2018
@ghost ghost added the status/in-progress In progress label Mar 4, 2018
@Stebalien Stebalien force-pushed the feat/migrate-repo-verify branch from c87bc16 to 045b524 Compare March 4, 2018 01:02
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
@Stebalien Stebalien force-pushed the feat/migrate-repo-verify branch from 045b524 to 25b9603 Compare March 4, 2018 01:15

buf := new(bytes.Buffer)
if strings.Contains(obj.Msg, "was corrupt") {
fmt.Fprintln(os.Stdout, obj.Msg)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this distinction. Was it really necessary? (also, I assume this was supposed to print to stderr...)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was probably to be able to pipe just the corrupted blocks out into other command.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd guess this was mean to write to stderr as the normal output is written to stdout.

@whyrusleeping
Copy link
Member

Do you intend for this to come before #4751?

@Stebalien
Copy link
Member Author

I don't see how they're related. Does that PR touch repo verify? I'm trying to bypass an issue I've noticed in the cmds lib backwards compatibility layer by simply migrating away from it as fast as possible (the expected <-chan interface{}, got <nil> on ^C error).

Copy link
Member

@Kubuxu Kubuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Stebalien I am not sure about the stdout change, apart from that SGWM.

@Kubuxu Kubuxu added the need/author-input Needs input from the original author label Mar 8, 2018
}

Encoders: cmds.EncoderMap{
cmds.Text: cmds.MakeTypedEncoder(func(req *cmds.Request, w io.Writer, obj *VerifyProgress) error {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait for ipfs/go-ipfs-cmds#65 to be fixed before merging.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Stebalien the linked issue has since been fixed, was this the only blocker for moving this forward?


buf := new(bytes.Buffer)
if strings.Contains(obj.Msg, "was corrupt") {
fmt.Fprintln(os.Stdout, obj.Msg)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd guess this was mean to write to stderr as the normal output is written to stdout.

@Stebalien
Copy link
Member Author

This was actually replaced by a newer PR (one rebased over a PR that parallelized the verification). Thanks for bumping this.

@Stebalien Stebalien closed this Dec 7, 2018
@ghost ghost removed the status/in-progress In progress label Dec 7, 2018
@Stebalien Stebalien deleted the feat/migrate-repo-verify branch December 7, 2018 17:22
@Stebalien Stebalien restored the feat/migrate-repo-verify branch May 30, 2019 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/author-input Needs input from the original author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants