-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Human-readable date-based image suffixes #247
Conversation
fbafa3e
to
a1e2aa6
Compare
Right... |
a1e2aa6
to
c4e501a
Compare
c4e501a
to
cff5b39
Compare
@edsantiago This is not urgent, but I could use a second pair of eyes early on. Big-picture: My eventual goal is to have renovate manage opening vm-image update PRs for us. For that to work, we need image-suffixes resembling version-numbers that sort properly, and can be So this PR is a first-step in that direction...but as usual, it's complicated 😞 The major change here so far, is that Cirrus will read a $IMG_SFX "version" value in from a file in the repo. The file can be generated (and updated) by In short, with this PR, the new "build a new set of images" workflow would go like:
Does this sound mostly sane so far? Do you think it's helpful to include the OS revisions in the ID?
|
cff5b39
to
2bd0e5e
Compare
force-push change summary:
|
Cirrus CI build successful. Found built image names and IDs:
|
w00t! 🎉 |
2bd0e5e
to
9546cd8
Compare
I find it very hard to read this custom date format. Any reason to not just use the iso 8601 format? Also looks like the time is in the local timezone? I would prefer UTC. Lastly would it make sense to encode the automation_images PR number in that ID? In case something broke it will be easy to find the correct PR here. |
@Luap99 Using UTC is a good suggestion. Thanks. I'm fairly limited in the character set and length for the image names. It's about 45 lower-case letters, numbers, and '-'. That's it. So I'm afraid a delimited date/time wouldn't look much better:
what about if I stuck a full year, and
any better? |
Also keep in mind, it's not expected for humans to be reading/decoding this ID very much. Maybe once a month or so on average, if that. So I think some amount of ugliness is probably okay. |
Hmmm. I think all the
|
I don't really need the dashes, the full year alone is enough for my brain to recognize this as date. |
9546cd8
to
e06eebd
Compare
SGTM |
e06eebd
to
ee02f37
Compare
Historically, the ID used to identify a set of images was taken from the Cirrus-CI build ID. This was done to make auditing easier, since one can easily retrieve the build logs using the ID. However, there are many disadvantages to using the build id: * It's not human-readable, making it difficult to ascertain exactly when the images were built. * It's not guaranteed to be incremental, and therefore cannot be utilized as a "version". * It doesn't convey helpful information like when it was produced, or which release of Fedora is included in the set. For these and other reasons, switch to a simple date-based image suffix encoded in a repository file. Include a UTC-baesd timestamp to avoid value collisions, and a string identifying what OS's releases were built. Signed-off-by: Chris Evich <[email protected]>
ee02f37
to
baa870c
Compare
Upper-case characters aren't supported, but I still think this works okay:
The real trick will be seeing if I can teach renovate how to interpret that as a version number. |
yeah that works for me as well, I really like the idea behind this. |
Ya, me too. I think it was actually @edsantiago that suggested it a few years ago |
W00t, it's working: containers/automation_sandbox#97 |
Cirrus CI build successful. Found built image names and IDs:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
High-level: wow, fantastic work, thank you. This is beautiful and will be much appreciated.
Low level: whewwwwww, thanks for your patience. A lot to learn and understand. I have one (possibly invalid) concern, and one question.
This conditional was required temporarily so containers#247 could merge. Remove it and while we're there, backup/restore the original value in case it saves somebody a headache or two. Signed-off-by: Chris Evich <[email protected]>
No worries, as always I appreciate the oversight MUCH more than I dislike waiting 😄 |
This compliments the date/time based versioning implemented in containers/automation_images#247 Once merged, these changes will result in renovate opening PRs for tagged CI VM image commits in containers/automation_images. Renovate will ignore any existing configurations using the old `$CIRRUS_BUILD_ID` based *IMAGE_SUFFIX* values. Signed-off-by: Chris Evich <[email protected]>
This conditional was required temporarily so containers#247 could merge. Remove and replace it with a version that avoids modifying any files and only checks if `IMG_SFX` changes were made. Signed-off-by: Chris Evich <[email protected]>
This conditional was required temporarily so containers#247 could merge. Remove and replace it with a version that avoids modifying any files and only checks if `IMG_SFX` changes were made. Signed-off-by: Chris Evich <[email protected]>
This conditional was required temporarily so containers#247 could merge. Remove and replace it with a version that avoids modifying any files and only checks if `IMG_SFX` changes were made. Signed-off-by: Chris Evich <[email protected]>
This conditional was required temporarily so containers#247 could merge. Remove and replace it with a version that avoids modifying any files and only checks if `IMG_SFX` changes were made. Signed-off-by: Chris Evich <[email protected]>
This conditional was required temporarily so PR containers#247 could merge. Remove and replace it with a version that avoids modifying any files and only checks if `IMG_SFX` changes were made. Signed-off-by: Chris Evich <[email protected]>
This conditional was required temporarily so PR containers#247 could merge. Remove and replace it with a version that avoids modifying any files and only checks if `IMG_SFX` changes were made. Signed-off-by: Chris Evich <[email protected]>
This conditional was required temporarily so PR containers#247 could merge. Remove and replace it with a version that avoids modifying any files and only checks if `IMG_SFX` changes were made. Signed-off-by: Chris Evich <[email protected]>
This conditional was required temporarily so PR containers#247 could merge. Remove and replace it with a version that avoids modifying any files and only checks if `IMG_SFX` changes were made. Signed-off-by: Chris Evich <[email protected]>
Image content hasn't changed much, the biggest thing here is the $IMAGE_SUFFIX value. This new schema is also fully manageable by renovate. Allowing a tag-push to c/automation_images to create image update PRs in all repos automatically. ref: containers/automation_images#247 Also, cleanup a few comments and remove a disused testing task. Signed-off-by: Chris Evich <[email protected]>
Historically, the ID used to identify a set of images was taken from the
Cirrus-CI build ID. This was done to make auditing easier, since one
can easily retrieve the build logs using the ID. However, there are
many disadvantages to using the build id:
the images were built.
utilized as a "version".
which release of Fedora is included in the set.
For these and other reasons, switch to a simple date-based image suffix
encoded in a repository file. Include a UTC-baesd timestamp to avoid
value collisions, and a string identifying what OS's releases were built.