bottlerocket-os / bottlerocket

An operating system designed for hosting containers
https://bottlerocket.dev
Other
8.45k stars 499 forks source link

`cargo make repo` fails after move to `bottlerocket-core-kit` #4073

Open cbgbt opened 1 month ago

cbgbt commented 1 month ago

Platform I'm building on: aarch64

What I expected to happen: The following should create a TUF repository containing my variant:

$ cargo make -e ARCH=aarch64 -e BUILDSYS_VARIANT=aws-k8s-1.29 repo

What actually happened: The build tried to use a wave schedule that is no longer present in the repository.

2:06:12 [INFO] Using release config from path: /home/ec2-user/bottlerocket/Release.toml
22:06:12 [INFO] Using wave policy from path: /home/ec2-user/bottlerocket/sources/updater/waves/default-waves.toml
22:06:12 [INFO] Offsets from that file will be added to the release start time of: 2024-06-25 22:06:12.493332553 UTC
Failed to build repo: Failed to read update metadata '/home/ec2-user/bottlerocket/sources/updater/waves/default-waves.toml': Failed to read '/home/ec2-user/bottlerocket/sources/updater/waves/default-waves.toml': No such file or directory (os error 2)

How to reproduce the problem: Use cargo make repo

NaomiLYJ commented 2 weeks ago

Also some questions about the bottlerocket-core-kit.

I see that it's moving to the bottlerocket-core-kit on the develop branch, but the latest release 1.20.3 is still the old structure. Could I ask about the release plan using the new structure, e.g., the bottlerocket-core-kit?

yeazelm commented 2 weeks ago

Could I ask about the release plan using the new structure, e.g., the bottlerocket-core-kit?

We plan to make our next minor version of Bottlerocket (1.21.0) use develop and the bottlerocket-core-kit. As you can see from this issue there are still some items to iron out before we can do that, so we are keeping the 1.20.x branch around to provide releases while we work through the remaining items.

If you have other issues related to using develop with the bottlerocket-core-kit, we would like to know about them! Please cut issues for issues you see in case we are unaware of other changes needed to fully shift to using kits for these builds.

NaomiLYJ commented 2 weeks ago

Could I ask about the release plan using the new structure, e.g., the bottlerocket-core-kit?

We plan to make our next minor version of Bottlerocket (1.21.0) use develop and the bottlerocket-core-kit. As you can see from this issue there are still some items to iron out before we can do that, so we are keeping the 1.20.x branch around to provide releases while we work through the remaining items.

If you have other issues related to using develop with the bottlerocket-core-kit, we would like to know about them! Please cut issues for issues you see in case we are unaware of other changes needed to fully shift to using kits for these builds.

Thank you for your reply! In which release or when would you probably include the bottlerocket-core-kit change?

jmt-lab commented 2 weeks ago

Hi there, first of all thank you for your patience on this issue. We have released a new version of Twoliter that should solve the make repo issue. If you would like to test the fix locally now before 1.21 release occurs you can do the following modifications

in bottlerocket-core-kit fork (if you have one, if not skip this) adjust Makefile to change TWOLITER_VERSION = 0.4.2

in bottlerocket fork (variant repo) adjust Makefile.toml change TWOLITER_VERSION = v0.4.2 and adust the wave policy path as follows:

PUBLISH_WAVE_POLICY_PATH = "${BUILDSYS_BUILD_DIR}/tools/waves/default-waves.toml"

after this you should be able to do a build then use make repo