Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

cmd/plume/fcos: modify build metadata structure #1015

Merged
merged 1 commit into from
Jun 27, 2019

Conversation

arithx
Copy link
Contributor

@arithx arithx commented Jun 25, 2019

Per discussions in the fedora-coreos-tracker, modify the build metadata structure to better support multi-arch.

@arithx
Copy link
Contributor Author

arithx commented Jun 25, 2019

cc @sinnykumari @lucab @jlebon

cmd/plume/release.go Show resolved Hide resolved
Endpoint string `json:"endpoint"`
CommitHash []Commit `json:"commits"`
Version string `json:"version"`
Endpoint string `json:"endpoint"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is called metadata in the JSON field over here coreos/fedora-coreos-tracker#98 (comment).

}

type Metadata struct {
LastModified string `json:"last-modified"`
}

type IndividualReleaseMetadata struct {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think at some later point (even in another PR) it would make sense to split structures belonging to different JSON-documents in different source files. It took me a bit to realize where this one was coming from.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like that might cause confusion though if the FCOS metadata types are defined in separate files while every other struct used in plume is inside of this file though. Is this maybe more of an issue with the individual names of these structs rather than the location?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine either ways (and also keeping as-is). It was just a minor sentiment when scanning through the source.

cmd/plume/release.go Show resolved Hide resolved
if len(a) > len(b) {
return 1
}
equal := len(a) == len(b)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/equal/sameLenght/ (or something similar, just for clarity)

Copy link

@sinnykumari sinnykumari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wondering should we keep "note" or remove it from ReleaseMetadata https://github.com/coreos/mantle/blob/master/cmd/plume/types.go#L89 ?

@arithx
Copy link
Contributor Author

arithx commented Jun 26, 2019

wondering should we keep "note" or remove it from ReleaseMetadata https://github.com/coreos/mantle/blob/master/cmd/plume/types.go#L89 ?

It was decided upstream to have the note field. This is just an implementation of that design.

@sinnykumari
Copy link

wondering should we keep "note" or remove it from ReleaseMetadata https://github.com/coreos/mantle/blob/master/cmd/plume/types.go#L89 ?

It was decided upstream to have the note field. This is just an implementation of that design.

Ok, should we get it added into the release-index coreos/fedora-coreos-tracker#98 (comment) ?

@arithx
Copy link
Contributor Author

arithx commented Jun 26, 2019

Ok, should we get it added into the release-index coreos/fedora-coreos-tracker#98 (comment) ?

I don't think it's strictly necessary as this is mostly just present in the case that something other than tools stumbles upon the file to dissuade usage. Any tool (e.x. the stream metadata generator) doesn't need to know or care about this field when parsing the release metadata index.

@sinnykumari
Copy link

Ok, should we get it added into the release-index coreos/fedora-coreos-tracker#98 (comment) ?

I don't think it's strictly necessary as this is mostly just present in the case that something other than tools stumbles upon the file to dissuade usage. Any tool (e.x. the stream metadata generator) doesn't need to know or care about this field when parsing the release metadata index.

sure, mentioned it to make sure we didn't miss anything :)

Per discussions in the [fedora-coreos-tracker](coreos/fedora-coreos-tracker#98 (comment)), modify the build metadata structure to better support multi-arch.
@arithx
Copy link
Contributor Author

arithx commented Jun 26, 2019

Updated addressing comments.

@lucab
Copy link
Contributor

lucab commented Jun 26, 2019

LGTM. If you are not in a hurry I'd suggest leaving this hanging till tomorrow so @sinnykumari has a last chance for a pass.

@arithx
Copy link
Contributor Author

arithx commented Jun 26, 2019

@lucab yup, was planning on waiting for everyone involved to have the chance to take a peek.

Copy link

@sinnykumari sinnykumari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@jlebon jlebon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

cmd/plume/release.go Show resolved Hide resolved
@arithx arithx merged commit 684ed0d into coreos:master Jun 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants