feat(core): drop v2.0/v2.1 support, enforce minimum version v2.2.0#433
feat(core): drop v2.0/v2.1 support, enforce minimum version v2.2.0#433flemzord wants to merge 2 commits into
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
WalkthroughThe changes establish a new minimum supported stack version (v2.2.0) with validation, remove obsolete version gates for earlier releases, and simplify code paths that previously accommodated pre-v2.2.0 versions across authentication, broker, ledger, database migration, and webhook resources. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
Add explicit version validation gate in GetModuleVersion() that rejects stack versions below v2.2.0 with an actionable error message. Clean up all dead code branches that only executed for versions < v2.2: - Remove --auto-migrate block in webhooks (range < v2.0.0-rc.5) - Remove IsGreaterOrEqual guards in webhooks, reconciliations, auths - Simplify broker mode detection (always default to OneStreamByStack) - Remove installLedgerSingleInstance and related dead functions - Simplify ledger migration error handling (always allow proceed) Removed functions: IsGreaterOrEqual, IsLower, hasAllVersionsGreaterThan, installLedgerSingleInstance, createLedgerContainerFull, createBaseLedgerContainer, createDeployment (ledger-local). Payments v2 branches and broker NATS stream detection are preserved as they operate on module versions, not stack versions.
a45739a to
4db933c
Compare
Summary
ValidateMinimumVersion) inGetModuleVersion()rejecting stack versions < v2.2.0 with actionable error messageIsGreaterOrEqual,IsLower,hasAllVersionsGreaterThan,installLedgerSingleInstance,createLedgerContainerFull,createBaseLedgerContainer,createDeployment(ledger-local)Net result: 12 files changed, 96 insertions, 208 deletions.
What's preserved
Test plan
go build ./...passesgo vet ./...passesTestValidateMinimumVersionwith 11 cases (v2.0.0, v2.1.0, v2.1.9, v2.0.0-rc.5, v2.2.0-alpha rejected; v2.2.0, v2.3.0, v3.0.0, non-semver, sha, latest accepted)v1.0.0→v2.2.0in stack/ledger controller tests)IsGreaterOrEqual/IsLowerreferences in codebase