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

Expose basic text-based datamodel selector on retrieval #7446

Closed

Conversation

ribasushi
Copy link
Collaborator

This PR is effectively identical to #6393, but does not include #7441 - it only pulls in the newest go-ipld-prime.

Syntaxt of selection is located at
https://pkg.go.dev/github.com/ipld/go-ipld-selector-text-lite#SelectorSpecFromPath

Example use, assuming that:

  • The root of the deal is a plain dag-pb unixfs directory
  • The directory is not sharded
  • The user wants to retrieve the first entry in that directory

lotus client retrieve --miner f0XXXXX --datamodel-path-selector 'Links/0/Hash' bafyROOTCID ~/output

For a much more elaborate example see the top of ./itests/deals_partial_retrieval_test.go

Syntaxt of selection is located at
https://pkg.go.dev/github.com/ipld/go-ipld-selector-text-lite#SelectorSpecFromPath

Example use, assuming that:
  - The root of the deal is a plain dag-pb unixfs directory
  - The directory is not sharded
  - The user wants to retrieve the first entry in that directory

  lotus client retrieve --miner f0XXXXX --datamodel-path-selector 'Links/0/Hash' bafyROOTCID ~/output

For a much more elaborate example see the top of ./itests/deals_partial_retrieval_test.go
@codecov
Copy link

codecov bot commented Oct 4, 2021

Codecov Report

Merging #7446 (1b1d891) into master (fc10281) will increase coverage by 0.05%.
The diff coverage is 75.94%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7446      +/-   ##
==========================================
+ Coverage   39.54%   39.59%   +0.05%     
==========================================
  Files         616      617       +1     
  Lines       65295    65373      +78     
==========================================
+ Hits        25818    25886      +68     
- Misses      34980    34984       +4     
- Partials     4497     4503       +6     
Impacted Files Coverage Δ
api/api_full.go 47.36% <ø> (ø)
cli/client.go 22.82% <0.00%> (-0.04%) ⬇️
markets/utils/selectors.go 68.42% <68.42%> (ø)
node/impl/client/client.go 44.68% <87.17%> (+4.22%) ⬆️
extern/sector-storage/sched_resources.go 75.00% <0.00%> (-9.38%) ⬇️
chain/exchange/client.go 49.15% <0.00%> (-5.51%) ⬇️
chain/actors/builtin/paych/paych.go 16.88% <0.00%> (-5.20%) ⬇️
chain/exchange/peer_tracker.go 66.66% <0.00%> (-4.31%) ⬇️
node/hello/hello.go 63.63% <0.00%> (-3.41%) ⬇️
chain/sub/incoming.go 54.43% <0.00%> (-3.38%) ⬇️
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fc10281...1b1d891. Read the comment docs.

@ribasushi ribasushi marked this pull request as ready for review October 4, 2021 22:53
@ribasushi ribasushi requested a review from a team as a code owner October 4, 2021 22:53
@ribasushi
Copy link
Collaborator Author

Closing as per conversation with @jennijuju: we are going with #6393 as soon as he GS upgrade lands.

@ribasushi ribasushi closed this Oct 5, 2021
@ribasushi ribasushi deleted the feat/datamodel-selector-retrieval_no-gfm-gdt-bump branch October 5, 2021 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant