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

Use pre-built docker images for some actions. #627

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

robdimsdale
Copy link
Member

Summary

This PR changes a few actions to use pre-built docker images rather than building them inline. This improves reliability as building these images has an observed failure rate of about 0.5%, or about 10 times per day across the Paketo stacks.

It doesn't have any noticeable impact on performance as the download time is comparable to the time taken to build the image.

Background

The actions that have been changed are the ones that are used most commonly in the Stacks Poll USNs job, which runs on a schedule. We maintain seven stacks (Bionic Full, Base, Tiny and Jammy Full, Base, Tiny, Static), and each stack runs the Poll USNs job every 10 minutes. That means we run about 70 times per hour, or about 1700 times per day. We typically see about 10 failures per day, hence the 0.5% failure rate.

We have manually built and pushed these docker images to GitHub Container Registry - they can be seen on the packages page for the Paketo Buildpacks organization.

Future work

We should create a job that will build and push these images on a schedule. That can be done separately from this PR, however, as the images are not security-critical (they don't end up in any product or tool - they are just used in CI) so they can afford to be a little out of date.

Closes #625. See that issue for more context.

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

- Specifically the actions that are used in the frequent stacks Poll USNs job.
- Using pre-built images reduces flakiness in GitHub Actions pipeline
  associated with failure to build the images on demand.
@robdimsdale robdimsdale requested a review from a team as a code owner November 15, 2022 20:15
@robdimsdale robdimsdale self-assigned this Nov 15, 2022
@robdimsdale
Copy link
Member Author

@sophiewigmore approved the direction of this PR in the linked issue (#625), so I'm going to merge this now that we have explicit approval from another tooling maintainer.

@robdimsdale robdimsdale merged commit 8882313 into main Nov 15, 2022
@robdimsdale robdimsdale deleted the prebuilt-docker-images branch November 15, 2022 20:52
@robdimsdale
Copy link
Member Author

In case it wasn't clear to folks, because this is a change to the actions, not the workflows, the changes will be picked up immediately - we don't need to sync the github config.

We can already see it working (and it turns out it's about 2x faster to pull the images vs build them, but these are small numbers that don't really matter):

Screen Shot 2022-11-15 at 3 55 09 PM

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.

Use prebuilt docker images for stacks actions
2 participants