Handle empty YAML documents

One of our users just run into this. Kubernetes has the same behavior and doesn't complain about an empty document.
This commit is contained in:
Oliver Sand
2020-11-26 17:30:10 +01:00
parent f76626c1c4
commit 1ec19a3f4a
3 changed files with 56 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
---
'@backstage/plugin-catalog-backend': patch
---
Ignore empty YAML documents. Having a YAML file like this is now ingested without an error:
```yaml
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: web
spec:
type: website
---
```
This behaves now the same way as Kubernetes handles multiple documents in a single YAML file.