Only the last build event shown in Compass

I’m working on an app to integration builds and deployment data, and I’m using a combination of a data-provider and a trigger to load all the data.

The data-provider is triggered when a specific url is added to a component.
This will in turn adds the external source but doesn’t backfill any data.

My app also has a trigger that listens on all component link events from Compass. This event is received and when processed it will send multiple build events to Compass.
All the vents are accepted and processed by the the app and Compass through a webtrigger.
No errors are thrown at any point within the process cycle.

However, after this process end I would expect multiple build event to be shown in the component activity view in Compass. But only the last event is shown. It doesn’t matter how many events I send, or how I batch them.

First, the Forge Remote app sends a bundle of 10 events to the Compass webtrigger module, these then sends them to Compass using await graphqlGateway.compass.asApp().createEvent(eventPayload);
I have tried it with a single event in the payload, as well is up to 10 events as the API seems to support array inputs.

I have verified that the build events all have unique timestamps, sequence numbers and other elements that make it unique.

Why am I only seeing single events in Compass??

1 Like

@markrekveld,

I think the Compass events have the same underlying engine as Jira Software; hence, I think it might have some of the same quirks, like returning 2XX statuses that contain error messages.

It might help to post an example payload you’re sending because the events don’t seem to be well documented for Compass. Maybe you’re supposed to refer to the JSW docs? In which case, each builds & deployments have different “keys” for making sure each event is unique. If your client only updates the sequence number, then that might explain the “overwriting” of events.

1 Like

Hi @ibuchanan

I’m using the same sendEvent code that I found in the Gitlab example, here that includes error handling

The batches below are received by a custom webtrigger. This web trigger maps the incoming CompassEventInput list to CompassCreateEventInput by adding the cloudId.

And I’m sending these 3 batches:

{
  "events": [
    {
      "build": {
        "buildProperties": {
          "completedAt": "2023-10-30T15:42:26.577Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2023-10-30T15:42:26.185Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #2",
        "displayName": "feature - TES-1 #2",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2023-10-30T15:42:26.185Z",
        "updateSequenceNumber": 1698680546185,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/2/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2023-11-02T14:25:38.392Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2023-11-02T14:25:37.692Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #3",
        "displayName": "feature - TES-1 #3",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2023-11-02T14:25:37.692Z",
        "updateSequenceNumber": 1698935137692,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/3/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2023-10-30T15:41:00.71Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2023-10-30T15:41:00.246Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #1",
        "displayName": "feature - TES-1 #1",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2023-10-30T15:41:00.246Z",
        "updateSequenceNumber": 1698680460246,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/1/"
      }
    }
  ]
}
{
  "events": [
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-01-29T19:06:49.361Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-01-29T19:06:48.863Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #8",
        "displayName": "feature - TES-1 #8",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-01-29T19:06:48.863Z",
        "updateSequenceNumber": 1706555208863,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/8/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-06-19T07:28:13.854Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-06-19T07:28:13.61Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #11",
        "displayName": "feature - TES-1 #11",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-06-19T07:28:13.61Z",
        "updateSequenceNumber": 1718782093610,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/11/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-06-18T22:29:24.911Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-06-18T22:29:24.722Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #10",
        "displayName": "feature - TES-1 #10",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-06-18T22:29:24.722Z",
        "updateSequenceNumber": 1718749764722,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/10/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-06-19T17:43:34.266Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-06-19T17:43:34.081Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #12",
        "displayName": "feature - TES-1 #12",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-06-19T17:43:34.081Z",
        "updateSequenceNumber": 1718819014081,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/12/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2023-11-02T14:27:35.821Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2023-11-02T14:27:35.24Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #4",
        "displayName": "feature - TES-1 #4",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2023-11-02T14:27:35.24Z",
        "updateSequenceNumber": 1698935255240,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/4/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-01-17T13:14:43.813Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-01-17T13:14:43.246Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #7",
        "displayName": "feature - TES-1 #7",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-01-17T13:14:43.246Z",
        "updateSequenceNumber": 1705497283246,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/7/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-01-16T09:03:08.226Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-01-16T09:03:07.399Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #5",
        "displayName": "feature - TES-1 #5",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-01-16T09:03:07.399Z",
        "updateSequenceNumber": 1705395787399,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/5/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-01-16T09:09:31.615Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-01-16T09:09:31.202Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #6",
        "displayName": "feature - TES-1 #6",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-01-16T09:09:31.202Z",
        "updateSequenceNumber": 1705396171202,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/6/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-06-18T20:45:15.846Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-06-18T20:45:15.135Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #9",
        "displayName": "feature - TES-1 #9",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-06-18T20:45:15.135Z",
        "updateSequenceNumber": 1718743515135,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/9/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-06-19T19:19:20.627Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-06-19T19:19:20.521Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #13",
        "displayName": "feature - TES-1 #13",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-06-19T19:19:20.521Z",
        "updateSequenceNumber": 1718824760521,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/13/"
      }
    }
  ]
}
{
  "events": [
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-06-26T20:34:53.242Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-06-26T20:34:52.926Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #20",
        "displayName": "feature - TES-1 #20",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-06-26T20:34:52.926Z",
        "updateSequenceNumber": 1719434092926,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/20/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-06-26T17:41:27.131Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-06-26T17:41:26.85Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #15",
        "displayName": "feature - TES-1 #15",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-06-26T17:41:26.85Z",
        "updateSequenceNumber": 1719423686850,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/15/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-06-26T17:46:13.817Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-06-26T17:46:13.53Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #16",
        "displayName": "feature - TES-1 #16",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-06-26T17:46:13.53Z",
        "updateSequenceNumber": 1719423973530,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/16/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-06-26T20:15:20.341Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-06-26T20:15:19.986Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #19",
        "displayName": "feature - TES-1 #19",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-06-26T20:15:19.986Z",
        "updateSequenceNumber": 1719432919986,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/19/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-06-27T13:50:08.226Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-06-27T13:50:07.933Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #23",
        "displayName": "feature - TES-1 #23",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-06-27T13:50:07.933Z",
        "updateSequenceNumber": 1719496207933,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/23/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-06-26T17:56:09.628Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-06-26T17:56:09.345Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #18",
        "displayName": "feature - TES-1 #18",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-06-26T17:56:09.345Z",
        "updateSequenceNumber": 1719424569345,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/18/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-06-26T21:05:08.03Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-06-26T21:05:07.749Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #22",
        "displayName": "feature - TES-1 #22",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-06-26T21:05:07.749Z",
        "updateSequenceNumber": 1719435907749,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/22/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-06-26T20:38:41.337Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-06-26T20:38:41.052Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #21",
        "displayName": "feature - TES-1 #21",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-06-26T20:38:41.052Z",
        "updateSequenceNumber": 1719434321052,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/21/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-06-26T17:31:32.185Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-06-26T17:31:31.666Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #14",
        "displayName": "feature - TES-1 #14",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-06-26T17:31:31.666Z",
        "updateSequenceNumber": 1719423091666,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/14/"
      }
    },
    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-06-26T17:47:34.348Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-06-26T17:47:34.008Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #17",
        "displayName": "feature - TES-1 #17",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-06-26T17:47:34.008Z",
        "updateSequenceNumber": 1719424054008,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/17/"
      }
    }
  ]
}

