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

block cmd: Use coreapi #5331

Merged
merged 4 commits into from
Sep 11, 2018
Merged

block cmd: Use coreapi #5331

merged 4 commits into from
Sep 11, 2018

Conversation

magik6k
Copy link
Member

@magik6k magik6k commented Aug 2, 2018

No description provided.

@magik6k magik6k requested a review from Kubuxu as a code owner August 2, 2018 07:50
@ghost ghost assigned magik6k Aug 2, 2018
@ghost ghost added the status/in-progress In progress label Aug 2, 2018
@magik6k magik6k changed the title block cmd: Use coreapi [WIP] block cmd: Use coreapi Aug 2, 2018
@magik6k magik6k added the status/blocked Unable to be worked further until needs are met label Aug 2, 2018
@magik6k
Copy link
Member Author

magik6k commented Aug 2, 2018

Blocked by a bug in go-path

@magik6k magik6k added the topic/core-api Topic core-api label Aug 2, 2018
@magik6k magik6k mentioned this pull request Aug 2, 2018
51 tasks
@magik6k magik6k removed the status/blocked Unable to be worked further until needs are met label Aug 10, 2018
@magik6k magik6k force-pushed the refactor/coreapi/block branch 6 times, most recently from b7b84ce to 301fcf8 Compare August 13, 2018 20:20
@magik6k magik6k changed the title [WIP] block cmd: Use coreapi block cmd: Use coreapi Aug 13, 2018
})
rp, err := api.ResolvePath(req.Context, p)
if err != nil {
res.SetError(err, cmdkit.ErrNormal)
Copy link
Member

Choose a reason for hiding this comment

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

Should we emit error here too?
What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

Reading original code we probably shouldn't unless ResolvePath does a lot more than just Decode.

Copy link
Member Author

Choose a reason for hiding this comment

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

It does handle ipns and path traversal too

settings.Codec = "v0"
}
}

Copy link
Member

Choose a reason for hiding this comment

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

Should this be in BlockPutOptions instead, it seems like it is options handling.

Copy link
Member

@Kubuxu Kubuxu Aug 14, 2018

Choose a reason for hiding this comment

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

This way we separate Options sanitation from implementation.

@magik6k magik6k force-pushed the refactor/coreapi/block branch 2 times, most recently from a2955d0 to dc5d66c Compare August 15, 2018 12:26
@ghost ghost assigned Stebalien Aug 15, 2018
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
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.

LGTM for now. However, the interface will likely change when we start addressing blocks by hash instead of by CID.

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.

LGTM, let's get it in.

@Stebalien Stebalien added RFM and removed status/in-progress In progress labels Sep 11, 2018
@Stebalien Stebalien merged commit 82204d1 into master Sep 11, 2018
@Stebalien Stebalien deleted the refactor/coreapi/block branch September 11, 2018 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFM topic/core-api Topic core-api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants