Skip to content

Commit 6767d76

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 1edb5c3 commit 6767d76

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
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: 4bb2fd8591ae1cc9179181b9efcb550542137a01c9544fd048e66794e0fb176a
4+
// source hash: d7b6e01415317b89e346747884eb3536cc9e78049a2c71615739afd51fa65569
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: 4bb2fd8591ae1cc9179181b9efcb550542137a01c9544fd048e66794e0fb176a
2+
// Source hash: d7b6e01415317b89e346747884eb3536cc9e78049a2c71615739afd51fa65569
33
// DO NOT EDIT
44

55
package builds
@@ -707,10 +707,12 @@ var generatedSchemaJSON = `{
707707
"$id": "#/properties/extensions",
708708
"type": "object",
709709
"title": "Extensions",
710-
"required": [
710+
"optional": [
711711
"path",
712712
"sha256",
713-
"rpm-ostree-state",
713+
"rpm-ostree-state"
714+
],
715+
"required": [
714716
"manifest"
715717
],
716718
"properties": {

src/cmd-coreos-prune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Build = collections.namedtuple("Build", ["id", "images", "arch", "meta_json"])
5656
# set metadata caching to 5m
5757
CACHE_MAX_AGE_METADATA = 60 * 5
5858
# These lists are up to date as of schema hash
59-
# 4bb2fd8591ae1cc9179181b9efcb550542137a01c9544fd048e66794e0fb176a. If changing
59+
# d7b6e01415317b89e346747884eb3536cc9e78049a2c71615739afd51fa65569. If changing
6060
# this hash, ensure that the list of SUPPORTED and UNSUPPORTED artifacts below
6161
# is up to date.
6262
SUPPORTED = ["amis", "gcp"]

src/v1.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,10 +701,12 @@
701701
"$id": "#/properties/extensions",
702702
"type": "object",
703703
"title": "Extensions",
704-
"required": [
704+
"optional": [
705705
"path",
706706
"sha256",
707-
"rpm-ostree-state",
707+
"rpm-ostree-state"
708+
],
709+
"required": [
708710
"manifest"
709711
],
710712
"properties": {

0 commit comments

Comments
 (0)