But only

    {
      "build": {
        "buildProperties": {
          "completedAt": "2024-06-27T13:50:08.226Z",
          "pipeline": {
            "displayName": "feature - TES-1",
            "pipelineId": "6b94d163181c486588f8d890782bbaab",
            "url": "http://localhost:8081/job/feature%20-%20TES-1/"
          },
          "startedAt": "2024-06-27T13:50:07.933Z",
          "state": "SUCCESSFUL"
        },
        "description": "feature - TES-1 #23",
        "displayName": "feature - TES-1 #23",
        "externalEventSourceId": "6b94d163181c486588f8d890782bbaab",
        "lastUpdated": "2024-06-27T13:50:07.933Z",
        "updateSequenceNumber": 1719496207933,
        "url": "http://localhost:8081/job/feature%20-%20TES-1/23/"
      }
    }

Shows up in Compass.

I think the Compass events have the same underlying engine as Jira Software

Jira software only shows the last build, could this mean that this is also the case for Compass?

Just did a test with deployments and the result also in not as expected
When I send this batch:

{
  "events": [
    {
      "deployment": {
        "deploymentProperties": {
          "completedAt": "2024-01-16T09:11:58.89Z",
          "environment": {
            "category": "PRODUCTION",
            "displayName": "production",
            "environmentId": "production"
          },
          "pipeline": {
            "displayName": "TES-1",
            "pipelineId": "b3be1578c9864deb83478e81b27157b1",
            "url": "http://localhost:8081/job/TES-1/"
          },
          "sequenceNumber": 7,
          "startedAt": "2024-01-16T09:11:58.545Z",
          "state": "SUCCESSFUL"
        },
        "description": "TES-1 #7",
        "displayName": "TES-1 #7",
        "externalEventSourceId": "b3be1578c9864deb83478e81b27157b1",
        "lastUpdated": "2024-01-16T09:11:58.545Z",
        "updateSequenceNumber": 1705396318545,
        "url": "http://localhost:8081/job/TES-1/7/"
      }
    },
    {
      "deployment": {
        "deploymentProperties": {
          "completedAt": "2024-01-19T13:37:25.868Z",
          "environment": {
            "category": "PRODUCTION",
            "displayName": "production",
            "environmentId": "production"
          },
          "pipeline": {
            "displayName": "TES-1",
            "pipelineId": "b3be1578c9864deb83478e81b27157b1",
            "url": "http://localhost:8081/job/TES-1/"
          },
          "sequenceNumber": 9,
          "startedAt": "2024-01-19T13:37:25.546Z",
          "state": "SUCCESSFUL"
        },
        "description": "TES-1 #9",
        "displayName": "TES-1 #9",
        "externalEventSourceId": "b3be1578c9864deb83478e81b27157b1",
        "lastUpdated": "2024-01-19T13:37:25.546Z",
        "updateSequenceNumber": 1705671445546,
        "url": "http://localhost:8081/job/TES-1/9/"
      }
    },
    {
      "deployment": {
        "deploymentProperties": {
          "completedAt": "2024-01-19T13:35:25.22Z",
          "environment": {
            "category": "PRODUCTION",
            "displayName": "production",
            "environmentId": "production"
          },
          "pipeline": {
            "displayName": "TES-1",
            "pipelineId": "b3be1578c9864deb83478e81b27157b1",
            "url": "http://localhost:8081/job/TES-1/"
          },
          "sequenceNumber": 8,
          "startedAt": "2024-01-19T13:35:24.636Z",
          "state": "SUCCESSFUL"
        },
        "description": "TES-1 #8",
        "displayName": "TES-1 #8",
        "externalEventSourceId": "b3be1578c9864deb83478e81b27157b1",
        "lastUpdated": "2024-01-19T13:35:24.636Z",
        "updateSequenceNumber": 1705671324636,
        "url": "http://localhost:8081/job/TES-1/8/"
      }
    },
    {
      "deployment": {
        "deploymentProperties": {
          "completedAt": "2024-01-19T13:49:19.992Z",
          "environment": {
            "category": "PRODUCTION",
            "displayName": "production",
            "environmentId": "production"
          },
          "pipeline": {
            "displayName": "TES-1",
            "pipelineId": "b3be1578c9864deb83478e81b27157b1",
            "url": "http://localhost:8081/job/TES-1/"
          },
          "sequenceNumber": 11,
          "startedAt": "2024-01-19T13:49:19.665Z",
          "state": "SUCCESSFUL"
        },
        "description": "TES-1 #11",
        "displayName": "TES-1 #11",
        "externalEventSourceId": "b3be1578c9864deb83478e81b27157b1",
        "lastUpdated": "2024-01-19T13:49:19.665Z",
        "updateSequenceNumber": 1705672159665,
        "url": "http://localhost:8081/job/TES-1/11/"
      }
    },
    {
      "deployment": {
        "deploymentProperties": {
          "completedAt": "2024-01-19T13:43:08.722Z",
          "environment": {
            "category": "PRODUCTION",
            "displayName": "production",
            "environmentId": "production"
          },
          "pipeline": {
            "displayName": "TES-1",
            "pipelineId": "b3be1578c9864deb83478e81b27157b1",
            "url": "http://localhost:8081/job/TES-1/"
          },
          "sequenceNumber": 10,
          "startedAt": "2024-01-19T13:43:08.234Z",
          "state": "SUCCESSFUL"
        },
        "description": "TES-1 #10",
        "displayName": "TES-1 #10",
        "externalEventSourceId": "b3be1578c9864deb83478e81b27157b1",
        "lastUpdated": "2024-01-19T13:43:08.234Z",
        "updateSequenceNumber": 1705671788234,
        "url": "http://localhost:8081/job/TES-1/10/"
      }
    }
  ]
}

