Skip to content

Conversation

@trent-codecov
Copy link
Contributor

Problem

GitHub Actions runners were running out of disk space due to storing Docker images as tar files in the GitHub Actions cache. The workflow architecture used docker save to export images to tar files, cached them, and then used docker load to restore them in subsequent jobs.

Solution

Migrated from tar-based image caching to direct registry pushes/pulls. This eliminates tar files from disk, leverages efficient registry layer storage, and simplifies the workflow.

Behavior

Internal PRs (codecov org):

  • Build images → Push to registry with temp tags
  • Subsequent jobs → Pull from registry

Fork PRs:

  • Requirements: Build using docker pull || docker build pattern
  • Test images: Rebuild locally (acceptable, infrequent)

Impact

Disk space savings: ~23.5 GB per full CI run

…cesses

- Removed caching steps for requirements and test requirements from multiple workflows.
- Updated build steps to directly invoke requirements and test requirements builds.
- Simplified conditions for authentication and Docker configuration based on repository ownership.
- Ensured that the self-hosted build job only runs for the appropriate repository owner.
… processes

- Removed caching steps for app and test app images across multiple workflows.
- Introduced new steps to push and pull images with temporary tags for better CI job management.
- Updated Docker commands to streamline image loading and authentication processes.
- Consolidated image build steps in the Makefile for improved clarity and efficiency.
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 16, 2025

CodSpeed Performance Report

Merging #533 will not alter performance

Comparing trent/less-tar-caching (43707ae) with main (7b7a791)

Summary

✅ 9 untouched

…cesses

- Simplified build commands in the GitHub Actions workflow by removing the use of input variables for make targets.
- Enhanced the Makefile by streamlining the build requirements and test requirements image creation steps.
- Updated Docker commands to ensure consistent tagging and pulling of images, improving clarity and efficiency in CI processes.
Comment on lines 54 to 56
- name: Pull built image
run: |
docker load --input ${{ inputs.output_directory }}/app.tar
make ${{ inputs.make_target_prefix }}pull.app-temp
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential bug: The _push-env.yml workflow attempts to pull a Docker image from a private registry before authenticating, and some jobs lack authentication, causing build failures.
  • Description: In the _push-env.yml workflow, the push-environment job attempts to pull a Docker image via make ... pull.app-temp before the Google Cloud authentication step. For internal builds where AR_REPO points to a private Google Artifact Registry, this will cause the docker pull to fail with an authentication error. The rolling and release jobs within the same workflow are also affected as they lack the necessary Google Cloud authentication step entirely, which will also lead to pull failures.

  • Suggested fix: Move the Google Cloud authentication steps to occur before any docker pull commands in the push-environment, rolling, and release jobs. Add the necessary Google Cloud authentication steps to the rolling and release jobs.
    severity: 0.85, confidence: 0.98

Did we get this right? 👍 / 👎 to inform future reviews.

@sentry
Copy link

sentry bot commented Oct 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.83%. Comparing base (7b7a791) to head (43707ae).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #533   +/-   ##
=======================================
  Coverage   93.83%   93.83%           
=======================================
  Files        1280     1280           
  Lines       46229    46229           
  Branches     1523     1523           
=======================================
  Hits        43378    43378           
  Misses       2543     2543           
  Partials      308      308           
Flag Coverage Δ
apiunit 96.51% <ø> (ø)
sharedintegration 38.79% <ø> (ø)
sharedunit 88.76% <ø> (ø)
workerintegration 58.77% <ø> (ø)
workerunit 91.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@codecov-notifications
Copy link

codecov-notifications bot commented Oct 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@trent-codecov trent-codecov marked this pull request as draft October 16, 2025 19:33
…thentication

- Updated conditions for pushing app and test app images to exclude shared targets.
- Added a new step for authenticating to Google Cloud using workload identity and service account secrets.
- Introduced a step to retrieve the short SHA for better traceability in the workflow.
…zation

- Adjusted the order of steps for pulling built images and Docker configuration for better clarity.
- Removed redundant authentication step to streamline the workflow.
- Ensured consistent formatting and spacing for improved readability.
- Changed the runner from 'ubuntu-large' to 'ubuntu' for the build-test-app job, optimizing resource usage.
- Changed the runner from 'ubuntu' to 'ubuntu-latest' for the build-test-app job to ensure access to the latest features and updates.
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.

3 participants