Skip to content

Commit 3a5ec19

Browse files
[v0.17.x] internal/generate/olm-catalog: read only one manifest at a time (#3043)
1 parent 1f6c7ad commit 3a5ec19

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# entries is a list of entries to include in
2+
# release notes and/or the migration guide
3+
entries:
4+
- description: >
5+
CSV manifests read from disk are now properly marshaled into the CSV struct
6+
7+
kind: "bugfix"
8+
9+
breaking: false

internal/generate/olm-catalog/csv_util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func getCSVFromDir(dir string) (*olmapiv1alpha1.ClusterServiceVersion, error) {
114114
}
115115
if typeMeta.Kind == olmapiv1alpha1.ClusterServiceVersionKind {
116116
csv := &olmapiv1alpha1.ClusterServiceVersion{}
117-
if err := yaml.Unmarshal(b, csv); err != nil {
117+
if err := yaml.Unmarshal(manifest, csv); err != nil {
118118
return nil, fmt.Errorf("error unmarshalling ClusterServiceVersion from manifest %s: %v", path, err)
119119
}
120120
return csv, nil

0 commit comments

Comments
 (0)