Skip to content

Commit b43325f

Browse files
docs: spice-rs v3.0.0 release note (#61)
* WIP: v3.0.0 release note * fix * more details on query retry * fix formatting * fix * change log * update contributor list * update template - ack all contributors * fix api casing * fix api case * fix * Update docs/release_notes/v3.0.0.md Co-authored-by: Phillip LeBlanc <phillip@leblanc.tech> --------- Co-authored-by: Phillip LeBlanc <phillip@leblanc.tech>
1 parent c249501 commit b43325f

2 files changed

Lines changed: 94 additions & 1 deletion

File tree

.github/ISSUE_TEMPLATE/end_game.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ assignees: ''
2727
- [ ] [docs.spice.ai](https://github.com/spicehq/docs/tree/trunk/sdks/rust-sdk)
2828
- [ ] Test the [`spice-rs` sample](https://github.com/spiceai/samples/tree/trunk/client-sdk/spice-rs-sdk-sample) using the latest `trunk` SDK version.
2929
- [ ] Update [release notes](https://github.com/spiceai/spice-rs/blob/trunk/docs/release_notes)
30-
- [ ] Ensure any external contributors have been acknowledged.
30+
- [ ] Ensure all contributors have been acknowledged.
3131
- [ ] Verify the version in `Cargo.toml` is correct and match the milestone version.
3232
- [ ] Run [Test CI](https://github.com/spiceai/spice-rs/actions/workflows/build.yml) and ensure it is green on the trunk branch.
3333
- [ ] QA DRI sign-off

docs/release_notes/v3.0.0.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Announcing spice-rs v3.0 🎉
2+
3+
The v3.0 release optimizes the Spice client API, adds support for robust query retry, and supports more custom metadata configurations for spice query.
4+
5+
## What's New in v3.0.0
6+
7+
**Immutable client API**: `Client::query()` now takes `&self` instead of `&mut self`, user can issue multiple simultaneous queries without mutable borrowing.
8+
9+
**Automatic query retry**: Support automatic query retry on transient network or server-side error when obtaining the result stream in `Client::query()`.
10+
11+
**Retryable query stream**: Introducing `RetryableQueryStream` as the returned type of `Client::query()`. This feature provides robust retry of network interruptions during data streaming.
12+
13+
When a connection is reset during streaming, the stream consumer has two options:
14+
15+
- Option 1: Retry Query Stream
16+
17+
```rust
18+
// When stream consumer continue polling after a ConnectionReset error:
19+
// 1. The query is automatically reissued
20+
// 2. Data streaming restarts from the beginning
21+
22+
// Example flow:
23+
Poll 1:Received batch1
24+
Poll 2:Received batch2
25+
Poll 3:SpiceClientError::ConnectionReset errorContinue polling
26+
Poll 4:Received batch1* (query restarted automatically)
27+
Poll 5:Received batch2*
28+
Poll 6:Received batch3*
29+
...
30+
```
31+
32+
- Option 2: Stop polling
33+
34+
```rust
35+
// Stream consumer can stop polling when it receives a ConnectionReset error
36+
// The stream won't be retried
37+
38+
// Example flow:
39+
Poll 1:Received batch1
40+
Poll 2:Received batch2
41+
Poll 3:SpiceClientError::ConnectionReset errorStop polling and handle error
42+
```
43+
44+
**Expanded support for query parameters**: Support custom `User-Agent` and `Cache-Control` query metadata configurations.
45+
46+
Follow the [Spice OSS quickstart](https://github.com/spiceai/spiceai?tab=readme-ov-file#%EF%B8%8F-quickstart-local-machine) to install and run the spice runtime locally, and query data using the spice-rs SDK:
47+
48+
```rust
49+
use spiceai::ClientBuilder;
50+
51+
#[tokio::main]
52+
async fn main() {
53+
let client = ClientBuilder::new().build().await.unwrap();
54+
55+
let data = client.query(
56+
"SELECT trip_distance, total_amount FROM taxi_trips ORDER BY trip_distance DESC LIMIT 10;"
57+
).await;
58+
}
59+
```
60+
61+
## Contributors
62+
63+
- [@Sevenannn](https://github.com/Sevenannn)
64+
- [@phillipleblanc](https://github.com/phillipleblanc)
65+
- [@peasee](https://github.com/peasee)
66+
- [@digadeesh](https://github.com/digadeesh)
67+
- [@eadgbear](https://github.com/eadgbear)
68+
69+
## Breaking Changes
70+
71+
- `Client::query()` now takes `&self` instead of `&mut self`, and returns a retryable stream type `RetryableQueryStream`
72+
73+
```rust
74+
// Old:
75+
fn query(&mut self, sql: &str) -> FlightRecordBatchStream
76+
// New:
77+
fn query(&self, sql: &str) -> RetryableQueryStream
78+
```
79+
80+
## What's Changed
81+
82+
- Fix a typo in README.md by @digadeesh in https://github.com/spiceai/spice-rs/pull/42
83+
- feat: Add spice user agent, update for clippy rules by @peasee in https://github.com/spiceai/spice-rs/pull/44
84+
- Adding custom User-Agent to spice-rs by @eadgbear in https://github.com/spiceai/spice-rs/pull/48
85+
- Prepend user-supplied user-agent by @phillipleblanc in https://github.com/spiceai/spice-rs/pull/49
86+
- Fix broken system tls loading and test by @Sevenannn in https://github.com/spiceai/spice-rs/pull/52
87+
- Support query retry, parameterized query, and cache control header by @Sevenannn in https://github.com/spiceai/spice-rs/pull/51
88+
- Enable all tests in CI by @Sevenannn in https://github.com/spiceai/spice-rs/pull/55
89+
- feat: Retryable query stream by @Sevenannn in https://github.com/spiceai/spice-rs/pull/57
90+
- Fix macos test by @Sevenannn in https://github.com/spiceai/spice-rs/pull/58
91+
- docs: Add endgame release process by @peasee in https://github.com/spiceai/spice-rs/pull/46
92+
93+
**Full Changelog**: https://github.com/spiceai/spice-rs/compare/v2.0.0...v3.0.0

0 commit comments

Comments
 (0)