Skip to content

refactor(iroh)!: Move blobs and tags rpc client and server to iroh-blobs #2874

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

Merged
merged 23 commits into from
Nov 6, 2024

Conversation

rklaehn
Copy link
Contributor

@rklaehn rklaehn commented Oct 31, 2024

Description

Move blobs and tags rpc client and server to iroh-blobs.

Depends on n0-computer/iroh-blobs#7

Todo:

Breaking Changes

  • Lots of types in client::blobs and client::tags become reexports
  • blob share goes away, since it requires the node client

Notes & open questions

I want to keep the client::blobs and client::tags modules self-contained, so the idea is that these will reexport all the things from iroh-blobs::rpc::client that a user will need (except I have probably forgotten something). Maybe I should use wildcard exports here even though people dislike them... ?

The client::blobs::Client itself is not a reexport but a newtype to hide the ugly type parameters. Same for client::tags::Client.

With the changes in quic-rpc, these are now just module reexports!

The Blobs protocol handler now takes an Endpoint, since that was needed to implement one of the functions.

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

Copy link

github-actions bot commented Oct 31, 2024

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/2874/docs/iroh/

Last updated: 2024-11-06T16:15:38Z

Copy link

github-actions bot commented Oct 31, 2024

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: 59098fa

@@ -28,8 +29,7 @@ use iroh::{
},
client::{
blobs::{
BlobInfo, BlobStatus, CollectionInfo, DownloadMode, DownloadOptions,
IncompleteBlobInfo, WrapOption,
BlobInfo, BlobStatus, CollectionInfo, DownloadOptions, IncompleteBlobInfo, WrapOption,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will probably go away if docs are removed as well.

@rklaehn rklaehn marked this pull request as ready for review October 31, 2024 13:23
@dignifiedquire dignifiedquire added this to the v0.29.0 milestone Nov 1, 2024
@dignifiedquire
Copy link
Contributor

what about removing the fs utils you added to iroh-blobs?

@rklaehn
Copy link
Contributor Author

rklaehn commented Nov 5, 2024

what about removing the fs utils you added to iroh-blobs?

I think some of them are also used from docs, so I can't remove them all until docs are also gone... But will check.

# Conflicts:
#	Cargo.lock
#	iroh-cli/Cargo.toml
#	iroh-dns-server/src/http/rate_limiting.rs
#	iroh/Cargo.toml
@rklaehn rklaehn force-pushed the move-blobs-rpc branch 2 times, most recently from d96c6c2 to 914452c Compare November 6, 2024 15:55
@rklaehn
Copy link
Contributor Author

rklaehn commented Nov 6, 2024

what about removing the fs utils you added to iroh-blobs?

I think some of them are also used from docs, so I can't remove them all until docs are also gone... But will check.

Removed several, including stuff that needs walkdir. But there is still something left that is needed from docs.

@rklaehn rklaehn added this pull request to the merge queue Nov 6, 2024
Merged via the queue into main with commit d6a32f4 Nov 6, 2024
28 of 29 checks passed
@dignifiedquire dignifiedquire deleted the move-blobs-rpc branch November 14, 2024 10:44
matheus23 pushed a commit that referenced this pull request Nov 14, 2024
…obs (#2874)

## Description

Move blobs and tags rpc client and server to iroh-blobs.

Depends on n0-computer/iroh-blobs#7

Todo:

- [x] merge n0-computer/iroh-blobs#7

## Breaking Changes

- Lots of types in client::blobs and client::tags become reexports
- blob share goes away, since it requires the node client

## Notes & open questions

I want to keep the client::blobs and client::tags modules
self-contained, so the idea is that these will reexport all the things
from iroh-blobs::rpc::client that a user will need (except I have
probably forgotten something). Maybe I should use wildcard exports here
even though people dislike them... ?

~~The client::blobs::Client itself is *not* a reexport but a newtype to
hide the ugly type parameters. Same for client::tags::Client.~~

With the changes in quic-rpc, these are now just module reexports!

The Blobs protocol handler now takes an Endpoint, since that was needed
to implement one of the functions.

<!-- Any notes, remarks or open questions you have to make about the PR.
-->

## Change checklist

- [x] Self-review.
- [x] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [x] Tests if relevant.
- [x] All breaking changes documented.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants