From c5fee7283cb388177ce17cd6115f33575252f8d8 Mon Sep 17 00:00:00 2001 From: David Byron Date: Fri, 10 Sep 2021 10:40:06 -0700 Subject: [PATCH] feat(events): Add Gate generated id in the event being sent to echo Set the Gate generated event id as the top level event id in the event being sent to Echo. This conforms to Event.java as used by Echo to deserialize the event upon receipt. This also prevents Echo from generating yet another UUID. --- .../netflix/spinnaker/gate/services/PipelineService.groovy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/PipelineService.groovy b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/PipelineService.groovy index 5366c9f3a9..41060526a3 100644 --- a/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/PipelineService.groovy +++ b/gate-web/src/main/groovy/com/netflix/spinnaker/gate/services/PipelineService.groovy @@ -97,6 +97,9 @@ class PipelineService { parameters.put("eventId", eventId) parameters.put("executionId", executionId) + // Note that the Gate generated UUID is used as the event id and set it at the top level of the Map. + // This conforms to Event.java as used by Echo to deserialize the event upon receipt. + // This also prevents Echo from generating yet another UUID. Map eventMap = [ content: [ application : application, @@ -106,7 +109,8 @@ class PipelineService { ], details: [ type: "manual" - ] + ], + eventId: eventId ] echoService.postEvent(eventMap) return [