Skip to content

Commit 17ef411

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 cf0ab11 commit 17ef411

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-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: 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: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Generated by ./generate-schema.sh
2-
// Source hash: 4c19aed3b3d84af278780bff63728510bb3e70613e4c4eef8cabd7939eb31bd8
2+
// Source hash: 5bfdfee75d432a4c3ef2a44f82ad94ffc83cc29873b24dba38e85ab9ce10c556
3+
34
// DO NOT EDIT
45

56
package builds
@@ -710,10 +711,12 @@ var generatedSchemaJSON = `{
710711
"$id": "#/properties/extensions",
711712
"type": "object",
712713
"title": "Extensions",
713-
"required": [
714+
"optional": [
714715
"path",
715716
"sha256",
716-
"rpm-ostree-state",
717+
"rpm-ostree-state"
718+
],
719+
"required": [
717720
"manifest"
718721
],
719722
"properties": {

src/cmd-cloud-prune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def main():
9090
return handle_upload_builds_json(s3_client, bucket, prefix, args.dry_run, args.acl)
9191

9292
# These lists are up to date as of schema hash
93-
# 4c19aed3b3d84af278780bff63728510bb3e70613e4c4eef8cabd7939eb31bd8. If changing
93+
# 5bfdfee75d432a4c3ef2a44f82ad94ffc83cc29873b24dba38e85ab9ce10c556. If changing
9494
# this hash, ensure that the list of supported and unsupported artifacts below
9595
# is up to date.
9696
supported = ["amis", "gcp"]

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)