Add Events API endpoint#237
Conversation
server/application/application.proto
Outdated
There was a problem hiding this comment.
Can we name the field items and rename this to EventsList? I checked and we are starting to become inconsistent with our response objects in the case of lists. We currently already have ApplicationList, ClusterList, and RepositoryList. I think we should continue that convention:
// EventsList holds a list of resource events.
message EventsList {
repeated k8s.io.api.events.v1beta1.Event items = 1;
}
Similarly the repository.ListDirResponse should probably change as well. For consistency sake I think we should change from:
// ListDirResponse returns the contents of the repo of a ListDir request
message ListDirResponse {
repeated string data = 1;
}
to:
// FileList returns the file names of the repo of a ListDir request
message FileList {
repeated string items = 1;
}
server/application/application.go
Outdated
There was a problem hiding this comment.
I think this will return all events instead of events related to the specified resource. please fix it
There was a problem hiding this comment.
@alexmt right you are! I believe this is now addressed.
server/application/application.proto
Outdated
There was a problem hiding this comment.
I've realized that resource name is not enough to uniquely identify an object. Please add resource kind and use it in ListResourceEvents method.
|
LGTM |
Closes #135 and addresses concerns about protobuf response object nomenclature.
Test as follows, replacing the resource name and resource uid as required: