Repository navigation
refactor(cache)!: remove completed migration bridge and legacy state - #1052
Conversation
|
Warning Review limit reachedYou'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 45 minutes. View limit details
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Remove cache migration handling composer.json, src/Database/Cache/*, tests/unit/Cache/* |
The Bridge and Legacy classes and their tests are removed. Mutation uses change for reads, begins, and finishes. Query no longer passes the collection region TTL to Mutation::read. The cache dependency constraint now includes ^7.0. |
Remove compatibility runtime setup Dockerfile, compat/* |
The compatibility Composer manifest and runtime script are removed. The Docker build no longer installs or copies the compatibility vendor directory. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Refactor
Possibly related PRs
- utopia-php/database#1050: Adds the bridge, legacy coordinator, compatibility runtime, and tests that this change removes.
- utopia-php/database#1051: Changes behavior in
Bridge, which this change removes. - utopia-php/database#1049: Establishes the CAS-based invalidation coordination retained by this change.
Suggested reviewers: abnegate
Merge Risk: 
Minimal · previous review fb7a6
-
No actionable merge-blocking issue was identified. Deployment must preserve the existing v2 cache namespace, wait until legacy readers have exited, and publish the public API removal with the next database major.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- 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.
|
CI exposed one remaining fully-qualified Bridge branch in purgeCachedQueries. Removed it and preserved the released v2 bridge behavior: always purge the query epoch before rotating it, including when the local epoch is cold. Added a behavior regression that warms a remote caller-owned cache, purges a cold local region, replays the recorded purges and requires a fresh remote result. Observed it fail with stale data before the change, then pass. Query/withCache suites:30 tests/99 assertions passed. Full static analysis and unit suite rerunning; all adapter lanes on the previous head passed. No ignores or baseline changes. |
Remove the completed rolling migration bridge and legacy writer bookkeeping. Mutation coordination now always uses the existing single-record opaque CAS protocol; the bridge-only query TTL parameter disappears. Delete the cache-5 compatibility process, frozen lockfile and Docker installation tier, together with bridge-only tests and failure adapter.
Applications replacing the v2 bridge must preserve their existing
v2:cache view, keys and CAS identities. The underlying v2 state/data format does not change, so old bridge-v2 and replacement clients can overlap. This cleanup requires every legacy reader to have exited; it does not discover or migrate a fleet automatically.Query epoch purges remain unconditional and recorded even when the local region is cold, so cross-region replay invalidates warm remote
withCachereaders. The regression was observed failing before the fix and passing afterward. Consumers must require database^10.0to retain this behavior.Validation:
The dependency range accepts stable cache 6.1.3 or stable 7.x cleanup; the lock remains on stable 6.1.3 with no package updates or development pins. Removing the public Bridge/Legacy classes is breaking; published stable database 10.0.0. Cache 7.0.0 is also published.
Do not change namespaces or clear cache data. Keep old Cloud migration flags until the complete replacement fleet is deployed; remove flags last. Cleanup release/deployment remains tracked separately: https://github.com/appwrite-labs/cloud/issues/7152. Migration completion evidence: https://github.com/appwrite-labs/cloud/issues/7145.
Summary by CodeRabbit