Skip to content

Commit 7c2adc9

Browse files
committed
fix(api): use UInt32Value for ProcessExit status
The status field in ProcessExit was a simple number (uint32). In Proto3, if a number is 0, it doesn't show up in JSON. This was hiding the status code when a process exited successfully. We changed it to a wrapper type (UInt32Value). Now, even if the status is 0, it will always appear in the JSON output. Fixes #902 Signed-off-by: Aritra Dey <adey01027@gmail.com>
1 parent 62f9779 commit 7c2adc9

File tree

11 files changed

+1886
-1874
lines changed

11 files changed

+1886
-1874
lines changed

api/v1/README.md

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

api/v1/tetragon/codegen/eventchecker/eventchecker.pb.go

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

api/v1/tetragon/tetragon.pb.go

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

api/v1/tetragon/tetragon.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ message ProcessExit {
320320
string signal = 3;
321321
// Status code on process exit. For example, the status code can indicate
322322
// if an error was encountered or the program exited successfully.
323-
uint32 status = 4;
323+
google.protobuf.UInt32Value status = 4;
324324
// Date and time of the event.
325325
google.protobuf.Timestamp time = 5;
326326
// Ancestors of the process beyond the immediate parent.

contrib/tetragon-rthooks/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.pb.go

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

contrib/tetragon-rthooks/vendor/github.com/cilium/tetragon/api/v1/tetragon/tetragon.proto

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

docs/content/en/docs/reference/grpc-api.md

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

pkg/grpc/exec/exec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ func GetProcessExit(event *MsgExitEventUnix) *tetragon.ProcessExit {
476476
Parent: tetragonParent,
477477
Ancestors: tetragonAncestors,
478478
Signal: signal,
479-
Status: code,
479+
Status: &wrapperspb.UInt32Value{Value: code},
480480
Time: ktime.ToProto(event.Common.Ktime),
481481
}
482482

vendor/github.com/cilium/tetragon/api/v1/tetragon/codegen/eventchecker/eventchecker.pb.go

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

0 commit comments

Comments
 (0)