-
Bug
-
Resolution: Done
-
Undefined
-
None
-
1.3
-
None
Description of problem:
I was trying to mimic a user who wants to tune theirĀ catalog-info.yaml file in the import PR by adding multiple Components to it. They edited the file outside of RHDH, but right from GitHub.
After doing this, the import details can no longer be seen/edited from the Bulk Import page.
Prerequisites (if any, like setup, operators/versions):
-
Steps to Reproduce
- Use the bulk import to create an import PR for a given repo
- Make sure the import status is "Waiting for approval", meaning there is a PR open for it
- Once the import PR is created, navigate to the PR page on GitHub
- On GH, edit the catalog-info.yaml in the PR and add a YAML multi-doc separator, e.g.:
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: flutter
annotations:
github.com/project-slug: lemra-org-ent-2/flutter
spec:
type: other
lifecycle: unknown
owner: user:default/rm3l
---
- Go back to the Bulk Import listing page on RHDH
- Next to the repo, click on the "Edit" icon
=> You should see the YAML error
Actual results:
Expected results:
Maybe handle this error gracefully? Do not crash if there is a YAML parsing error, or if the number of documents is unexpected..
Reproducibility (Always/Intermittent/Only Once):
Always
Build Details:
RHDH Version: 1.4.0
Backstage Version: 1.29.2
Last Commit: janus-idp/backstage-showcase/pull/1581 @ b7fc2d6
Build Time: 2024-09-11T11:26:31Z
Additional info (Such as Logs, Screenshots, etc):
Screencast attached.Screencast from 2024-09-11 14-00-27.mp4
Stacktrace:
YAMLException: expected a single document in the stream, but found more at Object.Re [as load] (https://backstage-my-rhdh-my-ns.apps.rosa.oi2pg-ijxw5-mzw.308j.p3.openshiftapps.com/api/scalprum/janus-idp.backstage-plugin-bulk-import/static/2101.0466438e.chunk.js:2:198098) at Re (https://backstage-my-rhdh-my-ns.apps.rosa.oi2pg-ijxw5-mzw.308j.p3.openshiftapps.com/api/scalprum/janus-idp.backstage-plugin-bulk-import/static/1502.9e04b2dc.chunk.js:1:19712) at Ri (https://backstage-my-rhdh-my-ns.apps.rosa.oi2pg-ijxw5-mzw.308j.p3.openshiftapps.com/static/3144.8649d27c.chunk.js:14:16975) at ua (https://backstage-my-rhdh-my-ns.apps.rosa.oi2pg-ijxw5-mzw.308j.p3.openshiftapps.com/static/3144.8649d27c.chunk.js:16:43763) at ta (https://backstage-my-rhdh-my-ns.apps.rosa.oi2pg-ijxw5-mzw.308j.p3.openshiftapps.com/static/3144.8649d27c.chunk.js:16:39558) at Zc (https://backstage-my-rhdh-my-ns.apps.rosa.oi2pg-ijxw5-mzw.308j.p3.openshiftapps.com/static/3144.8649d27c.chunk.js:16:39489) at ml (https://backstage-my-rhdh-my-ns.apps.rosa.oi2pg-ijxw5-mzw.308j.p3.openshiftapps.com/static/3144.8649d27c.chunk.js:16:39348) at iu (https://backstage-my-rhdh-my-ns.apps.rosa.oi2pg-ijxw5-mzw.308j.p3.openshiftapps.com/static/3144.8649d27c.chunk.js:16:35766) at bs (https://backstage-my-rhdh-my-ns.apps.rosa.oi2pg-ijxw5-mzw.308j.p3.openshiftapps.com/static/3144.8649d27c.chunk.js:16:36567) at hn (https://backstage-my-rhdh-my-ns.apps.rosa.oi2pg-ijxw5-mzw.308j.p3.openshiftapps.com/static/3144.8649d27c.chunk.js:14:3267)