From 0b680177f3f5f723e51d1d2d4d86066c85bc2e69 Mon Sep 17 00:00:00 2001 From: mikeee Date: Mon, 19 Aug 2024 17:39:04 +0100 Subject: [PATCH 1/2] fix: add experimental proto optionals and cleanup protos for 1-rc.1 Signed-off-by: mikeee --- Cargo.toml | 4 ++-- build.rs | 5 ++++- dapr/proto/runtime/v1/dapr.proto | 13 +++++++------ macros/Cargo.toml | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6c7ebf71..6194d387 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dapr" -version = "0.15.0" +version = "0.15.1-rc.1" authors = ["dapr.io"] edition = "2021" license = "Apache-2.0" @@ -10,7 +10,7 @@ readme = "README.md" keywords = ["microservices", "dapr"] [dependencies] -dapr-macros = { version = "0.15.0", path = "macros" } +dapr-macros = { version = "0.15.1-rc.1", path = "macros" } futures = "0.3" tonic = "0.11.0" prost = "0.12.3" diff --git a/build.rs b/build.rs index 3215fafd..6be6ab65 100644 --- a/build.rs +++ b/build.rs @@ -2,7 +2,10 @@ fn main() -> Result<(), std::io::Error> { // env::set_var("OUT_DIR", "src"); - tonic_build::configure().build_server(true).compile( + tonic_build::configure() + .protoc_arg("--experimental_allow_proto3_optional") + .build_server(true) + .compile( &[ "dapr/proto/common/v1/common.proto", "dapr/proto/runtime/v1/dapr.proto", diff --git a/dapr/proto/runtime/v1/dapr.proto b/dapr/proto/runtime/v1/dapr.proto index 8ecc3984..d1e5f67c 100644 --- a/dapr/proto/runtime/v1/dapr.proto +++ b/dapr/proto/runtime/v1/dapr.proto @@ -493,6 +493,7 @@ message InvokeBindingRequest { // // Common metadata property: // - ttlInSeconds : the time to live in seconds for the message. + // // If set in the binding definition will cause all messages to // have a default time to live. The message ttl overrides any value // in the binding definition. @@ -839,11 +840,11 @@ message TryLockRequest { // // The reason why we don't make it automatically generated is: // 1. If it is automatically generated,there must be a 'my_lock_owner_id' field in the response. - // This name is so weird that we think it is inappropriate to put it into the api spec + // This name is so weird that we think it is inappropriate to put it into the api spec // 2. If we change the field 'my_lock_owner_id' in the response to 'lock_owner',which means the current lock owner of this lock, - // we find that in some lock services users can't get the current lock owner.Actually users don't need it at all. + // we find that in some lock services users can't get the current lock owner.Actually users don't need it at all. // 3. When reentrant lock is needed,the existing lock_owner is required to identify client and check "whether this client can reenter this lock". - // So this field in the request shouldn't be removed. + // So this field in the request shouldn't be removed. string lock_owner = 3 [json_name = "lockOwner"]; // Required. The time before expiry.The time unit is second. @@ -880,7 +881,7 @@ message SubtleGetKeyRequest { // JSON (JSON Web Key) as string JSON = 1; } - + // Name of the component string component_name = 1 [json_name="componentName"]; // Name (or name/version) of the key to use in the key vault @@ -1062,7 +1063,7 @@ message EncryptRequestOptions { // If true, the encrypted document does not contain a key reference. // In that case, calls to the Decrypt method must provide a key reference (name or name/version). // Defaults to false. - bool omit_decryption_key_name = 11 [json_name="omitDecryptionKeyName"]; + bool omit_decryption_key_name = 11 [json_name="omitDecryptionKeyName"]; // Key reference to embed in the encrypted document (name or name/version). // This is helpful if the reference of the key used to decrypt the document is different from the one used to encrypt it. // If unset, uses the reference of the key used to encrypt the document (this is the default behavior). @@ -1273,4 +1274,4 @@ message DeleteJobRequest { // DeleteJobResponse is the message response to delete the job by name. message DeleteJobResponse { // Empty -} +} \ No newline at end of file diff --git a/macros/Cargo.toml b/macros/Cargo.toml index e7af5764..1c5d6925 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dapr-macros" -version = "0.15.0" +version = "0.15.1-rc.1" edition = "2021" description = "Dapr Rust SDK" license = "Apache-2.0" From 2ca0a901bf53f413982d21869808267f2c3f5caa Mon Sep 17 00:00:00 2001 From: mikeee Date: Mon, 19 Aug 2024 17:41:13 +0100 Subject: [PATCH 2/2] chore: fmt Signed-off-by: mikeee --- build.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/build.rs b/build.rs index 6be6ab65..b0eb730b 100644 --- a/build.rs +++ b/build.rs @@ -6,13 +6,13 @@ fn main() -> Result<(), std::io::Error> { .protoc_arg("--experimental_allow_proto3_optional") .build_server(true) .compile( - &[ - "dapr/proto/common/v1/common.proto", - "dapr/proto/runtime/v1/dapr.proto", - "dapr/proto/runtime/v1/appcallback.proto", - "examples/invoke/proto/helloworld.proto", - ], - &["."], - )?; + &[ + "dapr/proto/common/v1/common.proto", + "dapr/proto/runtime/v1/dapr.proto", + "dapr/proto/runtime/v1/appcallback.proto", + "examples/invoke/proto/helloworld.proto", + ], + &["."], + )?; Ok(()) }