Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/data-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"
anyhow = { workspace = true, features = ["std"] }
bytes = { workspace = true }
futures = { workspace = true }
reqwest = { workspace = true, features = ["gzip", "json", "stream"] }
reqwest = { workspace = true, features = ["zstd", "json", "stream"] }
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

Dropping the gzip feature here removes gzip decompression support for this client. If data_sources can point to services that only support gzip (or return it despite Accept-Encoding), requests may start failing. Consider keeping both gzip and zstd features enabled for backward compatibility, unless all supported data sources are guaranteed to support zstd.

Suggested change
reqwest = { workspace = true, features = ["zstd", "json", "stream"] }
reqwest = { workspace = true, features = ["gzip", "zstd", "json", "stream"] }

Copilot uses AI. Check for mistakes.
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
sqd-primitives = { path = "../primitives", features = ["serde"] }
2 changes: 1 addition & 1 deletion crates/data-client/src/reqwest/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn default_http_client() -> Client {
Client::builder()
.read_timeout(Duration::from_secs(20))
.connect_timeout(Duration::from_secs(20))
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

Switching the client to only advertise/handle zstd means data sources that don't support content-encoding: zstd (or that ignore Accept-Encoding and respond with gzip) will fail to decode. Since DatasetConfig.data_sources accepts arbitrary URLs, consider enabling both gzip and zstd support (keep the gzip feature and also call .gzip(true) alongside .zstd(true)), or make the encoding configurable if zstd-only is a hard requirement.

Suggested change
.connect_timeout(Duration::from_secs(20))
.connect_timeout(Duration::from_secs(20))
.gzip(true)

Copilot uses AI. Check for mistakes.
.gzip(true)
.zstd(true)
.build()
.unwrap()
}
Expand Down
Loading