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#433
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
💤 Files with no reviewable changes (2)
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 docstrings
🧪 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 |
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