Skip to content

Improvement move pkg cache fs calls to repo plugin#1993

Open
vanridal wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
vanridal:improvement-move-cache-fs-calls-to-repo-plugin
Open

Improvement move pkg cache fs calls to repo plugin#1993
vanridal wants to merge 1 commit intoAcademySoftwareFoundation:mainfrom
vanridal:improvement-move-cache-fs-calls-to-repo-plugin

Conversation

@vanridal
Copy link
Contributor

@vanridal vanridal commented Jul 7, 2025

This PR is an attempt to decouple the package cache operation to the repository plugins

This can allow users to customize how the package cache touches the filesystem on a per repository bases either via the cache_variant() call, or on the variant resource

Does this help with the artifact repo direction, could some remote repos use the current cache system via moving these functions to the repository plugin?

I personally would like a way to customize pkg cache operation via a custom filesystem plugin to optimize cache speeds

@vanridal vanridal requested a review from a team as a code owner July 7, 2025 23:27
@codecov
Copy link

codecov bot commented Jul 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.00%. Comparing base (9afb325) to head (974a77f).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1993      +/-   ##
==========================================
+ Coverage   59.98%   60.00%   +0.02%     
==========================================
  Files         163      163              
  Lines       20118    20121       +3     
  Branches     3519     3519              
==========================================
+ Hits        12067    12074       +7     
+ Misses       7230     7226       -4     
  Partials      821      821              

☔ 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.

Signed-off-by: george.ridal <george.ridal@findesign.com.au>
@vanridal vanridal force-pushed the improvement-move-cache-fs-calls-to-repo-plugin branch from a8ff4bc to 974a77f Compare February 19, 2026 22:20
@vanridal
Copy link
Contributor Author

@JeanChristopheMorinPerso
Thought I would share, this commit was the most minimal change we had to make for us to implement artifact cache at our facility.
Moving the call to PackageRepository class allowed for the Repository plugin to dictate how rez should cache the repos payloads. Whether handle it itself (our current method) or could defer to a artifact repo it has relationship with or even call upon another plugin, say a copy plugin that can interface to its payload format.

I would like to see this adopted in the rez, as I think for such a small change it does empower anyone to take ownership of the cache copy method without the need of too much refactor of rez's core code.

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.

1 participant