Skip to content

Commit a4f7b37

Browse files
committed
Add support for TaskDelete event on exec in RuntimeV2
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
1 parent f5b0fa2 commit a4f7b37

File tree

4 files changed

+99
-41
lines changed

4 files changed

+99
-41
lines changed

api/events/task.pb.go

Lines changed: 86 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/events/task.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ message TaskDelete {
2929
uint32 pid = 2;
3030
uint32 exit_status = 3;
3131
google.protobuf.Timestamp exited_at = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
32+
// id is the specific exec. By default if omitted will be `""` thus matches
33+
// the init exec of the task matching `container_id`.
34+
string id = 5;
3235
}
3336

3437
message TaskIO {

api/next.pb.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,13 @@ file {
627627
}
628628
json_name: "exitedAt"
629629
}
630+
field {
631+
name: "id"
632+
number: 5
633+
label: LABEL_OPTIONAL
634+
type: TYPE_STRING
635+
json_name: "id"
636+
}
630637
}
631638
message_type {
632639
name: "TaskIO"

runtime/v2/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,9 @@ The Runtime v2 supports an async event model. In order for the an upstream calle
169169
| Topic | Compliance | Description |
170170
| ----- | ---------- | ----------- |
171171
| `runtime.TaskExecAddedEventTopic` | MUST (follow `TaskCreateEventTopic` ) | When an exec is successfully added |
172-
| `runtime.TaskExecStartedEventTopic` | MUST (follow `TaskExecStartedEventTopic`) | When an exec is successfully started |
172+
| `runtime.TaskExecStartedEventTopic` | MUST (follow `TaskExecAddedEventTopic`) | When an exec is successfully started |
173+
| `runtime.TaskExitEventTopic` | MUST (follow `TaskExecStartedEventTopic`) | When an exec (other than the init exec) exits expected or unexpected |
174+
| `runtime.TaskDeleteEventTopic` | SHOULD (follow `TaskExitEventTopic` or `TaskExecAddedEventTopic` if never started) | When an exec is removed from a shim |
173175

174176
### Other
175177

0 commit comments

Comments
 (0)