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

feat(iroh-base, iroh-net-report)!: intro net-report as a crate #2921

Merged
merged 31 commits into from
Nov 21, 2024

Conversation

divagant-martian
Copy link
Contributor

@divagant-martian divagant-martian commented Nov 13, 2024

Description

Introduces net-report as its own crate. For this, introduces a new feature flag relay in iroh-base for the relay topology types.

  • in iroh-base, the RelayUrl is moved to its own file. It can still be used as before, this is not a breaking change.
  • RelayMap, RelayNode are moved to iroh-base under the relay feature flag.
  • RelayMode is moved to endpoint. See the NOTES section about this.
  • net-report now has metrics as a feature flag. I'm not sure how is that this was not feature flagged before but still worked.
  • ping is moved without changes from iroh-net to iroh-net-report. This is the only place where it's used so it should have probably been part of netcheck as a module from the beginig.
  • Adds missing license files

Breaking Changes

  • iroh-net's NetcheckMetrics are now called NetReportMetrics

Notes & open questions

  • RelayMode remains in iroh-net instead of moving to iroh-base with other relay related because this is coupled with the staging and prod configuration of relay urls. Since this is more configuration than concept I think it's best to keep it in iroh-net.
  • The crate is called iroh-net-report because -at least currently- it depends on relay concepts. For example, the tests depend heavily on the internal order of the RelayMap. Can we change this? yes. Should we change this? we can discuss it. Is this PR the place for any of that? No.
  • The api needs some love. Some types that are supposed to be internal are used by dependents (in this case iroh-net) It's not terrible but it could be improved.

Change checklist

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

@divagant-martian divagant-martian changed the title wip: start the netcheck exodussss feat(iroh-base, iroh-netcheck): intro netcheck as crate Nov 19, 2024
@divagant-martian divagant-martian marked this pull request as ready for review November 20, 2024 04:54
@@ -221,7 +225,7 @@ impl Client {
///
/// Unlike the client itself the returned [`Addr`] does not own the actor task, it only
/// allows sending messages to the actor.
pub(crate) fn addr(&self) -> Addr {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note for the future: this is unused in this crate

@divagant-martian divagant-martian requested a review from a team November 20, 2024 05:02
@dignifiedquire
Copy link
Contributor

make sure to also add this to the two ci files that need a list of crates

@divagant-martian divagant-martian changed the title feat(iroh-base, iroh-netcheck): intro netcheck as crate feat(iroh-base, iroh-net-report): intro net-report as a crate Nov 20, 2024
@divagant-martian divagant-martian changed the title feat(iroh-base, iroh-net-report): intro net-report as a crate feat(iroh-base, iroh-net-report)!: intro net-report as a crate Nov 20, 2024

/// Maximum duration to wait for a netcheck report.
/// Maximum duration to wait for a net_report report.
pub(crate) const NETCHECK_REPORT_TIMEOUT: Duration = Duration::from_secs(10);
Copy link
Contributor

Choose a reason for hiding this comment

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

the constant should be renamed as well?

@dignifiedquire
Copy link
Contributor

looking good, found one last rename

@divagant-martian
Copy link
Contributor Author

divagant-martian commented Nov 21, 2024

@dignifiedquire fixed. There's a bunch of net_report report that I don't love but I.. think it will have to do for now? or maybe we can rename Report to Check or similar? not looking forwards to more renaming but it's something I noticed. Thoughts? These are all in strings (docs, comments, etc) which make them technically correct: It's a net_report::Report. Code that would have been a NetReportReport(Report) looks like NetReport(Report) at least

@dignifiedquire
Copy link
Contributor

There's a bunch of net_report report that I don't love but I..

I think we can clean this up in follow ups :) lets get the structure in

@divagant-martian divagant-martian added this pull request to the merge queue Nov 21, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 21, 2024
@divagant-martian divagant-martian added this pull request to the merge queue Nov 21, 2024
Merged via the queue into n0-computer:main with commit a5e9283 Nov 21, 2024
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants