feat: configure caller caches - #633
Conversation
| - name: Compute caller cache key | ||
| if: inputs.cache-paths != '' | ||
| id: caller-cache | ||
| run: | |
There was a problem hiding this comment.
There has to be some way to reduce the duplication of this logic, right? Can we use a shared-action? It is repeated in way too many files and it's kind of inscrutable bash due to the complexity of the task.
There was a problem hiding this comment.
Thanks for the reminder! I had had this same thought and told my agent to create it locally, but then I waited to push it out since it required another indirection to the shared-actions repo and I forgot to follow up. I'll push that up now.
There was a problem hiding this comment.
Implemented via rapidsai/shared-actions#143. The six workflows now invoke setup-caller-cache, so validation, key generation, restore/save, and environment export are defined once.
There was a problem hiding this comment.
Pushed an empty commit up to the libcudf PR to verify that the shared action is working: NVIDIA/cudf@591a0a2. The action is at rapidsai/shared-actions#143.
## Summary - add a composite action that validates, keys, restores, and saves caller-managed caches - export optional cache environment entries for subsequent job steps - centralize cache setup currently shared by Conda and wheel build/test workflows ## Validation - Parsed the action and dependent workflow YAML with `yq`. - Ran `git diff --check` in both repositories. Dependent on by rapidsai/shared-workflows#633. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Bradley Dice (https://github.com/bdice) URL: #143
|
/merge |
Summary
Extend caller-managed caches with three opt-in controls:
cache-key-files).cache-read-only), for short-lived refs that consume a trusted cache.cache-key-matrix-fields), while preserving each workflow’s existing identity by default.The validation, key construction, restore/save, and environment export now live in the reusable setup-caller-cache action, rather than being duplicated across the six Conda and wheel build/test workflows.
All existing callers keep their current restore-and-save behavior and cache-key shape unless they opt in.
Dependency