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

coreiface: deprecate DhtAPI in favor of RoutingAPI #461

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jorropo
Copy link
Contributor

@Jorropo Jorropo commented Sep 5, 2023

No description provided.

@Jorropo Jorropo requested a review from a team as a code owner September 5, 2023 17:01
@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Merging #461 (9f2683a) into main (574df96) will decrease coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #461      +/-   ##
==========================================
- Coverage   66.47%   66.44%   -0.04%     
==========================================
  Files         207      207              
  Lines       24681    24681              
==========================================
- Hits        16407    16399       -8     
- Misses       6851     6858       +7     
- Partials     1423     1424       +1     

see 11 files with indirect coverage changes

Copy link
Contributor

@aschmahmann aschmahmann left a comment

Choose a reason for hiding this comment

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

There's a bunch of go-check errors around using the wrong types. After fixing that things look pretty good.

FindPeer(context.Context, peer.ID) (peer.AddrInfo, error)

// FindProviders finds peers in the DHT who can provide a specific value given a key.
FindProviders(context.Context, path.Path, ...options.DhtFindProvidersOption) (<-chan peer.AddrInfo, error)
Copy link
Contributor

Choose a reason for hiding this comment

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

options.Routing?

FindProviders(context.Context, path.Path, ...options.DhtFindProvidersOption) (<-chan peer.AddrInfo, error)

// Provide announces to the network that you are providing given values.
Provide(context.Context, path.Path, ...options.DhtProvideOption) error
Copy link
Contributor

Choose a reason for hiding this comment

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

options.Routing?


time.Sleep(3 * time.Second)

out, err := apis[2].Routing().FindProviders(ctx, p, options.Dht.NumProviders(1))
Copy link
Contributor

Choose a reason for hiding this comment

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

options.Routing?

@aschmahmann
Copy link
Contributor

@Jorropo why skip changelog here? We're deprecating an API. No we're not removing it or anything but seems reasonable to mention.

@Jorropo
Copy link
Contributor Author

Jorropo commented Sep 5, 2023

Good question, the API was already deprecated in Kubo and I had tunnel vision.
I'll add changelog here thx.

@lidel lidel marked this pull request as draft September 25, 2023 13:32
@lidel
Copy link
Member

lidel commented Sep 25, 2023

Triage notes:

  • needs Kubo PR to show we dont remove/deprecate too much
    • converting to draft, as we need to look at this from Kub oside, afaik ipfs routing in Kubo does the same thing as ipfs dht but
      • does not allow for selecting backend, so not possible to run dht-only query without chaing config to be dht-only
      • ipfs dht query is not present in ipfs routing

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.

None yet

3 participants