Skip to content

Commit 73cfeb1

Browse files
committed
extensions: Remove unused tar file references and checksum for extensions
- The `path` and `sha256` fields in `meta.json` for extensions are being removed, as no tar file was ever stored as an artifact. Including references to a non-existent file is unnecessary. - Removes the checksum for `rpm-ostree-state`,let's focus on the package list for extensions. Signed-off-by: Renata Ravanelli <[email protected]>
1 parent 7dd4b4d commit 73cfeb1

File tree

4 files changed

+5
-26
lines changed

4 files changed

+5
-26
lines changed

pkg/builds/build.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -254,10 +254,6 @@ func GetCommandBuildableArtifacts() []string {
254254
func (build *Build) artifacts() map[string]*Artifact {
255255
ret := make(map[string]*Artifact)
256256

257-
// Special case Extensions
258-
// technically extentions are an artifact, albeit the meta-data located
259-
// as a top level entry.
260-
ret["extensions"] = build.Extensions.toArtifact()
261257

262258
var ba BuildArtifacts = *build.BuildArtifacts
263259
rv := reflect.TypeOf(ba)
@@ -307,17 +303,6 @@ func IsMetaJSON(path string) bool {
307303
return reMetaJSON.Match([]byte(b))
308304
}
309305

310-
// toArtifact converts an Extension to an Artifact
311-
func (e *Extensions) toArtifact() *Artifact {
312-
if e == nil {
313-
return new(Artifact)
314-
}
315-
return &Artifact{
316-
Path: e.Path,
317-
Sha256: e.Sha256,
318-
}
319-
}
320-
321306
func FetchAndParseBuild(url string) (*Build, error) {
322307
res, err := http.Get(url)
323308
if err != nil {

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: df5e6afe6c1ac8eeb378d216bc14251fb95803185458408adc37c8f2dfd23316
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: 1 addition & 4 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: df5e6afe6c1ac8eeb378d216bc14251fb95803185458408adc37c8f2dfd23316
33
// DO NOT EDIT
44

55
package builds
@@ -708,9 +708,6 @@ var generatedSchemaJSON = `{
708708
"type": "object",
709709
"title": "Extensions",
710710
"required": [
711-
"path",
712-
"sha256",
713-
"rpm-ostree-state",
714711
"manifest"
715712
],
716713
"properties": {

src/v1.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -702,9 +702,6 @@
702702
"type": "object",
703703
"title": "Extensions",
704704
"required": [
705-
"path",
706-
"sha256",
707-
"rpm-ostree-state",
708705
"manifest"
709706
],
710707
"properties": {

0 commit comments

Comments
 (0)