Skip to content

Commit 10a81dd

Browse files
committed
extensions: Make tar file references and checksum optional
- Make `path`, `sha256` and `rpm-ostree-state` optional fields in `meta.json` for extensions, as no tar file was ever stored as an artifact. Including references to a non-existent file is unnecessary. Signed-off-by: Renata Ravanelli <[email protected]> (cherry picked from commit 7c3d186)
1 parent 9a88322 commit 10a81dd

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

pkg/builds/cosa_v1.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package builds
22

33
// generated by 'make schema'
4-
// source hash: 4c19aed3b3d84af278780bff63728510bb3e70613e4c4eef8cabd7939eb31bd8
4+
// source hash: 5bfdfee75d432a4c3ef2a44f82ad94ffc83cc29873b24dba38e85ab9ce10c556
55

66
type AdvisoryDiff []AdvisoryDiffItems
77

@@ -129,9 +129,9 @@ type Cloudartifact struct {
129129

130130
type Extensions struct {
131131
Manifest map[string]interface{} `json:"manifest"`
132-
Path string `json:"path"`
133-
RpmOstreeState string `json:"rpm-ostree-state"`
134-
Sha256 string `json:"sha256"`
132+
Path string `json:"path,omitempty"`
133+
RpmOstreeState string `json:"rpm-ostree-state,omitempty"`
134+
Sha256 string `json:"sha256,omitempty"`
135135
}
136136

137137
type Gcp struct {

pkg/builds/schema_doc.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Generated by ./generate-schema.sh
2-
// Source hash: 4c19aed3b3d84af278780bff63728510bb3e70613e4c4eef8cabd7939eb31bd8
2+
// Source hash: 5bfdfee75d432a4c3ef2a44f82ad94ffc83cc29873b24dba38e85ab9ce10c556
33
// DO NOT EDIT
44

55
package builds
@@ -710,10 +710,12 @@ var generatedSchemaJSON = `{
710710
"$id": "#/properties/extensions",
711711
"type": "object",
712712
"title": "Extensions",
713-
"required": [
713+
"optional": [
714714
"path",
715715
"sha256",
716-
"rpm-ostree-state",
716+
"rpm-ostree-state"
717+
],
718+
"required": [
717719
"manifest"
718720
],
719721
"properties": {

src/v1.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -704,10 +704,12 @@
704704
"$id": "#/properties/extensions",
705705
"type": "object",
706706
"title": "Extensions",
707-
"required": [
707+
"optional": [
708708
"path",
709709
"sha256",
710-
"rpm-ostree-state",
710+
"rpm-ostree-state"
711+
],
712+
"required": [
711713
"manifest"
712714
],
713715
"properties": {

0 commit comments

Comments
 (0)