Only Deployment #7 and #8 are shown in Compass, #9, #10 and #11 are not shown. Also no errors.

If the implementation was like Jira Software then I would have expected only the latest build and all the deployments to show. But this seems to be only the latest build and some selective deployments.

1 Like

@markrekveld,

Thanks for providing the details. I’m not sure what’s going on. But those details should help a Compass expert better understand the problem.

What I do know is that in JSW, the events are correlated to their pipelineId and to a build or deployment number. I didn’t see buildNumber or deploymentSequenceNumber in your examples and, for JSW, those would be required fields that cause an error when not provided. Without both numbers (pipeline & execution), I don’t know how Compass could understand the unique identity of builds/deployments within a pipeline. Perhaps the GitLab code is in error?

I’ll try to prompt a Compass person to have a look.

1 Like

What I do know is that in JSW, the events are correlated to their pipelineId and to a build or deployment number. I didn’t see buildNumber or deploymentSequenceNumber in your examples and, for JSW, those would be required fields that cause an error when not provided. Without both numbers (pipeline & execution), I don’t know how Compass could understand the unique identity of builds/deployments within a pipeline. Perhaps the GitLab code is in error?

I was also expecting a number of sequence number for builds and deployments, but the build event object has no such element, see CompassCreateBuildEventInput it does have a updateSequenceNumber number, which is in the correct order for the build events I send (I’m using the build timestamp.
The deployment event object has a sequenceNumber that I do set, see CompassCreateDeploymentEventPropertiesInput. Like the build event, the deployment event also has an updateSequenceNumber element, see CompassCreateDeploymentEventInput.

I’ll try to prompt a Compass person to have a look.

Thanks I’m having some difficulty connecting with Compass people I have met in the past.

1 Like

Lending a hand to troubleshoot this situation. In Compass, when only the last event sent is displayed, it’s typically caused because Compass identifies the information that was just sent as an update to an existing event.

Different event types have different conditions to determine whether the event was updated, or a new event was created.

The system will interpret BUILD events as the same if this value matches between events: buildPipeline.pipelineId. In that case a new event won’t be created, but an existing one would be updated.

For DEPLOYMENT events, the values checked for equality are pipeline.id, environment.id, deploymentSequenceNumber.

1 Like

Hi @EnriqueSerranoValle

Thanks for confirming that builds are handled the same way.

As for the deployments, for Compass there is no deploymentSequenceNumber field in the event input object. There is a sequenceNumber field in the deploymentProperties field of the event input. See the links to the event object im my previous post.

Assuming the uniqueness is checked by looking at the deploymentProperties.pipeline.pipelineId, deploymentProperties.environment.environmentId and deploymentProperties.sequenceNumber, then I would still expect to see 5 deployments in Compass, but I only see the first 2 and not the last 3, which each of the deployments are unique.

Is there something else I need to be looking at?

@markrekveld you’re correct - whether a deployment event is considered an existing one or a new one would be determined based on a match on deploymentProperties.pipeline.pipelineId , deploymentProperties.environment.environmentId and deploymentProperties.sequenceNumber. If there’s no existing event matching the values of these three provided for the given workspace and event source, this should result in the insertion of a new event, as long as the top-level provided updateSequenceNumber is higher than the one found in the matching entry (otherwise, the update is ignored).

I see that in your latest test every single deployment event has a different deploymentProperties.sequenceNumber so I would have also expected to find a new entry per every one of those events (unless there were already something in the database with a matching combination of those 3 provided properties that constitute the unique event key). Have we discarded that case too already?

1 Like

(unless there were already something in the database with a matching combination of those 3 provided properties that constitute the unique event key). Have we discarded that case too already?

Well there shouldn’t be any build or deployment events. As I’m currently building and testing the app I have created, deleted and recreated the event source a couple of time to get all the triggering and data processing to work as expected.
I would assume that deleting an event source from a component would delete all the events associated with that source and thus would allow to “resubmit” the events if the source is added again. This works for 2 of the 5 deployments.

Currently this batch submission of builds and deployments is done after my remote receives a component link event from Compass. This because accessing the remote within the data-provider is not support, I have this post for that.

Can it be that this strange selective behaviour is related to the way the events are backfilled by my app?

Any thoughts @EnriqueSerranoValle

@markrekveld I checked the event backfilling logic that we have in place, and truth is I couldn’t find an interaction between the events that you’re submitting and the backfilled events that would explain that aggregation. There are a couple of additional tests we can run, but we haven’t found the root cause here yet.

@EnriqueSerranoValle can it be that there may be a delay between sending events to Compass and Compass showing them? I just checked again, and the icon of one build in the UI looked a bit bigger then the other and found by using the inspector that the other deployments where added.
So now all the deployments I was expecting are listed in the activity view in Compass.

1 Like

Hi @markrekveld, thanks for updating us on that.

Glad to hear that the events are showing up now!

There are definitely some issues with how the activity feed displays events that occurred at very similar times. We are planning to make some improvements to that UI soon, so hopefully that helps in the future.

3 Likes

Thanks @RyanHornik I’m looking forward to the UI improvements