Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

compass.yaml Links are being duplicated

DarrenDooley April 23, 2025

Hello,

 

I am encountering a duplication issue when adding Links to compass.yaml files. Whenever a new Link is added to my compass.yaml file, the Link is duplicated in the web UI.

 

If I then make any subsequent update to my compass.yaml, such as adding a label, I encounter the following error:

Last compass.yml sync failed

The most recent compass.yml had errors:

  • Component link with ID [c7a60cab-2a80-48c8-9a55-495f61745e4b] does not exist

 

compass.yaml file

---

name: 'compass-example'
id: 'ari:cloud:compass:1fcf6700-7bce-485a-ab73-3920bf429bdb:component/35d68507-9427-4945-9269-48da84743027/1c448be0-6a60-454f-95ca-7b0a44cd547c'
description: ''
configVersion: 1
typeId: 'SERVICE'
ownerId: null
fields:
  isMonorepoProject: false
  lifecycle: 'Active'
  tier: 4
links:
- name: Slack Channels
  type: CHAT_CHANNEL
- name: Newrelic
  type: DASHBOARD
relationships: {}
labels:
  - 'env:production'
  - 'env:staging'
  - 'env:uat'
customFields:
  - name: 'Has NewRelic Dashboard'
     type: 'single_select'
     displayValue: yes

 

Duplicate Link in the compass_component_getComponentDetails API Response:

---

"links": [
{
  "id": "6010c693-b12d-4236-a9d7-45b05ce00cb2",
  "name": null,
  "url": "https://github.com/...",
  "type": "REPOSITORY",
  "eventSources": ["REDACTED"],
  "__typename": "CompassLink"
},
 {
  "id": "f4271d58-79fa-437f-b279-32e653550f25",
  "name": "Slack Channels",
  "type": "CHAT_CHANNEL",
  "eventSources": [],
  "__typename": "CompassLink"
},
{
  "id": "71d6d40f-1f1b-4667-a8a1-60a0bfa61c1d",
  "name": "Newrelic",
  "type": "DASHBOARD",
  "eventSources": [],
  "__typename": "CompassLink"
},
{
  "id": "88b3d33f-930b-489a-8f29-5d2ba063c7ad",
  "name": "Newrelic",
  "type": "DASHBOARD",
  "eventSources": [],
  "__typename": "CompassLink"
}
]

Screenshot: Duplicated Link in Web UI
duplicate-links.png
Screenshot: Error encountered on the subsequent update after the duplication bugupdate-error.png
Screenshot: compass.yaml file
compass-yaml.png

 

1 answer

0 votes
Enrique Serrano Valle
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 24, 2025

Hi, @DarrenDooley ! Thank you for reaching out.

Not sure yet what could have caused a duplicated link and the original synchronization error for the provided component, but a workaround for these situations could be a fresh re-sync with the config-as-code Compass configuration as generated by the application, which would consist of the following steps:

  1. Delete the related config-as-code (compass.yml) file that this component is linking to from the last sync results in the `.../config-as-code` URL
  2. Check the `/config-as-code` section in your component
    1. It should now provide a fresh config-as-code in a format that would ensure proper synchronization
  3. Push a new update using the generated compass.yml file.

Looking at the logs, it looks like the most recent sync errors are due to custom fields where the option display value is sent instead of the ID? However, something like:

customFields:
- name: 'Has NewRelic Dashboard'
type: 'single_select'
displayValue: yes

Would seem okay to me.

In any case, let me know whether the generated file differs from your original configuration, and whether the fresh resync fixes it!

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

Quick update on this one @DarrenDooley : our team has been able to reproduce a similar condition that, under certain situations, results in the creation of duplicated links when handling a component via config-as-code. Our engineers are working on a resolution. We'll keep you posted about how this progresses!

Like DarrenDooley likes this
DarrenDooley April 24, 2025

Hey @Enrique Serrano Valle thank you for your response.

I am able to recreate this very consistently and a fresh resync of my config-as-code does not seem to resolve.


Here are the steps I performed:

1. I deleted my compass.yaml file and pushed an update to my main branch.

2. I deleted all links on my component except my repository to start fresh.

3. I copied the compass.yaml file from the config-as-code section in my component.

The Links snippet was as follows:

links:
- name: null
type: REPOSITORY
url: 'https://github.com/my-org/compass-example'

4. I pushed a new update using this fresh compass.yaml file and my compass synced correctly.

5. I added one DASHBOARD Link to my compass.yaml file:

links:
- name: null
type: REPOSITORY
url: 'https://github.com/my-org/compass-example'
- name: NewRelic
type: DASHBOARD
url: 'https://example.com/newrelic'

6. I pushed a new update and again observed duplicate links:

Screenshot 2025-04-24 at 17.37.24.png

7. I deleted my compass.yaml file again and went to the config-as-code section in my component and there were duplicate links there too:

links:
  - name: null
    type: REPOSITORY
    url: 'https://github.com/my-org/compass-example'
  - name: NewRelic
    type: DASHBOARD
    url: 'https://example.com/newrelic'
  - name: NewRelic
    type: DASHBOARD
    url: 'https://example.com/newrelic' 

 

DarrenDooley April 24, 2025

@Enrique Serrano Valle Great! thanks for looking into it.

April G
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 24, 2025

Hi @DarrenDooley , after looking into this, I think this behavior is being caused by 2 Push event webhooks being received almost simultaneously. Would you be able to check your Organization and Repository webhooks in GitHub to see if there is some kind of duplication happening there? 

Please also feel free to open a Support case and reference this conversation to share any information privately. 

Like DarrenDooley likes this
DarrenDooley April 25, 2025

Hi @April G looks like that did the trick! We had two Atlassian webhooks configured in Github . Removing one of them fixed the problem. Thank you.

Like April G likes this
April G
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 25, 2025

@DarrenDooley that's great! Can we ask whether the duplicate webhook was manually created by someone on your team to test something? We're trying to determine whether the GitHub app may have an edge case where it could create 2 webhooks. Thanks! 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events