Skip to content

fix(ci): each uv job keeps its own cache, grype's database is cached, and E2E skips Playwright's apt step and the observability images - #457

Merged
HardMax71 merged 3 commits into
mainfrom
max/ci-caches
Oct 23, 2026
Merged

HardMax71 merged 3 commits into
mainfrom
max/ci-caches

Conversation

@HardMax71

@HardMax71 HardMax71 commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Summary

Several CI steps download the same things on every run. The backend jobs share one setup-uv cache key, so Security Scanning, done first with only bandit inside, saves 3 MB and the other six download CPython and every wheel each run (run). Playwright's apt step installs fonts no test uses and stalled shard 1 for over 6 minutes twice (#455, #456). grype spends about 80 s per SBOM job on its database for a 0.2 s scan (run). Since #456, E2E also pulls 4 GB of observability images no test uses.

Changes

Each uv job saves its own cache (cache-suffix: ${{ github.job }}) with the managed Python. The Playwright cache follows playwright-core's browsers.json, and install-deps goes, since the runner image has Chromium's libraries. grype's database is cached under the checksum of the newest one, so it downloads only when a newer one exists. E2E pulls and starts only the frontend, the worker, the backup and their dependencies.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/CD or tooling changes

Test Plan

  • Backend unit tests pass (cd backend && uv run pytest tests/unit)
  • Frontend unit tests pass (cd frontend && npm run test)
  • Backend E2E tests pass (docker compose exec -T backend sh -c 'uv sync --group test --no-dev --frozen --no-install-project --no-build && pytest tests/e2e')
  • Frontend E2E tests pass (cd frontend && npm run test:e2e)
  • API spec and client regenerated if routes or schemas changed (uv run python -m scripts.export_openapi in backend/, then npm run generate:api in frontend/), never edited by hand
  • Manual testing performed

Validation: on the SBOM re-run the database came from cache in 13 s and each scan took 4 s, against 57 to 85 s before (run). actionlint finds nothing in either workflow.

Checklist

  • My code follows the project's style guidelines
  • I have run pre-commit run --all-files and all checks pass
  • I have added tests that prove my fix/feature works
  • I have updated documentation if needed
  • My changes don't introduce new warnings

…ep, and grype's database is cached

All backend jobs shared one setup-uv key, so the first job to finish (bandit only) saved a 3 MB cache and the others downloaded CPython and every wheel on each run; each job now saves its own cache with the managed Python. The Playwright browser cache follows the browser builds in playwright-core's browsers.json instead of the whole package-lock.json, and the install-deps step goes: on the runner image it only adds fonts no test uses, and its apt download stalled two runs for more than 6 minutes. The SBOM scan restores grype's vulnerability database from a cache keyed on the checksum of the newest database, instead of spending about 80 s downloading and unpacking it in each job.
@HardMax71
HardMax71 enabled auto-merge (squash) October 23, 2026 18:42
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c757af63-7d4f-474f-9ce2-867039b23174
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added documentation Improvements or additions to documentation area: ci GitHub workflows, test infrastructure, repo tooling labels Oct 23, 2026
@codecov-commenter

codecov-commenter commented Oct 23, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Flag Coverage Δ
backend-e2e 82.04% <ø> (ø)
backend-unit 77.87% <ø> (ø)
frontend-unit 92.25% <ø> (ø)

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

Components Coverage Δ
Backend 94.73% <ø> (ø)
Frontend 92.25% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

HardMax71 and others added 2 commits October 23, 2026 20:47
…the observability services

No E2E test uses Grafana, Loki, OpenSearch, VictoriaMetrics, Jaeger or the collectors. Since #456 the E2E jobs pulled their 4 GB of images too: the pull grew from 22 s to 49 s and the stack waited about 25 s on it, plus 13 s more startup.
@HardMax71 HardMax71 changed the title fix(ci): each uv job keeps its own cache, Playwright skips its apt step, and grype's database is cached fix(ci): each uv job keeps its own cache, grype's database is cached, and E2E skips Playwright's apt step and the observability images Oct 23, 2026
@sonarqubecloud

Copy link
Copy Markdown

@HardMax71
HardMax71 merged commit 4fa2f48 into main Oct 23, 2026
26 checks passed
@HardMax71
HardMax71 deleted the max/ci-caches branch October 23, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci GitHub workflows, test infrastructure, repo tooling documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants