From 95d63f20ca6c6fdaf6ad2465427149eee8840faf Mon Sep 17 00:00:00 2001 From: Joseph Rajewski <83741749+paladin-devops@users.noreply.github.com> Date: Tue, 25 Jul 2023 17:20:39 -0400 Subject: [PATCH] events: Add project field to Event. This is necessary to enable "project-level" events. Before this commit, Events could only be used at the "app-level". --- pkg/server/gen/server.swagger.json | 12 ++++++++++++ pkg/server/proto/server.proto | 3 +++ pkg/serverstate/event.go | 4 +++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/pkg/server/gen/server.swagger.json b/pkg/server/gen/server.swagger.json index 3ce81638051..7142e4d379a 100644 --- a/pkg/server/gen/server.swagger.json +++ b/pkg/server/gen/server.swagger.json @@ -7124,6 +7124,12 @@ "type": "string" }, "collectionFormat": "multi" + }, + { + "name": "project.project", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ @@ -7284,6 +7290,12 @@ "type": "string" }, "collectionFormat": "multi" + }, + { + "name": "project.project", + "in": "query", + "required": false, + "type": "string" } ], "tags": [ diff --git a/pkg/server/proto/server.proto b/pkg/server/proto/server.proto index 365933a25ab..04555e55823 100644 --- a/pkg/server/proto/server.proto +++ b/pkg/server/proto/server.proto @@ -792,6 +792,9 @@ message UI { PaginationRequest pagination = 3; SortingRequest sorting = 4; + + // Project that the events belong to + Ref.Project project = 5; } message ListEventsResponse { diff --git a/pkg/serverstate/event.go b/pkg/serverstate/event.go index d5797d3d692..5f58bbd54a3 100644 --- a/pkg/serverstate/event.go +++ b/pkg/serverstate/event.go @@ -4,12 +4,14 @@ package serverstate import ( - "github.com/hashicorp/waypoint/pkg/server/gen" "time" + + "github.com/hashicorp/waypoint/pkg/server/gen" ) type Event struct { Application *gen.Ref_Application + Project *gen.Project EventTimestamp time.Time EventType string EventData []byte