diff --git a/README.md b/README.md index 3e27018..f7bc96a 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ Some other features of tarpc: Add to your `Cargo.toml` dependencies: ```toml -tarpc = "0.28" +tarpc = "0.29" ``` The `tarpc::service` attribute expands to a collection of items that form an rpc service. @@ -82,7 +82,7 @@ your `Cargo.toml`: ```toml anyhow = "1.0" futures = "0.3" -tarpc = { version = "0.28", features = ["tokio1"] } +tarpc = { version = "0.29", features = ["tokio1"] } tokio = { version = "1.0", features = ["macros"] } ``` diff --git a/RELEASES.md b/RELEASES.md index 057f5de..24dd338 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,11 @@ +## 0.29.0 (2022-05-26) + +### Breaking Changes + +`Context.deadline` is now serialized as a Duration. This prevents clock skew from affecting deadline +behavior. For more details see https://github.com/google/tarpc/pull/367 and its [related +issue](https://github.com/google/tarpc/issues/366). + ## 0.28.0 (2022-04-06) ### Breaking Changes @@ -16,7 +24,7 @@ the server drop its connections more quickly. ### Breaking Changes -### RPC error type is changing +#### RPC error type is changing RPC return types are changing from `Result` to `Result`. diff --git a/example-service/Cargo.toml b/example-service/Cargo.toml index d0f1179..2b62139 100644 --- a/example-service/Cargo.toml +++ b/example-service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tarpc-example-service" -version = "0.10.0" +version = "0.11.0" rust-version = "1.56" authors = ["Tim Kuehn "] edition = "2021" @@ -21,7 +21,7 @@ futures = "0.3" opentelemetry = { version = "0.16", features = ["rt-tokio"] } opentelemetry-jaeger = { version = "0.15", features = ["rt-tokio"] } rand = "0.8" -tarpc = { version = "0.28", path = "../tarpc", features = ["full"] } +tarpc = { version = "0.29", path = "../tarpc", features = ["full"] } tokio = { version = "1", features = ["macros", "net", "rt-multi-thread"] } tracing = { version = "0.1" } tracing-opentelemetry = "0.15" diff --git a/tarpc/Cargo.toml b/tarpc/Cargo.toml index 47e793e..4c6e157 100644 --- a/tarpc/Cargo.toml +++ b/tarpc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tarpc" -version = "0.28.0" +version = "0.29.0" rust-version = "1.58.0" authors = [ "Adam Wright ", diff --git a/tarpc/src/context.rs b/tarpc/src/context.rs index 9fe88c0..e3a6aff 100644 --- a/tarpc/src/context.rs +++ b/tarpc/src/context.rs @@ -28,6 +28,7 @@ pub struct Context { /// When the client expects the request to be complete by. The server should cancel the request /// if it is not complete by this time. #[cfg_attr(feature = "serde1", serde(default = "ten_seconds_from_now"))] + // Serialized as a Duration to prevent clock skew issues. #[cfg_attr(feature = "serde1", serde(with = "absolute_to_relative_time"))] pub deadline: SystemTime, /// Uniquely identifies requests originating from the same source. diff --git a/tarpc/src/lib.rs b/tarpc/src/lib.rs index 441e733..f944ba1 100644 --- a/tarpc/src/lib.rs +++ b/tarpc/src/lib.rs @@ -54,7 +54,7 @@ //! Add to your `Cargo.toml` dependencies: //! //! ```toml -//! tarpc = "0.28" +//! tarpc = "0.29" //! ``` //! //! The `tarpc::service` attribute expands to a collection of items that form an rpc service. @@ -69,7 +69,7 @@ //! ```toml //! anyhow = "1.0" //! futures = "0.3" -//! tarpc = { version = "0.28", features = ["tokio1"] } +//! tarpc = { version = "0.29", features = ["tokio1"] } //! tokio = { version = "1.0", features = ["macros"] } //! ``` //!