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.yamlCommon 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
- Rename one of the conflicting entities so kind/namespace/name is unique.
- Or move it to a distinct namespace.
- Re-run so the conflict clears.
catalog-info.yaml
metadata:
name: example-service-frontend
namespace: defaultDeduplicate 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.yamlHow 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
Backstage catalog "InputError: entity is invalid" in CIFix Backstage catalog "InputError: Malformed envelope, ..." / entity invalid in CI - a catalog-info.yaml is m…
Backstage catalog "Unable to read url ... 404" in CIFix Backstage catalog "Unable to read url ... 404 Not Found" in CI - a component location points at a catalog…
Backstage scaffolder "action ... not found" template failure in CIFix Backstage scaffolder "Template action ... is not registered" in CI - a software template references a sca…