Skip to content
Latchkey

Backstage catalog "Duplicate entity" / conflict in CI

An entity is uniquely identified by kind, namespace, and name. When two catalog-info.yaml files declare the same triple, Backstage reports a conflict and keeps only one, flagging the duplicate.

What this error means

The catalog reports "Conflicting entityRef component:default/example-service, ..." or a duplicate-entity error naming the two locations that collide.

backstage
Conflicting entityRef component:default/example-service found in
locations https://.../a/catalog-info.yaml and https://.../b/catalog-info.yaml

Common causes

The same name defined in two files

Two repositories or paths declare a Component with the identical name and namespace, so they collide.

A location registered twice

The same catalog-info.yaml is registered under two location URLs, producing the same entity twice.

How to fix it

Give each entity a unique name

  1. Rename one of the conflicting entities so kind/namespace/name is unique.
  2. Or move it to a distinct namespace.
  3. Re-run so the conflict clears.
catalog-info.yaml
metadata:
  name: example-service-frontend
  namespace: default

Deduplicate the registered locations

Remove the duplicate location registration so the entity is discovered from a single source.

app-config.yaml
catalog:
  locations:
    - type: url
      target: https://github.com/acme/repo/blob/main/catalog-info.yaml

How to prevent it

  • Use unique names or namespaces per entity.
  • Register each catalog-info.yaml from one location only.
  • Validate for duplicate refs in CI before merge.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →