Conversation
Merged
4 tasks
Extend the cache hash to cover every package.json outside node_modules in addition to the lockfile. Each package.json is canonicalized (parsed, top-level "version" stripped, re-marshaled with sorted keys) before hashing, so cosmetic or CI-driven version bumps don't invalidate the cache. Rename PlaywrightCodeBundleMetadata.LockfileChecksum to CacheHash and bump metadata version to 4 so existing resources recompute on upgrade. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
c02151d to
c77984e
Compare
Handles provider downgrades better.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CacheHashto cover everypackage.jsonoutsidenode_modules/(at any depth) in addition to the lockfile, so dependency changes declared only in apackage.jsoncorrectly invalidate the cache.package.json(parse, strip top-levelversion, re-marshal with sorted keys) before hashing so cosmetic differences and CI-driven version bumps — e.g. auto-stamped commit-hash versions — don't churn the cache.PlaywrightCodeBundleMetadata.LockfileChecksum→CacheHash(and JSON taglcs→ch), and bumps the metadata version to 4 so existing resources recompute on first plan after upgrade.Notes for reviewers
InspectLockfilegained anInspectLockfileOptions{PackageJSONExcludedFields}parameter. The production caller passes[]string{"version"}.lockfile:<name>+ lockfile hash, then each canonicalpackage.jsonsorted by path.checkly_playwright_code_bundleresources on next plan after upgrade — this is intentional, to get everyone onto the new hash.Test plan
go test ./checkly -run TestInspectLockfile— all pre-existing + 6 new subtests pass.versionin a bundle'spackage.json, confirm no diff onterraform plan; modify another field (e.g.scripts), confirm a replacement is planned.🤖 Generated with Claude Code