Possible fit for a small cache-regression check in the test workflow #4605
Replies: 2 comments
-
|
not sure @eivindsjursen-lab are you In any case I guess if ever needed we could just add a check after cache restore step instead of having a completely separate workflow for that check? |
Beta Was this translation helpful? Give feedback.
-
|
Good call — and no, I’m not You’re absolutely right: this should run in the same I used a separate workflow on my side only to validate the cache lane in isolation first. # top-level permissions
permissions:
contents: read
actions: read
pull-requests: write # optional; only needed if PR comments are desired
yaml
# existing restore step (rename title to include marker)
- name: "[cache-step] group=opt-bin"
if: matrix.config.os == 'ubuntu-latest' || matrix.config.os == 'macos-latest'
id: optbin-cache
uses: actions/cache@v5
with:
path: ${{ env.OPT_BIN_DIR }}
key: opt-bin-${{ runner.os }}-${{ hashFiles('.github/workflows/_install_opt_unit_deps.sh') }}
yaml
# add immediately after restore step
- name: "[cache] group=opt-bin hit=${{ steps.optbin-cache.outputs.cache-hit || 'false' }} key_fp=${{ hashFiles('.github/workflows/_install_opt_unit_deps.sh') }} key_hint=opt-bin-script"
if: matrix.config.os == 'ubuntu-latest' || matrix.config.os == 'macos-latest'
run: echo "opt-bin cache marker emitted"
yaml
# add near the end of the same job
- name: Cache Health Gate
if: ${{ always() }}
uses: eivindsjursen-lab/gates-suite-public-beta/packages/cache-health-gate@cache-health-gate/v1.0.0
with:
mode: warn
no_baseline_behavior: warn
baseline_event_filter: pushFork-side validation on my workflow-copy (not your repo runs): |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi — your test workflow already combines environment-level setup with a separate cached
opt-binlayer, which looks like a strong fit for catching cache regressions earlier in PRs.I tried a fork-side dry run of that workflow shape with a small warn-only cache check. In a controlled bad-case, the
opt-binlane showed the kind of silent reuse/restore degradation that is easy to miss while the overall job still stays green.If useful, I can paste the minimal warn-only snippet I used for that cache layer. No backend, easy rollback.
Beta Was this translation helpful? Give feedback.
All reactions