Skip to content

Commit

Permalink
fix: add experimental proto optionals and cleanup protos for 1-rc.1 (#…
Browse files Browse the repository at this point in the history
…212)

* fix: add experimental proto optionals and cleanup protos for 1-rc.1

Signed-off-by: mikeee <hey@mike.ee>

* chore: fmt

Signed-off-by: mikeee <hey@mike.ee>

---------

Signed-off-by: mikeee <hey@mike.ee>
  • Loading branch information
mikeee committed Aug 19, 2024
1 parent bc728d5 commit cc2d18d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand Down
21 changes: 12 additions & 9 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@

fn main() -> Result<(), std::io::Error> {
// env::set_var("OUT_DIR", "src");
tonic_build::configure().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",
],
&["."],
)?;
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",
"dapr/proto/runtime/v1/appcallback.proto",
"examples/invoke/proto/helloworld.proto",
],
&["."],
)?;
Ok(())
}
13 changes: 7 additions & 6 deletions dapr/proto/runtime/v1/dapr.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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).
Expand Down Expand Up @@ -1273,4 +1274,4 @@ message DeleteJobRequest {
// DeleteJobResponse is the message response to delete the job by name.
message DeleteJobResponse {
// Empty
}
}
2 changes: 1 addition & 1 deletion macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit cc2d18d

Please sign in to comment.