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

refactor(iroh): add --start option to CLI commands #1802

Merged
merged 30 commits into from
Nov 17, 2023
Merged

Conversation

dignifiedquire
Copy link
Contributor

@dignifiedquire dignifiedquire commented Nov 10, 2023

Description

Changes to CLI commands:

  • All RPC commands now have a --start option that starts a node, runs the command, and then shuts down the node
  • iroh get is now iroh blob get, and needs --start flag to run standalone
  • iroh start SOURCE is now iroh start --add SOURCE
  • Improvements to the node startup code and error handling

Notes and open questions

We could remove the --add SOURCE option from iroh start if there was a way to to keep running the node after starting it with a command. Could also be something like an --exec option. But let's leave that to a followup.

@dignifiedquire dignifiedquire marked this pull request as ready for review November 16, 2023 10:09
@dignifiedquire dignifiedquire added this to the v0.11.0 milestone Nov 16, 2023
@Arqu
Copy link
Collaborator

Arqu commented Nov 16, 2023

/netsim branch arqu/fixcli

@Arqu
Copy link
Collaborator

Arqu commented Nov 16, 2023

If this passes (which is expected) https://github.com/n0-computer/iroh/actions/runs/6889635559/job/18741024267
Just merge the netsim PR and then your PR.

@dignifiedquire
Copy link
Contributor Author

If this passes (which is expected)

looks like it is not passing

## Description

Changes for #1802 

CLI command changes:

* `iroh start` takes `--add` not `--source`
* `iroh blob add` takes required `SOURCE` arg and not optional
`--source` opt

Internal changes:
* reduce code duplication around starting a node
* always start the metrics server (for both `iroh start` and `iroh CMD
--start`)
* make sure to remove the rpc lock file if aborting with error
* cleanups

## Notes & open questions

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

## Change checklist

- [x] Self-review.
- [x] Documentation updates if relevant.
- ~~[ ] Tests if relevant.~~
@Frando
Copy link
Member

Frando commented Nov 17, 2023

/netsim branch frando/fixcli

edit: runs here https://github.com/n0-computer/iroh/actions/runs/6902564336

@Frando
Copy link
Member

Frando commented Nov 17, 2023

/netsim branch frando/fixcli

@Frando
Copy link
Member

Frando commented Nov 17, 2023

/netsim branch frando/fixcli

4 similar comments
@Frando
Copy link
Member

Frando commented Nov 17, 2023

/netsim branch frando/fixcli

@Frando
Copy link
Member

Frando commented Nov 17, 2023

/netsim branch frando/fixcli

@dignifiedquire
Copy link
Contributor Author

/netsim branch frando/fixcli

@Arqu
Copy link
Collaborator

Arqu commented Nov 17, 2023

/netsim branch frando/fixcli

@dignifiedquire
Copy link
Contributor Author

/netsim branch frando/fixcli

@dignifiedquire
Copy link
Contributor Author

/netsim branch frando/fixcli

@dignifiedquire
Copy link
Contributor Author

/netsim branch frando/fixcli

1 similar comment
@Arqu
Copy link
Collaborator

Arqu commented Nov 17, 2023

/netsim branch frando/fixcli

Copy link

feat-cli-start.6f660a0322cc19b0e2c5ba30ba7fc6b4ad66e526
Perf report:

test case throughput_gbps throughput_transfer
iroh_latency_20ms 1_to_1 0.81 1.37
iroh_latency_20ms 1_to_3 2.42 5.03
iroh_latency_20ms 1_to_5 4.03 6.59
iroh_latency_20ms 1_to_10 4.16 5.60
iroh_latency_20ms 2_to_2 1.61 3.39
iroh_latency_20ms 2_to_4 3.22 7.06
iroh_latency_20ms 2_to_6 4.73 8.58
iroh_latency_20ms 2_to_10 6.88 9.66
iroh 1_to_1 0.81 1.75
iroh 1_to_3 2.42 5.67
iroh 1_to_5 3.64 5.68
iroh 1_to_10 4.16 5.45
iroh 2_to_2 1.61 4.01
iroh 2_to_4 3.22 7.38
iroh 2_to_6 4.84 8.70
iroh 2_to_10 4.92 8.59
iroh_latency_200ms 1_to_1 0.81 1.93
iroh_latency_200ms 1_to_3 2.42 5.29
iroh_latency_200ms 1_to_5 4.03 5.95
iroh_latency_200ms 1_to_10 4.16 6.01
iroh_latency_200ms 2_to_2 1.61 3.74
iroh_latency_200ms 2_to_4 3.22 7.04
iroh_latency_200ms 2_to_6 4.84 8.38
iroh_latency_200ms 2_to_10 7.28 9.64

@dignifiedquire dignifiedquire added this pull request to the merge queue Nov 17, 2023
Merged via the queue into main with commit 10af401 Nov 17, 2023
15 checks passed
@dignifiedquire dignifiedquire deleted the feat-cli-start branch November 17, 2023 21:53
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.

3 participants