Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add evaluation id to ListEvaluationHistory RPC. #3950

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/docs/ref/proto.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions internal/controlplane/handlers_evalstatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ func fromEvaluationHistoryRows(
}

res = append(res, &minderv1.EvaluationHistory{
Id: row.EvaluationID.String(),
EvaluatedAt: timestamppb.New(row.EvaluatedAt),
Entity: &minderv1.EvaluationHistoryEntity{
Id: row.EntityID.String(),
Expand Down
1 change: 1 addition & 0 deletions internal/controlplane/handlers_evalstatus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ func TestFromEvaluationHistoryRows(t *testing.T) {
for i := 0; i < len(tt.rows); i++ {
row := tt.rows[i]
item := res[i]
require.Equal(t, row.EvaluationID.String(), item.Id)
require.Equal(t, row.EvaluatedAt, item.EvaluatedAt.AsTime())
require.Equal(t, row.EntityID.String(), item.Entity.Id)
require.Equal(t, dbEntityToEntity(row.EntityType), item.Entity.Type)
Expand Down
4 changes: 4 additions & 0 deletions pkg/api/openapi/minder/v1/minder.swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion pkg/api/protobuf/go/minder/v1/minder.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions proto/minder/v1/minder.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2551,6 +2551,9 @@ message EvaluationHistory {

// created_at is the timestamp of creation of this evaluation
google.protobuf.Timestamp evaluated_at = 6;

// id is the unique identifier of the evaluation.
string id = 7;
}

message EvaluationHistoryEntity {
Expand Down