Skip to content

Commit

Permalink
extensions: Make tar file references and checksum optional
Browse files Browse the repository at this point in the history
- 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)
  • Loading branch information
ravanelli committed Feb 3, 2025
1 parent 8fef7e1 commit e9b23e6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
8 changes: 4 additions & 4 deletions pkg/builds/cosa_v1.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package builds

// generated by 'make schema'
// source hash: 4c19aed3b3d84af278780bff63728510bb3e70613e4c4eef8cabd7939eb31bd8
// source hash: d7b6e01415317b89e346747884eb3536cc9e78049a2c71615739afd51fa65569

type AdvisoryDiff []AdvisoryDiffItems

Expand Down Expand Up @@ -129,9 +129,9 @@ type Cloudartifact struct {

type Extensions struct {
Manifest map[string]interface{} `json:"manifest"`
Path string `json:"path"`
RpmOstreeState string `json:"rpm-ostree-state"`
Sha256 string `json:"sha256"`
Path string `json:"path,omitempty"`
RpmOstreeState string `json:"rpm-ostree-state,omitempty"`
Sha256 string `json:"sha256,omitempty"`
}

type Gcp struct {
Expand Down
8 changes: 5 additions & 3 deletions pkg/builds/schema_doc.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Generated by ./generate-schema.sh
// Source hash: 4c19aed3b3d84af278780bff63728510bb3e70613e4c4eef8cabd7939eb31bd8
// Source hash: d7b6e01415317b89e346747884eb3536cc9e78049a2c71615739afd51fa65569
// DO NOT EDIT

package builds
Expand Down Expand Up @@ -710,10 +710,12 @@ var generatedSchemaJSON = `{
"$id": "#/properties/extensions",
"type": "object",
"title": "Extensions",
"required": [
"optional": [
"path",
"sha256",
"rpm-ostree-state",
"rpm-ostree-state"
],
"required": [
"manifest"
],
"properties": {
Expand Down
6 changes: 4 additions & 2 deletions src/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -704,10 +704,12 @@
"$id": "#/properties/extensions",
"type": "object",
"title": "Extensions",
"required": [
"optional": [
"path",
"sha256",
"rpm-ostree-state",
"rpm-ostree-state"
],
"required": [
"manifest"
],
"properties": {
Expand Down

0 comments on commit e9b23e6

Please sign in to comment.