Skip to content

perf(ci): cache prek hook environments - #1811

Closed
skevetter wants to merge 1 commit into
mainfrom
perf/prek-cache
Closed

skevetter wants to merge 1 commit into
mainfrom
perf/prek-cache

Conversation

@skevetter

@skevetter skevetter commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Cause

The Pre-commit job caches mise tools but reinstalls prek hook environments on fresh runners. The formatter runs on the repository even when prek receives filenames.

Fix

Cache prek's home by runner image, architecture and prek/mise manifests. Hook commands and coverage are unchanged.

Test evidence

Commit: 60a8906.

  • mise exec -- actionlint .github/workflows/pr-ci.yml: passed.
  • mise run cli:format: passed, 29.81s.
  • mise run cli:lint:ci: passed, 0 issues, 201.61s.
  • prek run --all-files -v: 13 passed, 0 failed, 380.87s with existing hook environments and isolated Go caches. Hook seconds: whitespace 0.07, EOF 0.04, YAML 0.00, large files 0.01, conflicts 0.00, shellcheck 0.25, shfmt 0.04, actionlint 0.42, biome format 0.24, biome ci 0.26, gitleaks 0.09, lint 321.07, fmt 57.84.
  • Isolated formatter prek run golangci-lint-fmt --files main.go -v: first 59.89s, hook 30.34s; warm 51.48s, hook 50.30s.
  • Earlier full run: 966.77s, 12 passed, 1 failed after a concurrent workflow edit; lint 423.83s, fmt 539.63s.
  • coderabbit review --agent --committed: completed, 0 findings.
  • PR Pre-commit first run: 6:10, passed. Cache miss and save confirmed; save took 28s.
  • Main Pre-commit steps: 8:44, 9:18, 6:07, 6:46, 9:00.

Not verified

Two isolated cold full runs failed installing shfmt after 18.65s and 13.95s due to incomplete downloads. Hosted rerun restore and timing are pending. GitHub CodeRabbit remained rate limited after one retry.

@skevetter skevetter added the ci-refactor CI/e2e refactor label Nov 9, 2026
@netlify

netlify Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 60a8906
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6af1f634d74151ac84b48572

@skevetter

Copy link
Copy Markdown
Contributor Author

@greptileai review

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dc867f63-8c46-403e-8a19-0a7107186d39
Commits

Reviewing files that changed from the base of the PR and between 9fe1458 and 60a8906.

Files selected for processing: 1

  • .github/workflows/pr-ci.yml
  • 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

@skevetter

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@netlify

netlify Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 60a8906
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6af1f634258e713bfc6744fc

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 41 minutes.

@greptile-apps

greptile-apps Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This PR appears safe to merge; no actionable issues were found.

Summary

Adds a cache for prek hook environments in the Pre-commit job.

  • The Pre-commit job reuses prek environments on matching runs.

No actionable issues found. Hosted cache save and restore remain unverified, as noted by skevetter.

Reviews (1) · Last reviewed commit: "perf(ci): cache prek hook environments" · Reviewed by Greptile

@skevetter

Copy link
Copy Markdown
Contributor Author

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 14 minutes.

@skevetter skevetter closed this Nov 9, 2026
@skevetter skevetter reopened this Nov 9, 2026
@skevetter

Copy link
Copy Markdown
Contributor Author

Closing: the measured saving on the second Pre-commit run was about 40 seconds, within normal run-to-run variation, so the cache is not justified.

@skevetter skevetter closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-refactor CI/e2e refactor size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant