Uploaded image for project: 'Red Hat Internal Developer Platform'
  1. Red Hat Internal Developer Platform
  2. RHIDP-3711

[QE] Verify catalog errors are surfaced in logs

Prepare for Y ReleasePrepare for Z ReleaseRemove QuarterXMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Normal Normal
    • 1.3
    • None
    • Quality, Serviceability
    • None
    • RHDH Core Team 3261

      1. Enable the catalog backend module logs dynamic plugin
        - package: ./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-logs-dynamic
          disabled: false
      1. 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).
      2. 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.
      3. 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 
      1. 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"}

            rh-ee-frkong Frank Kong (Inactive)
            rh-ee-frkong Frank Kong (Inactive)
            RHIDP - Core Platform
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: