-
Task
-
Resolution: Done
-
Normal
-
None
-
None
- Enable the catalog backend module logs dynamic plugin
- package: ./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-logs-dynamic disabled: false
- Introduce a catalog processing error such as ingesting a `catalog-info.yaml` containing an illegal entity name such as `test entity` (the space is necessary).
- You may need to introduce it via the file ingestion, directly creating a location with the backend API or adding it via a software template since the UI ingestion will do a validation check which will catch this error and prevent it from being ingested.
- For example, query the backend api with:
curl -X POST -ks -H "$AUTH" -H "Content-Type: application/json" --data '{"type": "url", "target":"<url-to-entity>"}' <RHDH-backend-url>/api/catalog/locations
- Verify that it throws a `warn` log in the logs containing something similar to:
{"entity":"component:default/test entity","level":"warn","location":"url:https://github.com/Zaperex-Test-Org/test-repo-3/tree/main/components/broken.yaml","message":"Policy check failed for component:default/test entity; caused by Error: \"metadata.name\" is not valid; expected a string that is sequences of [a-zA-Z0-9] separated by any of [-_.], at most 63 characters in total but found \"test entity\". To learn more about catalog file format, visit: https://github.com/backstage/backstage/blob/master/docs/architecture-decisions/adr002-default-catalog-file-format.md","plugin":"catalog","service":"backstage","timestamp":"2024-08-26 15:29:46"}