ClangBuiltLinux / boot-utils

Collection of files for booting Linux kernels
26 stars 7 forks source link

Move images to GitHub releases #105

Closed nathanchance closed 1 year ago

nathanchance commented 1 year ago

This pull request adds support for moving the rootfs images from the repository to GitHub releases. This will make updating the images easier because they will not increase the size of the repository when cloned, so we will not have to be concerned with that anymore.

See the individual patches for full logic and reasoning, I tried to make the commit messages as descriptive as possible.

The only thing I am concerned about is running into rate limits in continuous integration. The rate limit documentation notes that the rate limit for requests using the built-in GITHUB_TOKEN from GitHub Actions is 1,000 requests per hour per repository. That might be too low for our workflows, which would have to query the API to download the rootfs for each job that boots an image. We could workaround this by creating a GitHub account just for continuous-integration2 and add a personal access token from that account to the repo secrets that is used for authentication, which has a requests rate limit of 5,000 requests per hour and per authenticated user.

nathanchance commented 1 year ago

So it should be faster to clone boot-utils for CI2, and the individual InitRD's will be fetched only when needed.

Right, we can further speed up CI2 by just downloading the Python files from GitHub rather than cloning the whole repo, as the scripts can be run in a standalone directory now.

Should we hit API limits, we could also always just revert.

Yes, I should be able to back out of this relatively easily should issues arise.

nathanchance commented 1 year ago

I am going to work on the continuous-integration2 changes needed to make this change work before I merge it.

Additionally, I thought a little bit more about generating a file from sha256sum *.zst after the build and checking that in but I think that ends up complicating things a bit, as we would have to generate the file, check it in, commit it, and push it to main before we could use gh to tag a release. I do not think there is anything fundamentally wrong with this approach but it is more complicated than the way I have it written now for potentially little gain. I will leave things the way they are for now and update it if the need arises.