Skip to content

Reset Bootsnap RBS cache on lockfile changes & remove cache priming for CI - #2669

Open
KaanOzkan wants to merge 2 commits into
mainfrom
ko-reset-bootsnap-cache-on-lockfile
Open

Reset Bootsnap RBS cache on lockfile changes & remove cache priming for CI#2669
KaanOzkan wants to merge 2 commits into
mainfrom
ko-reset-bootsnap-cache-on-lockfile

Conversation

@KaanOzkan

@KaanOzkan KaanOzkan commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Motivation

  1. Tapioca could reuse stale RBS rewrite entries after tapioca or one of its dependencies changed because Bootsnap does not include those dependencies in its cache key.
  2. --only-bootsnap-rbs-cache was added to prime the cache in CI, but sharing Bootsnap caches across CI builds is unreliable and the read-only path complicates cache setup for little benefit.

Implementation

  1. Store the current Gemfile.lock digest in Tapioca’s dedicated Bootsnap cache. When the digest changes, delete the Bootsnap payload so the current run rebuilds it.
  2. Remove --only-bootsnap-rbs-cache, read-only cache handling, and their documentation. Keep the cache focused on writable local runs.

Tests

Added coverage that changing Gemfile.lock resets the existing Bootsnap payload.

@KaanOzkan
KaanOzkan force-pushed the ko-reset-bootsnap-cache-on-lockfile branch 4 times, most recently from d62a2e9 to 0ec2da2 Compare July 30, 2026 20:20
@KaanOzkan KaanOzkan changed the title Reset Bootsnap RBS cache on lockfile changes Reset Bootsnap RBS cache on lockfile changes & remove cache priming for CI Jul 30, 2026
Stores the current `Gemfile.lock` digest in Tapioca's dedicated Bootsnap cache and resets the Bootsnap payload when the digest changes.

Skips stale read-only caches so consumers do not use rewritten iseqs built for a different lockfile.
The `--only-bootsnap-rbs-cache` flag and read-only cache path supported sharing a primed cache between CI jobs. That workflow is no longer used.

Keep the cache local and writable. Normal `tapioca dsl` runs populate it, and lockfile changes reset the cached iseq payload.
@KaanOzkan
KaanOzkan force-pushed the ko-reset-bootsnap-cache-on-lockfile branch from 0ec2da2 to 8095cb1 Compare July 30, 2026 20:58
@KaanOzkan
KaanOzkan marked this pull request as ready for review July 30, 2026 20:59
@KaanOzkan
KaanOzkan requested a review from a team as a code owner July 30, 2026 20:59
@KaanOzkan KaanOzkan added the breaking-change Non-backward compatible change label Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change Non-backward compatible change bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant