Skip to content

Commit 22d9380

Browse files
Merge branch 'main' into brendan/shared-rate-card
2 parents 6458204 + d052caa commit 22d9380

6 files changed

Lines changed: 159 additions & 46 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.22.0
2+
3+
### New Features ✨
4+
5+
- Add a batched endpoint for taskbroker status updates by @evanh in [#283](https://github.com/getsentry/sentry-protos/pull/283)
6+
17
## 0.21.0
28

39
### New Features ✨

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.21.0
1+
0.22.0

proto/sentry_protos/taskbroker/v1/taskbroker.proto

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ message RetryState {
1414
// Current attempt number
1515
uint32 attempts = 1;
1616

17-
// After this number of attempts, the task is either discarded or deadlettered.
17+
// After this number of attempts, the activation is either discarded or deadlettered.
1818
uint32 max_attempts = 2;
1919

2020
// The action to take after the max_attempts is exceeded.
2121
OnAttemptsExceeded on_attempts_exceeded = 3;
2222

23-
// Whether a task should be executed at most once.
23+
// Whether an activation should be executed at most once.
2424
optional bool at_most_once = 4;
2525

26-
// Duration in seconds that a task must wait to begin execution after it is retried.
26+
// Duration in seconds that an activation must wait to begin execution after it is retried.
2727
optional uint64 delay_on_retry = 5;
2828
}
2929

@@ -36,17 +36,17 @@ enum TaskActivationStatus {
3636
TASK_ACTIVATION_STATUS_COMPLETE = 5;
3737
}
3838

39-
// Task message that is stored in Kafka and shared over RPC.
39+
// Activation message that is stored in Kafka and shared over RPC.
4040
message TaskActivation {
41-
// A GUID for the task. Used to update tasks
41+
// A GUID for the activation. Used to update activations
4242
string id = 1;
4343

44-
// The task namespace. Applications can contain multiple namespaces.
44+
// The activation namespace. Applications can contain multiple namespaces.
4545
// While namespaces within an application must be unique, different
4646
// applications can have overlapping namespace values.
4747
string namespace = 2;
4848

49-
// The name of the task. This name is resolved within the worker
49+
// The name of the activation. This name is resolved within the worker
5050
string taskname = 3;
5151

5252
// DEPRECATED: Use parameters_bytes instead.
@@ -58,25 +58,25 @@ message TaskActivation {
5858
// Mutually exclusive with `parameters`.
5959
bytes parameters_bytes = 13;
6060

61-
// A map of headers for the task.
61+
// A map of headers for the activation.
6262
map<string, string> headers = 5;
6363

64-
// The timestamp a task was stored in Kafka
64+
// The timestamp an activation was stored in Kafka
6565
google.protobuf.Timestamp received_at = 6;
6666

6767
// Retry state
6868
RetryState retry_state = 7;
6969

70-
// The duration in seconds that a worker has to complete task execution.
70+
// The duration in seconds that a worker has to complete activation execution.
7171
// When an activation is moved from pending -> processing a result is expected
7272
// in this many seconds.
7373
uint64 processing_deadline_duration = 8;
7474

75-
// The duration in seconds that a task has to start execution.
75+
// The duration in seconds that an activation has to start execution.
7676
// After received_at + expires has passed an activation is expired and will not be executed.
7777
optional uint64 expires = 9;
7878

79-
// The duration in seconds that a task must wait to begin execution after it is emitted.
79+
// The duration in seconds that an activation must wait to begin execution after it is emitted.
8080
// After received_at + delay has passed, the activation will become pending.
8181
optional uint64 delay = 11;
8282

@@ -91,11 +91,14 @@ message TaskActivation {
9191
// RPC messages and services
9292
////////////////////////////
9393
service ConsumerService {
94-
// Fetch a new task activation to process.
94+
// Fetch a new activation to process.
9595
rpc GetTask(GetTaskRequest) returns (GetTaskResponse) {}
9696

97-
// Update the state of a task with execution results.
97+
// Update the state of an activation with execution results.
9898
rpc SetTaskStatus(SetTaskStatusRequest) returns (SetTaskStatusResponse) {}
99+
100+
// Update the status of multiple activations
101+
rpc SetBatchActivationStatus(SetBatchActivationStatusRequest) returns (SetBatchActivationStatusResponse) {}
99102
}
100103

101104
message GetTaskRequest {
@@ -106,7 +109,7 @@ message GetTaskRequest {
106109
}
107110

108111
message GetTaskResponse {
109-
// If there are no tasks available, this will be empty
112+
// If there are no activations available, this will be empty
110113
optional TaskActivation task = 1;
111114
}
112115

@@ -122,29 +125,36 @@ message SetTaskStatusRequest {
122125

123126
TaskActivationStatus status = 2;
124127

125-
// If fetch_next is provided, receive a new task in the response
128+
// If fetch_next is provided, receive a new activation in the response
126129
optional FetchNextTask fetch_next_task = 3;
127130

128-
// Maximum number of attempts for this task (including the initial attempt).
131+
// Maximum number of attempts for this activation (including the initial attempt).
129132
// When status is RETRY and this field is set, the broker will update
130133
// the activation's retry_state with this value. This allows workers
131134
// to communicate the retry policy for tasks from raw topics that
132135
// don't have retry_state embedded in the message.
133136
optional uint32 max_attempts = 4;
134137

135-
// Duration in seconds to wait before retrying the task.
138+
// Duration in seconds to wait before retrying the activation.
136139
// When status is RETRY and this field is set, the broker will update
137140
// the activation's retry_state.delay_on_retry with this value.
138141
optional uint64 delay_on_retry = 5;
139142
}
140143

141144
message SetTaskStatusResponse {
142-
// The next task the worker should execute. Requires fetch_next to be set on the request.
145+
// The next activation the worker should execute. Requires fetch_next to be set on the request.
143146
optional TaskActivation task = 1;
144147
}
145148

149+
message SetBatchActivationStatusRequest {
150+
// The status updates the broker should execute
151+
repeated SetTaskStatusRequest updates = 1;
152+
}
153+
154+
message SetBatchActivationStatusResponse {}
155+
146156
service WorkerService {
147-
// Provide the worker with a task to execute.
157+
// Provide the worker with an activation to execute.
148158
rpc PushTask(PushTaskRequest) returns (PushTaskResponse) {}
149159
}
150160

rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sentry_protos"
3-
version = "0.21.0"
3+
version = "0.22.0"
44
edition = "2021"
55
readme = "README.md"
66
description = "Rust bindings for sentry-protos"

0 commit comments

Comments
 (0)