ATTACHED_EVENT_SOURCE_LIMIT_REACHED

Phill Pafford
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 11, 2025

Why am I seeing this? and how does one fix this?

 

{ "errors": [ { "type": "ATTACHED_EVENT_SOURCE_LIMIT_REACHED", "message": "This component has too many event sources attached to it. Delete one or more event sources from this component before attaching a new one." } ] }

 

 

1 answer

1 accepted

2 votes
Answer accepted
Enrique Serrano Valle
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 11, 2025

Hi, @Phill Pafford !

Compass currently has a limit of 20 event sources per component.

There are multiple ways that you could end with a Compass component with multiple event sources created. Some tools and flows create and attach them for you. There's more information about event sources in https://developer.atlassian.com/cloud/compass/components/send-events-using-rest-api-with-event-sources/

I believe you can remove those repository links whose events you wouldn't need to see could free up slots for other event sources. But there are also GraphQL queries that you can use to target and delete specific event sources manually added:

mutation DeleteEventSourceMutation {
compass {
deleteEventSource(
input: {
cloudId: "",
externalEventSourceId: "",
eventType: DEPLOYMENT
}
) {
success
}
}
}
Phill Pafford
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 11, 2025

@Enrique Serrano Valle to my understanding this was just an identifier and was not aware of limits. I'm using the branch name as identifier on the build, what would you recommend? 

"externalEventSourceId": "feature/abc-123",

example

{

"cloudId": "f3f3f3f-1234-5432-6543-dddddkdkdkdk",

"event": {

"build": {

"displayName": "BUILD: ACME - Applications - my-app - feature-abc-123",

"lastUpdated": "2025-02-06T23:36:10Z",

"updateSequenceNumber": "1",

"description": "ACME - Applications - my-app - feature-abc-123",

"url": "https://bamboo.ACME.com/browse/ACME-PROJ123-JOB1-1",

"externalEventSourceId": "feature/abc-123",

"buildProperties": {

"state": "FAILED",

"startedAt": "2025-02-06T23:35:17.678Z",

"pipeline": {

"pipelineId": "1"

}

}

}

},

"componentId": "ari:cloud:compass:f3f3f3f-1234-5432-6543-dddddkdkdkdk:component/aaabbb444-h4h4-4112-b44e-4d6c748b84bc/849b19c0-edb3-486c-9dd5-sdfhhwef8348"
}

 

Phill Pafford
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 11, 2025

@Enrique Serrano Valle the example here also used the branch name 

https://developer.atlassian.com/cloud/compass/components/send-events-from-bamboo/

EXTERNAL_ID=${bamboo.planRepository.branchDisplayName}

 

Enrique Serrano Valle
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 11, 2025

@Phill Pafford that's good feedback; Compass might do this a bit differently. Here's a Compass-dedicated example that has useful guidance about external IDs for event sources.

With an event source being a funnel for events of a given type (e.g.: deployments) that apply to (at least) one component, the external ID is typically something that unequivocally identifies the event provider. Typical examples:

  • The repository UUID - so that all events (of each type) coming from that repository can use an event source (per event type), no matter the originating branch.
    • The normalized repository branch can be a legitimate human-readable fallback for external ID. (However this can lead to event source duplication if the same repository were written with slightly different URLs as different external IDs, but in practice, this is rarely a problem.)
  • The CI/CD job name that sends events for the related component(s)
  • etc.

I hope that helps clarify the recommended external event source ID approach for Compass. This way, you won't need so many different event sources to track all your component activity.

Like Steffen Opel _Utoolity_ likes this
Phill Pafford
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2025

@Enrique Serrano Valle is there a rest api call to get all the external ids so I can determine which ones to delete? and can I delete using the rest api?

Phill Pafford
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2025

trying graphql in a bash script and it's not working, keep getting 

 

{"code":401,"message":"Unauthorized"}

 

changing to use the rest api url, I get a 404, which is fine as it shows auth works

 

https://developer.atlassian.com/cloud/compass/graphql/#overview

 

 

example script

 

#!/usr/bin/env bash

set -e

COMPASS_CLOUD_INSTANCE=acme

COMPASS_USER_TOKEN=very.long.token.from.manage-profile.security.link.above


TEST="GRAPHQL AUTH TEST"
echo "START TEST: $TEST"

COMPASS_BASE_URL="https://$COMPASS_CLOUD_INSTANCE.atlassian.net/gateway/api/graphql"
echo "COMPASS_BASE_URL: $COMPASS_BASE_URL"

curl -H "Authorization: Bearer $COMPASS_USER_TOKEN" "$COMPASS_BASE_URL"

echo "END TEST: $TEST"
echo ""


TEST="REST API AUTH TEST"
echo "START TEST: $TEST"

COMPASS_BASE_URL="https://$COMPASS_CLOUD_INSTANCE.atlassian.net/gateway/api/compass"
echo "COMPASS_BASE_URL: $COMPASS_BASE_URL"

curl -H "Authorization: Bearer $COMPASS_USER_TOKEN" "$COMPASS_BASE_URL"

echo "END TEST: $TEST"
echo ""

#

 

Phill Pafford
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 12, 2025
Enrique Serrano Valle
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 12, 2025

@Phill Pafford I added an answer to your other thread too, but you're right that there's an operation to delete event sources that were manually added available in the GraphQL API.

Not sure about the 401 - I followed essentially your same steps with my username and token for that site and auth worked properly. (You'd need to be an admin to manage event sources, but that would have been a 403 if it were a matter of permissions and not of credentials.) I didn't have to Base64-encode anything there:

-u "yourUsernameEmail:your-long-api-key" 

There's also a GraphQL query to retrieve the event sources for a given component:

query QueryComponentEventSources {
compass {
component(id: "ari:cloud:compass:...") {
... on CompassComponent {
id
name
eventSources {
externalEventSourceId
id
eventType
}
}
}
}
}

Let me know if that helps!

Like Steffen Opel _Utoolity_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events