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

unixfs: refactor precalcNextBuf #5237

Merged
merged 2 commits into from
Jul 18, 2018
Merged

unixfs: refactor precalcNextBuf #5237

merged 2 commits into from
Jul 18, 2018

Conversation

schomatis
Copy link
Contributor

Addresses part of #5192.


unixfs: refactor switch in `precalcNextBuf`

Do not use `NewDagReader` just for the `RawNode` case.
Treat invalid UnixFS types in the same case.

unixfs: split `precalcNextBuf`

Create new `loadBufNode` function to handle the `buf` logic which is unrelated
to the main `precalcNextBuf` logic of processing promises to fetch nodes.

@schomatis schomatis added need/review Needs a review topic/UnixFS Topic UnixFS labels Jul 16, 2018
@schomatis schomatis added this to the Files API Documentation milestone Jul 16, 2018
@schomatis schomatis self-assigned this Jul 16, 2018
@schomatis schomatis requested a review from Kubuxu as a code owner July 16, 2018 14:21
@ghost ghost added the status/in-progress In progress label Jul 16, 2018
@schomatis schomatis removed the status/in-progress In progress label Jul 16, 2018
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

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

Needs rebase but otherwise LGTM

Do not use `NewDagReader` just for the `RawNode` case.
Treat invalid UnixFS types in the same case.

License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
Create new `loadBufNode` function to handle the `buf` logic which is unrelated
to the main `precalcNextBuf` logic of processing promises to fetch nodes.

License: MIT
Signed-off-by: Lucas Molas <schomatis@gmail.com>
@ghost ghost added the status/in-progress In progress label Jul 16, 2018
@schomatis
Copy link
Contributor Author

Rebased, but there are some weird Travis errors I should look into.

@Stebalien
Copy link
Member

Those errors look like #5070

@Stebalien Stebalien removed the need/review Needs a review label Jul 17, 2018
@schomatis
Copy link
Contributor Author

schomatis commented Jul 17, 2018

Yes, I'm used to Jenkins failing (I don't really pay attention to it anymore), but I've never seen Travis fail like that (I mean passing only one of the sharness tests and one of the Go tests from different architectures). I'm leaving the link here to document it and I'm making push to trigger another test.

https://travis-ci.org/ipfs/go-ipfs/builds/404523422?utm_source=github_status&utm_medium=notification

@schomatis schomatis closed this Jul 17, 2018
@schomatis schomatis reopened this Jul 17, 2018
@ghost ghost added status/in-progress In progress and removed status/in-progress In progress labels Jul 17, 2018
@schomatis
Copy link
Contributor Author

schomatis commented Jul 17, 2018

And the Linux error is on me :)

(edit: thought I was causing the Linux error in test/sharness/t0087-repo-robust-gc.sh but seems to be another spurious error)

@schomatis schomatis added RFM and removed status/in-progress In progress labels Jul 17, 2018
@Stebalien
Copy link
Member

Yeah, I get the travis error all the time. We really need to fix that test.

@whyrusleeping whyrusleeping merged commit a44bffb into ipfs:master Jul 18, 2018
@whyrusleeping
Copy link
Member

@schomatis youre on fire, I think i've merged more PRs from you in the past few days than i've merged for myself all year o.o

@schomatis schomatis deleted the fix/unixfs/dag-reader/next-buf branch July 19, 2018 02:23
@schomatis
Copy link
Contributor Author

Thanks, they are mostly small and cosmetic changes, but I prefer to have (many) compact PRs (instead of a single massive one) because they tend to be easier to review and reason about. (On the other hand they open the door to some unexpected conflicts like #5239 :))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants