Skip to content

increase docker caching in workflows #224

@ericbuckley

Description

@ericbuckley

Summary

On Apr 1, Docker will implement a change to reduce unauthenticated requests to just 10 pulls an hour. We need to be sure that our workflows are caching docker images as much as possible to reduce/prevent our chances of running into 429 failures.

Acceptance Criteria

  • Adjustments to the github action workflows to improve docker cache hits

Details / Tasks

Areas to consider for improvements

  • The smoke test job uses the docker build ... command to create an image to run. This likely hits Docker hub to retrieve the python:3.12-slim image every time. Consider using docker/build-push-action to make use of caching.
  • Our testing workflows depend on database services that use Docker hub images. It's likely that Github is caching some of these images, but in the case of an image like ....-latest it's probably having to check Docker hub every time to see if the image has changed. Maybe pinning these services to tags that don't change will prevent that (eg postgres:17 -> postgres:17.4-bookwarm)? Another alternative is to use a github mirror, that is copy the images we want into a repo on ghrc.io/cdcgov/recordlinkage, then have our workflow services reference those images.
  • Also, as part of an optimization, investigate whether the buildx step is necessary in the docs job or the release workflow.

Metadata

Metadata

Assignees

Labels

automationAutomation of processes

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions