Skip to content

fix(ci): use portable paths in cache-ui-dependencies#19310

Draft
davdhacs wants to merge 1 commit intomasterfrom
cache-ui-deps-portable-paths
Draft

fix(ci): use portable paths in cache-ui-dependencies#19310
davdhacs wants to merge 1 commit intomasterfrom
cache-ui-deps-portable-paths

Conversation

@davdhacs
Copy link
Contributor

@davdhacs davdhacs commented Mar 5, 2026

Description

Replace container-specific /github/home/ paths with ~/ in the cache-ui-dependencies composite action.

Problem: The action hardcodes /github/home/.npm and /github/home/.cache/Cypress. This path only works inside GitHub Actions containers where HOME=/github/home. On-host runner jobs use HOME=/home/runner, so the cache misses.

Fix: Use ~/ which resolves correctly in both contexts:

  • Container jobs: ~/github/home (no change in behavior)
  • On-host jobs: ~/home/runner (now works)

Cache key bumped from npm-v2 to npm-v3 to avoid restoring stale entries with the old path layout. First run after merge will be a cache miss; repopulated on the next push to master.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • modified existing tests

How I validated my change

~ expands to $HOME in both container (/github/home) and host (/home/runner) contexts. The actions/cache action supports tilde expansion. Existing container workflows see no path change since their HOME is already /github/home.

@openshift-ci
Copy link

openshift-ci bot commented Mar 5, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@rhacs-bot
Copy link
Contributor

rhacs-bot commented Mar 5, 2026

Images are ready for the commit at ea27cb8.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-256-gea27cb84a8.

@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.64%. Comparing base (1e56031) to head (ea27cb8).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19310      +/-   ##
==========================================
- Coverage   49.65%   49.64%   -0.01%     
==========================================
  Files        2689     2689              
  Lines      202505   202505              
==========================================
- Hits       100552   100540      -12     
- Misses      94460    94468       +8     
- Partials     7493     7497       +4     
Flag Coverage Δ
go-unit-tests 49.64% <ø> (-0.01%) ⬇️

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.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Replace container-specific /github/home/ paths with ~/ which resolves
correctly in both container jobs (HOME=/github/home) and on-host runner
jobs (HOME=/home/runner).

Also add a 'save' input parameter for callers that need to force cache
saves outside the default branch, and a verification step that logs
cache directory sizes for observability.

Tested: the new portable-path v2 entry is saved on first run and
restored on subsequent runs. Cache hit restores ~299 MB (~136M .npm,
~739M Cypress). The ~1 min cold-run penalty is negligible against the
~30 min job duration.

Generated with the assistance of AI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@davdhacs davdhacs force-pushed the cache-ui-deps-portable-paths branch from b55faed to ea27cb8 Compare March 6, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants