Skip to content
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

Utilize GitHub Actions cache for image builds #104

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

komish
Copy link
Contributor

@komish komish commented Oct 10, 2024

Description of the change:

  • Add a cache-building phase of the release workflow, which uses Docker's GitHub Actions cache backend to cache images
  • Modify the goreleaser configuration to leverage said cache when building images

Motivation for the change:

  • The Release process has had issues completing from time to time, hitting long timeouts.

    • In doing a deep dive, I think the cause is either (a) storage on runners, or (b) CPU utilization. I can't really diagnose either reliably without running a self-hosted runner, and there's no guarantee that I can replicate.

    • We've seen build times of anywhere from 35 minutes, to as long as 4 hours (after I extended timeouts).

  • The project is committed to Goreleaser as a release toolchain.

  • If the image build task is separated from the goreleaser task, it stands to reason that most of our challenges will be alleviated, given that each architecture gets its own runner for the build phase.

Alternatives considered:

  • I built a separate workflow that involved building the images in a matrix, and then just extracting the installed application and grafting it into the final container using Goreleaser. This is potentially a bit more reliable, but involves building a ton of Dockerfile fragments. It also makes building the image (say, on a workstation) much more challenging.

Additional Benefit

Drawbacks:

  • The goreleaser file is now very GitHub Actions centric.

@komish
Copy link
Contributor Author

komish commented Oct 15, 2024

This has been rebased to address conflicts.

@acornett21 acornett21 merged commit ab6893d into operator-framework:main Oct 15, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants