Backstage catalog "InputError: entity is invalid" in CI
Backstage validates every entity against its schema. A catalog-info.yaml that omits apiVersion, kind, or metadata.name, or has the wrong shape, is rejected with an InputError during processing.
What this error means
A catalog validation step fails with "InputError: Malformed envelope, ..." or "the entity ... is invalid" pointing at a missing required field.
backstage
InputError: Malformed envelope, /metadata/name is a required field
at CatalogProcessingEngine ...
# catalog-info.yaml has no metadata.nameCommon causes
A required field is missing
apiVersion, kind, or metadata.name is absent, so the entity fails schema validation.
The wrong shape or an invalid value
A field has the wrong type, or metadata.name uses characters the schema does not allow.
How to fix it
Add the required envelope fields
- Ensure apiVersion, kind, and metadata.name are present.
- Use a valid name (lowercase, no spaces, allowed characters).
- Re-run validation.
catalog-info.yaml
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: example-service
spec:
type: service
owner: team-a
lifecycle: productionValidate entities in CI before merge
Run the backstage-cli validation so malformed entities fail on the pull request, not in production.
Terminal
yarn backstage-cli repo lint
npx @backstage/cli validate-entity catalog-info.yamlHow to prevent it
- Keep apiVersion, kind, and metadata.name in every entity.
- Use valid name characters and lowercase.
- Validate catalog-info.yaml in CI on every change.
Related guides
Backstage catalog "Duplicate entity" / conflict in CIFix Backstage catalog "Conflicting entityRef" / duplicate entity in CI - two locations define the same kind,…
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 catalog "Placeholder ... could not be resolved" in CIFix Backstage catalog "Placeholder $text/$json/$yaml could not be resolved" in CI - a catalog-info.yaml place…