filecoin-project / lassie

A minimal universal retrieval client library for IPFS and Filecoin
Other
111 stars 17 forks source link

Protocols in providers #465

Closed hannahhoward closed 10 months ago

hannahhoward commented 10 months ago

Goals

Implementation

For Discussion

codecov-commenter commented 10 months ago

Codecov Report

Attention: 24 lines in your changes are missing coverage. Please review.

Comparison is base (f2e96a7) 75.63% compared to head (ab1e2b5) 75.79%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/filecoin-project/lassie/pull/465/graphs/tree.svg?width=650&height=150&src=pr&token=0ELGTPSK3J&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project)](https://app.codecov.io/gh/filecoin-project/lassie/pull/465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project) ```diff @@ Coverage Diff @@ ## main #465 +/- ## ========================================== + Coverage 75.63% 75.79% +0.16% ========================================== Files 87 87 Lines 6657 6656 -1 ========================================== + Hits 5035 5045 +10 + Misses 1341 1335 -6 + Partials 281 276 -5 ``` | [Files](https://app.codecov.io/gh/filecoin-project/lassie/pull/465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project) | Coverage Δ | | |---|---|---| | [cmd/lassie/flags.go](https://app.codecov.io/gh/filecoin-project/lassie/pull/465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project#diff-Y21kL2xhc3NpZS9mbGFncy5nbw==) | `51.02% <100.00%> (ø)` | | | [cmd/lassie/main.go](https://app.codecov.io/gh/filecoin-project/lassie/pull/465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project#diff-Y21kL2xhc3NpZS9tYWluLmdv) | `47.66% <100.00%> (ø)` | | | [pkg/indexerlookup/candidatesource.go](https://app.codecov.io/gh/filecoin-project/lassie/pull/465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project#diff-cGtnL2luZGV4ZXJsb29rdXAvY2FuZGlkYXRlc291cmNlLmdv) | `66.29% <100.00%> (ø)` | | | [pkg/indexerlookup/options.go](https://app.codecov.io/gh/filecoin-project/lassie/pull/465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project#diff-cGtnL2luZGV4ZXJsb29rdXAvb3B0aW9ucy5nbw==) | `31.66% <ø> (ø)` | | | [pkg/internal/itest/mocknet/mocknet.go](https://app.codecov.io/gh/filecoin-project/lassie/pull/465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project#diff-cGtnL2ludGVybmFsL2l0ZXN0L21vY2tuZXQvbW9ja25ldC5nbw==) | `76.51% <100.00%> (ø)` | | | [pkg/internal/itest/testpeer/generator.go](https://app.codecov.io/gh/filecoin-project/lassie/pull/465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project#diff-cGtnL2ludGVybmFsL2l0ZXN0L3Rlc3RwZWVyL2dlbmVyYXRvci5nbw==) | `75.00% <100.00%> (ø)` | | | [pkg/internal/testutil/gen.go](https://app.codecov.io/gh/filecoin-project/lassie/pull/465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project#diff-cGtnL2ludGVybmFsL3Rlc3R1dGlsL2dlbi5nbw==) | `63.28% <100.00%> (+0.58%)` | :arrow_up: | | [pkg/internal/testutil/mockcandidatefinder.go](https://app.codecov.io/gh/filecoin-project/lassie/pull/465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project#diff-cGtnL2ludGVybmFsL3Rlc3R1dGlsL21vY2tjYW5kaWRhdGVmaW5kZXIuZ28=) | `83.33% <100.00%> (ø)` | | | [pkg/internal/testutil/verifier.go](https://app.codecov.io/gh/filecoin-project/lassie/pull/465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project#diff-cGtnL2ludGVybmFsL3Rlc3R1dGlsL3ZlcmlmaWVyLmdv) | `96.49% <100.00%> (ø)` | | | [pkg/retriever/assignablecandidatefinder.go](https://app.codecov.io/gh/filecoin-project/lassie/pull/465?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project#diff-cGtnL3JldHJpZXZlci9hc3NpZ25hYmxlY2FuZGlkYXRlZmluZGVyLmdv) | `100.00% <100.00%> (ø)` | | | ... and [7 more](https://app.codecov.io/gh/filecoin-project/lassie/pull/465?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project) | | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/filecoin-project/lassie/pull/465/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=filecoin-project)
rvagg commented 10 months ago

TestAssignableCandidateFinder race test failures in CI probably worth investigating!

bajtos commented 10 months ago
rvagg commented 10 months ago

Not documented publicly (yet) but it impacts the "providers" query string and CLI argument, it's backward compatible and this just adds the ability to tack on protocols after the end of the provider ID string, just add a +http, +bitswap, +graphsync to limit the protocol(s) that will be attempted with the provider. They are additive, so: