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

Add support library for returning Dropshot range requests #6963

Merged
merged 12 commits into from
Nov 21, 2024
18 changes: 18 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ members = [
"oximeter/types",
"package",
"passwords",
"range-requests",
"rpaths",
"sled-agent",
"sled-agent/api",
Expand Down Expand Up @@ -224,6 +225,7 @@ default-members = [
"oximeter/types",
"package",
"passwords",
"range-requests",
"rpaths",
"sled-agent",
"sled-agent/api",
Expand Down Expand Up @@ -393,7 +395,9 @@ hickory-server = "0.24.1"
highway = "1.2.0"
hkdf = "0.12.4"
http = "1.1.0"
http-body = "1.0.1"
http-body-util = "0.1.2"
http-range = "0.1.5"
httpmock = "0.8.0-alpha.1"
httptest = "0.16.1"
hubtools = { git = "https://github.com/oxidecomputer/hubtools.git", branch = "main" }
Expand Down Expand Up @@ -530,6 +534,7 @@ rand = "0.8.5"
rand_core = "0.6.4"
rand_distr = "0.4.3"
rand_seeder = "0.3.0"
range-requests = { path = "range-requests" }
ratatui = "0.28.1"
rayon = "1.10"
rcgen = "0.12.1"
Expand Down
25 changes: 25 additions & 0 deletions range-requests/Cargo.toml
Copy link
Member

Choose a reason for hiding this comment

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

Out of curiosity, any particular motivation for including this crate in the omicron repo, rather than in the dropshot repo or in its own repo? It seems general-purpose enough that it might eventually be useful in other projects, and there are no Omicron-specific dependencies beyond omicron-workspace-hack (which I assume could be dropped if this library lived elsewhere)...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Totally, I want to leave this door open, but I figured I'd just start locally to iterate quickly. It's already a separate crate, so if we keep the number of dependencies low, it should be easy to move out.

I haven't actually used this much from the client side yet, but I'd like to also validate that half works before exporting it out of Omicron, if that's cool?

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "range-requests"
description = "Helpers for making and receiving range requests"
version = "0.1.0"
edition = "2021"
license = "MPL-2.0"

[lints]
workspace = true

[dependencies]
bytes.workspace = true
dropshot.workspace = true
futures.workspace = true
http.workspace = true
http-range.workspace = true
http-body-util.workspace = true
hyper.workspace = true
thiserror.workspace = true
omicron-workspace-hack.workspace = true

[dev-dependencies]
http-body.workspace = true
tokio.workspace = true
tokio-util.workspace = true
Loading
Loading