Skip to content

Commit b7f40bc

Browse files
authored
Setting pubsub bulk publish as stable + updating protos (#1681)
* Updated protos to reflect latest in dapr/dapr * Accommodating change to bulk pubsub name * Updated corresponding unit test --------- Signed-off-by: Whit Waldo <[email protected]>
1 parent f1fac38 commit b7f40bc

File tree

19 files changed

+1931
-1416
lines changed

19 files changed

+1931
-1416
lines changed

src/Dapr.Client/DaprClientGrpc.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,9 @@ private async Task<BulkPublishResponse<TValue>> MakeBulkPublishRequest<TValue>(
246246

247247
try
248248
{
249-
var response = await client.BulkPublishEventAlpha1Async(envelope, options);
249+
var response = await client.BulkPublishEventAsync(envelope, options);
250250

251-
List<BulkPublishResponseFailedEntry<TValue>> failedEntries =
252-
new List<BulkPublishResponseFailedEntry<TValue>>();
251+
List<BulkPublishResponseFailedEntry<TValue>> failedEntries = [];
253252

254253
foreach (var entry in response.FailedEntries)
255254
{

src/Dapr.Protos/Dapr.Protos.csproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,20 @@
88

99
<ItemGroup>
1010
<Protobuf Include="Protos\dapr\proto\common\v1\common.proto" ProtoRoot="Protos" GrpcServices="Client,Server" />
11+
<Protobuf Include="Protos\dapr\proto\runtime\v1\actors.proto" ProtoRoot="Protos" GrpcServices="Client" />
12+
<Protobuf Include="Protos\dapr\proto\runtime\v1\ai.proto" ProtoRoot="Protos" GrpcServices="Client" />
13+
<Protobuf Include="Protos\dapr\proto\runtime\v1\binding.proto" ProtoRoot="Protos" GrpcServices="Client" />
14+
<Protobuf Include="Protos\dapr\proto\runtime\v1\configuration.proto" ProtoRoot="Protos" GrpcServices="Client" />
15+
<Protobuf Include="Protos\dapr\proto\runtime\v1\crypto.proto" ProtoRoot="Protos" GrpcServices="Client" />
1116
<Protobuf Include="Protos\dapr\proto\runtime\v1\dapr.proto" ProtoRoot="Protos" GrpcServices="Client" />
17+
<Protobuf Include="Protos\dapr\proto\runtime\v1\invoke.proto" ProtoRoot="Protos" GrpcServices="Client" />
18+
<Protobuf Include="Protos\dapr\proto\runtime\v1\jobs.proto" ProtoRoot="Protos" GrpcServices="Client" />
19+
<Protobuf Include="Protos\dapr\proto\runtime\v1\lock.proto" ProtoRoot="Protos" GrpcServices="Client" />
20+
<Protobuf Include="Protos\dapr\proto\runtime\v1\metadata.proto" ProtoRoot="Protos" GrpcServices="Client" />
21+
<Protobuf Include="Protos\dapr\proto\runtime\v1\pubsub.proto" ProtoRoot="Protos" GrpcServices="Client" />
22+
<Protobuf Include="Protos\dapr\proto\runtime\v1\secret.proto" ProtoRoot="Protos" GrpcServices="Client" />
23+
<Protobuf Include="Protos\dapr\proto\runtime\v1\state.proto" ProtoRoot="Protos" GrpcServices="Client" />
24+
<Protobuf Include="Protos\dapr\proto\runtime\v1\workflow.proto" ProtoRoot="Protos" GrpcServices="Client" />
1225
<Protobuf Include="Protos\dapr\proto\runtime\v1\appcallback.proto" ProtoRoot="Protos" GrpcServices="Server" />
1326
</ItemGroup>
1427

src/Dapr.Protos/Protos/dapr/proto/common/v1/common.proto

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,5 +180,4 @@ message JobFailurePolicyConstant {
180180
// max_retries is the optional maximum number of retries to attempt before giving up.
181181
// If unset, the Job will be retried indefinitely.
182182
optional uint32 max_retries = 2;
183-
}
184-
183+
}
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
/*
2+
Copyright 2025 The Dapr Authors
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
Unless required by applicable law or agreed to in writing, software
8+
distributed under the License is distributed on an "AS IS" BASIS,
9+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
See the License for the specific language governing permissions and
11+
limitations under the License.
12+
*/
13+
14+
syntax = "proto3";
15+
16+
package dapr.proto.runtime.v1;
17+
18+
import "google/protobuf/any.proto";
19+
import "dapr/proto/common/v1/common.proto";
20+
21+
option csharp_namespace = "Dapr.Client.Autogen.Grpc.v1";
22+
option java_outer_classname = "DaprProtos";
23+
option java_package = "io.dapr.v1";
24+
option go_package = "github.com/dapr/dapr/pkg/proto/runtime/v1;runtime";
25+
26+
// RegisterActorTimerRequest is the message to register a timer for an actor of a given type and id.
27+
message RegisterActorTimerRequest {
28+
string actor_type = 1 [json_name = "actorType"];
29+
string actor_id = 2 [json_name = "actorId"];
30+
string name = 3;
31+
string due_time = 4 [json_name = "dueTime"];
32+
string period = 5;
33+
string callback = 6;
34+
bytes data = 7;
35+
string ttl = 8;
36+
}
37+
38+
// UnregisterActorTimerRequest is the message to unregister an actor timer
39+
message UnregisterActorTimerRequest {
40+
string actor_type = 1 [json_name = "actorType"];
41+
string actor_id = 2 [json_name = "actorId"];
42+
string name = 3;
43+
}
44+
45+
// RegisterActorReminderRequest is the message to register a reminder for an actor of a given type and id.
46+
message RegisterActorReminderRequest {
47+
string actor_type = 1 [json_name = "actorType"];
48+
string actor_id = 2 [json_name = "actorId"];
49+
string name = 3;
50+
string due_time = 4 [json_name = "dueTime"];
51+
string period = 5;
52+
bytes data = 6;
53+
string ttl = 7;
54+
55+
// If true, allows this reminder to overwrite an existing reminder with the
56+
// same name. If not set, defaults to true.
57+
optional bool overwrite = 8;
58+
59+
// failure_policy is the optional policy for handling job failures. If not
60+
// set, the reminder will have the failure policy of trying 3 times on a
61+
// single tick before giving up.
62+
optional common.v1.JobFailurePolicy failure_policy = 9 [json_name = "failure_policy"];
63+
}
64+
65+
// UnregisterActorReminderRequest is the message to unregister an actor reminder.
66+
message UnregisterActorReminderRequest {
67+
string actor_type = 1 [json_name = "actorType"];
68+
string actor_id = 2 [json_name = "actorId"];
69+
string name = 3;
70+
}
71+
72+
// GetActorStateRequest is the message to get key-value states from specific actor.
73+
message GetActorStateRequest {
74+
string actor_type = 1 [json_name = "actorType"];
75+
string actor_id = 2 [json_name = "actorId"];
76+
string key = 3;
77+
}
78+
79+
// GetActorStateResponse is the response conveying the actor's state value.
80+
message GetActorStateResponse {
81+
bytes data = 1;
82+
83+
// The metadata which will be sent to app.
84+
map<string, string> metadata = 2;
85+
}
86+
87+
// ExecuteActorStateTransactionRequest is the message to execute multiple operations on a specified actor.
88+
message ExecuteActorStateTransactionRequest {
89+
string actor_type = 1 [json_name = "actorType"];
90+
string actor_id = 2 [json_name = "actorId"];
91+
repeated TransactionalActorStateOperation operations = 3;
92+
}
93+
94+
// TransactionalActorStateOperation is the message to execute a specified operation with a key-value pair.
95+
message TransactionalActorStateOperation {
96+
string operationType = 1;
97+
string key = 2;
98+
google.protobuf.Any value = 3;
99+
// The metadata used for transactional operations.
100+
//
101+
// Common metadata property:
102+
// - ttlInSeconds : the time to live in seconds for the stored value.
103+
map<string, string> metadata = 4;
104+
}
105+
106+
// InvokeActorRequest is the message to call an actor.
107+
message InvokeActorRequest {
108+
string actor_type = 1 [json_name = "actorType"];
109+
string actor_id = 2 [json_name = "actorId"];
110+
string method = 3;
111+
bytes data = 4;
112+
map<string, string> metadata = 5;
113+
}
114+
115+
// InvokeActorResponse is the method that returns an actor invocation response.
116+
message InvokeActorResponse {
117+
bytes data = 1;
118+
}
119+
120+
// GetActorReminderRequest is the message to get an already-registered actor reminder
121+
message GetActorReminderRequest {
122+
string actor_type = 1 [json_name = "actorType"];
123+
string actor_id = 2 [json_name = "actorID"];
124+
string name = 3;
125+
}
126+
127+
// GetActorReminderResponse is the response conveying an actor's reminder.
128+
message GetActorReminderResponse {
129+
string actor_type = 1 [json_name = "actorType"];
130+
string actor_id = 2 [json_name = "actorID"];
131+
optional string due_time = 4 [json_name = "dueTime"];
132+
optional string period = 5;
133+
google.protobuf.Any data = 6;
134+
optional string ttl = 7;
135+
}
136+
137+
message ListActorRemindersRequest {
138+
string actor_type = 1 [json_name = "actorType"];
139+
optional string actor_id = 2 [json_name = "actorId"];
140+
}
141+
142+
message ListActorRemindersResponse {
143+
repeated NamedActorReminder reminders = 1;
144+
}
145+
146+
message NamedActorReminder {
147+
string name = 1;
148+
ActorReminder reminder = 2;
149+
}
150+
151+
message ActorReminder {
152+
string actor_type = 1 [json_name = "actorType"];
153+
string actor_id = 2 [json_name = "actorID"];
154+
optional string due_time = 4 [json_name = "dueTime"];
155+
optional string period = 5;
156+
google.protobuf.Any data = 6;
157+
optional string ttl = 7;
158+
}
159+
160+
// UnregisterActorRemindersByTypeRequest is the message to unregister an actor
161+
// reminders by the given type. Optional actor_id can be provided to limit the
162+
// scope of the operation to a specific actor instance.
163+
message UnregisterActorRemindersByTypeRequest {
164+
string actor_type = 1 [json_name = "actorType"];
165+
optional string actor_id = 2 [json_name = "actorId"];
166+
}
167+
168+
message UnregisterActorRemindersByTypeResponse {}

0 commit comments

Comments
 (0)