kairos icon indicating copy to clipboard operation
kairos copied to clipboard

Fix Auroraboot for new artifact names

Open jimmykarily opened this issue 1 year ago • 4 comments

A first PR here: https://github.com/kairos-io/AuroraBoot/pull/47/files but it is missing a fix for the rest of the fields (flavor release, arch)

jimmykarily avatar Nov 15 '23 07:11 jimmykarily

We can move the naming.sh script to a golang importable module so that it can also be used by Auroraboot.

This might also allow us to create a simple web server to implement this as well: https://github.com/kairos-io/kairos/issues/1991

We can also build it as a binary to be used inside Dockerfiles if needed.

By having it in golang, it might also allow us to do more. E.g. Given an artifact name, return the model. Or even, given a bootable artifact name, give me the container image.

jimmykarily avatar Nov 15 '23 07:11 jimmykarily

@mauromorales I think we fixed Auroraboot for now. Refactoring and reusing the naming.sh logic it not as urgent. I can move it lower in the priorities if it's fixed.

jimmykarily avatar Nov 16 '23 07:11 jimmykarily

@jimmykarily is this still relevant or we can close it?

mudler avatar Mar 27 '24 14:03 mudler

@jimmykarily is this still relevant or we can close it?

There is a lot of logic that is duplicating what versioneer is doing: https://github.com/kairos-io/AuroraBoot/blob/4dc700c71230c1c5af379ab10b8364fdfcf7d8d5/pkg/schema/artifact.go#L22-L55

iirc naming.sh was versioneer's bash-based ancestor.

We can import versioneer as a library in Auroraboot and get rid of the duplication, hopefully saving us from bugs down the line.

jimmykarily avatar Mar 27 '24 15:03 jimmykarily