Skip to content

build(ci): key Playwright browser cache on .service-versions - #111

Open
iloveitaly wants to merge 1 commit into
masterfrom
cursor/playwright-cache-service-versions-141f
Open

iloveitaly wants to merge 1 commit into
masterfrom
cursor/playwright-cache-service-versions-141f

Conversation

@iloveitaly

@iloveitaly iloveitaly commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Motivation

The Playwright browser cache was keyed on hashFiles('uv.lock', '.service-versions'), which invalidates on any lockfile or service-version change. A more precise key is the Playwright package version itself, which is what determines the downloaded Chromium revision.

This replaces lockfile scraping / awk with the same jq -r pattern already used for postgres in just/database.just.

Description

  • Persist playwright in .service-versions via write-versions (from importlib.metadata).
  • In CI, read that field with jq -r '.playwright' and use it as the actions/cache key.
  • Guard the new field with a functional version-alignment test.

Screenshots / Test

Local verification: jq -r '.playwright' .service-versions returns 1.62.0, matching the installed Playwright package. The resulting cache key is Linux-playwright-1.62.0.

Links

Open in Web Open in Cursor 

Read the Playwright package version with jq from .service-versions instead of hashing uv.lock, so unrelated lockfile changes do not bust the browser cache.

Co-authored-by: Michael Bianco <mike@mikebian.co>
@iloveitaly
iloveitaly marked this pull request as ready for review September 3, 2026 18:56
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.

2 participants