fix: bump version and add caching for playwright#2595
Conversation
📝 WalkthroughWalkthroughAdds a GitHub Actions cache step to persist Playwright browser binaries at ChangesCI Optimization
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/playwright.yml:
- Around line 51-55: The workflow step named "Cache Playwright browsers"
currently uses actions/cache@v4; update that step to pin the action to the
specific commit SHA recommended for v4.2.0 by replacing actions/cache@v4 with
actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 so the cache action is
SHA-pinned and stable (keep the step name, path, and key unchanged).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: bb776884-d10b-49ef-8226-3f333040421e
📒 Files selected for processing (1)
.github/workflows/playwright.yml
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/playwright.yml (1)
51-55: ⚡ Quick winAdd a same-OS
restore-keysfallback.Hashing the entire
package-lock.jsonmakes this cache cold on any lockfile churn, even when the Playwright browser revision is unchanged. That cuts into the CI win this step is meant to provide. A same-OS fallback keeps prior browser caches reusable, and Line 57 will still download anything missing.Suggested change
- name: Cache Playwright browsers uses: actions/cache@v4 with: path: ~/.cache/ms-playwright key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }} + restore-keys: | + playwright-${{ runner.os }}-🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/playwright.yml around lines 51 - 55, The cache step named "Cache Playwright browsers" currently uses a full package-lock.json hash as the sole key, which makes the cache cold on lockfile changes; add a restore-keys fallback so prior same-OS browser caches can be reused by CI. Modify the step that uses actions/cache@v4 (the "Cache Playwright browsers" step) to include a restore-keys entry such as a same-OS prefix like "playwright-${{ runner.os }}-" so the action can fall back to any prior cache matching the runner OS when the exact package-lock hash key misses.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/playwright.yml:
- Around line 51-55: The cache step named "Cache Playwright browsers" currently
uses a full package-lock.json hash as the sole key, which makes the cache cold
on lockfile changes; add a restore-keys fallback so prior same-OS browser caches
can be reused by CI. Modify the step that uses actions/cache@v4 (the "Cache
Playwright browsers" step) to include a restore-keys entry such as a same-OS
prefix like "playwright-${{ runner.os }}-" so the action can fall back to any
prior cache matching the runner OS when the exact package-lock hash key misses.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 1e7c4b68-99d6-4a76-a3f7-51a181e1ed8c
📒 Files selected for processing (1)
.github/workflows/playwright.yml
The test-playwright job was hitting the 60-minute limit and getting canceled on every run due to microsoft/playwright#40998
Checklist
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact security@ory.com) from the maintainers to push the changes.
Summary by CodeRabbit