Skip to content

ci(#1740): fix container workflow caching#1741

Merged
josecelano merged 5 commits intotorrust:developfrom
josecelano:1740-fix-container-workflow-caching
May 8, 2026
Merged

ci(#1740): fix container workflow caching#1741
josecelano merged 5 commits intotorrust:developfrom
josecelano:1740-fix-container-workflow-caching

Conversation

@josecelano
Copy link
Copy Markdown
Member

Summary

  • fix checkout ordering and cache scoping in .github/workflows/container.yaml
  • prebuild the tracker image in .github/workflows/testing.yaml and reuse it in E2E runners with --skip-build
  • tighten .dockerignore and document the non-obvious cache-related Containerfile steps

Validation

  • cargo check --bin e2e_tests_runner --bin qbittorrent_e2e_runner
  • linter yaml
  • linter all

This branch contains four separate commits:

  • docs(#1740): add container workflow caching issue spec
  • ci(container): fix checkout and cache scoping
  • ci(e2e): reuse prebuilt tracker image
  • chore(container): reduce context churn and document cache

@josecelano josecelano requested a review from a team as a code owner May 7, 2026 20:55
@josecelano josecelano self-assigned this May 7, 2026
@josecelano josecelano requested a review from Copilot May 7, 2026 20:55
@josecelano josecelano added the Continuous Integration Workflows and Automation label May 7, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves CI container build caching and speeds up Docker-based E2E jobs by ensuring Docker layer cache scopes don’t collide and by reusing a prebuilt tracker image instead of rebuilding it inside Rust runners.

Changes:

  • Fix .github/workflows/container.yaml checkout ordering and scope BuildKit type=gha caches per target/job.
  • Prebuild the tracker image in .github/workflows/testing.yaml and run E2E runners with --skip-build using the prebuilt tag.
  • Reduce Docker context churn via .dockerignore updates and document cache-related/intentional Containerfile steps; add an issue spec doc describing the caching problem and solution.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/console/ci/qbittorrent_e2e/services_setup.rs Adds skip_build plumbing to optionally skip docker compose build before bringing up the stack.
src/console/ci/qbittorrent_e2e/runner.rs Adds --skip-build CLI flag and improves startup error context.
src/console/ci/e2e/runner.rs Adds --tracker-image and --skip-build to reuse a prebuilt tracker image.
docs/issues/1740-fix-container-workflow-caching.md Documents the caching issues/root cause and proposed workflow + context fixes.
Containerfile Adds inline documentation for non-obvious build/cache-related steps.
.github/workflows/testing.yaml Prebuilds a cached release image for Docker E2E and passes --tracker-image/--skip-build to runners.
.github/workflows/container.yaml Fixes checkout ordering and scopes type=gha cache keys to avoid collisions across matrix/jobs.
.dockerignore Excludes additional non-build files to reduce cache busting from unrelated changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/console/ci/qbittorrent_e2e/services_setup.rs
Comment thread src/console/ci/e2e/runner.rs Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

❌ Patch coverage is 0% with 19 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.42%. Comparing base (20fca49) to head (57c1ed6).

Files with missing lines Patch % Lines
src/console/ci/compose.rs 0.00% 6 Missing ⚠️
src/console/ci/e2e/runner.rs 0.00% 5 Missing ⚠️
src/console/ci/qbittorrent_e2e/services_setup.rs 0.00% 5 Missing ⚠️
src/console/ci/qbittorrent_e2e/runner.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1741      +/-   ##
===========================================
- Coverage    79.45%   79.42%   -0.04%     
===========================================
  Files          368      368              
  Lines        27117    27129      +12     
  Branches     27117    27129      +12     
===========================================
+ Hits         21546    21547       +1     
- Misses        5290     5302      +12     
+ Partials       281      280       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@josecelano
Copy link
Copy Markdown
Member Author

ACK 57c1ed6

@josecelano josecelano merged commit 4b47206 into torrust:develop May 8, 2026
25 of 26 checks passed
@josecelano josecelano linked an issue May 8, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Continuous Integration Workflows and Automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Container Workflow Caching

2 participants