Skip to content

chore(regions): bump to 3.10.0 with go-libs migrator index fix#352

Draft
Dav-14 wants to merge 5 commits intomainfrom
fix/regions-go-libs-migrator-index
Draft

chore(regions): bump to 3.10.0 with go-libs migrator index fix#352
Dav-14 wants to merge 5 commits intomainfrom
fix/regions-go-libs-migrator-index

Conversation

@Dav-14
Copy link
Copy Markdown
Contributor

@Dav-14 Dav-14 commented Apr 30, 2026

Summary

Bumps regions chart to 3.10.0 and updates ledger / payments / orchestration / webhooks / transactionplane pinned versions across stack versions to pull in the go-libs migrator index name fix (formancehq/go-libs#594, backported as v2.2.5 / v3.6.2 / v4.1.4).

The bug: a hardcoded idx_version_id unique-index name in go-libs/pkg/storage/migrations/migrator.go collides between two migrators sharing a schema (PostgreSQL scopes index names per-schema, not per-table). The second migrator's CREATE UNIQUE INDEX IF NOT EXISTS becomes a silent no-op, leaving its INSERT ... ON CONFLICT (version_id) failing with SQLSTATE 42P10 at startup. Triggered in prod by enabling the NATS broker circuit breaker (which writes its own circuit_breaker_migrations table into the broker schema).

Changes per stack

Stack Service Before → After Linked PR (blocker)
v2.1 webhooks v2.3.0v2.3.1 formancehq/webhooks#146 (merged on main; needs tag)
v2.2 ledger v2.2.58v2.2.59 formancehq/ledger#1332
v2.2 webhooks v2.3.0v2.3.1 formancehq/webhooks#146 (merged; needs tag)
v3.0 ledger v2.2.58v2.2.59 formancehq/ledger#1332
v3.0 payments v3.0.18v3.0.20 formancehq/payments#706 (draft — heavy diff)
v3.0 webhooks v2.3.0v2.3.1 formancehq/webhooks#146 (merged; needs tag)
v3.0 orchestration v2.1.1v2.1.2 formancehq/flows#174 (on newly-created release/v2.1)
v3.1 ledger v2.3.17v2.3.18 formancehq/ledger#1333
v3.1 payments v3.0.18v3.0.20 formancehq/payments#706
v3.1 webhooks v2.3.0v2.3.1 formancehq/webhooks#146 (merged; needs tag)
v3.1 orchestration v2.4.1v2.4.2 formancehq/flows#173
v3.2 ledger v2.4.2v2.4.4 formancehq/ledger#1334
v3.2 payments v3.2.0v3.2.1 formancehq/payments#704
v3.2 webhooks v2.3.0v2.3.1 formancehq/webhooks#146 (merged; needs tag)
v3.2 orchestration v2.6.0v2.6.1 formancehq/flows#172
v3.2 transactionplane v0.2.1v0.2.2 formancehq/transaction-plane#85 (on newly-created release/v0.2)

Versions intentionally NOT bumped

v2.0 stack — not vulnerable

All pins (ledger v2.0.24, payments v2.0.32, webhooks v2.0.24, orchestration v2.0.24, reconciliation v2.0.24, etc.) come from the legacy formancehq/stack monorepo. The monorepo ships its own libs/go-libs/migrations/migrator.go — an older implementation that does not have the idx_version_id unique-index pattern and does not use INSERT ... ON CONFLICT (version_id). The bug we're fixing here was introduced in the standalone formancehq/go-libs repo (extracted later). Not vulnerable. Same applies to the v2.0.x pins of payments and orchestration referenced by the v2.1 and v2.2 stacks.

Status of all backport PRs

Already merged on main (need a tag cut)

Open backport PRs (ready)

Open, draft (heavy diff)

  • chore(deps): backport go-libs migrator index name fix to release/v3.0 payments#706 — release/v3.0 → v3.6.2 — this branch sat on go-libs v3.0.0-alpha.2 and Go 1.23, and the smallest patched go-libs requires Go 1.24. go mod tidy cascades into ~280 lines of transitive bumps. Build is clean but invasive. Alternative: shift v3.0/v3.1 stacks to payments v3.1.x line (where #703 covers the fix with a much smaller diff) instead of merging #706.

Already merged + tagged

Pending follow-ups (separate from this PR)

  • chore(deps): bump go-libs to pick up migrator index name fix flows#171 (main) still open.
  • formancehq/transaction-plane#84 (main) still open.
  • Operator gap: stacks did not restart automatically when the broker circuitBreakerEnabled=true setting was changed — a config change should trigger a reconcile of dependent stack pods. Separate from the go-libs bug.
  • EOL audit: the v2.0 stack pins service tags from the legacy formancehq/stack monorepo. Consider a follow-up PR to mark this stack EOL.

Blocking

This PR is draft because the target tags (ledger v2.2.59 / v2.3.18 / v2.4.4, payments v3.0.20 / v3.2.1, orchestration v2.1.2 / v2.4.2 / v2.6.1, webhooks v2.3.1, transactionplane v0.2.2) don't exist yet — they'll be cut from the linked branches once those PRs merge / tags are pushed. Promote to ready once each tag is available.

🤖 Generated with Claude Code

Bumps ledger and payments pinned versions to pull in the go-libs
migrator index name fix (formancehq/go-libs#594, backported as
v2.2.5 / v3.6.2 / v4.1.4). Targets new patch tags that will be cut
once the linked backport PRs merge.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 309fab89-1541-4abb-9399-73ed7a5ae797

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/regions-go-libs-migrator-index

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added bug Something isn't working release labels Apr 30, 2026
Dav-14 and others added 4 commits April 30, 2026 12:32
Bumps payments v3.0/v3.1 stack pins to v3.0.20 (formancehq/payments#706,
draft) and orchestration v3.1/v3.2 stack pins to v2.4.2 / v2.6.1
(formancehq/flows#173 / #172).

v3.0 stack orchestration v2.1.1 stays untouched: no release/v2.1
branch exists on flows, so no backport target. Needs separate
decision (bump to v2.4.x line or accept the bug there).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Webhooks main has the go-libs v2.2.5 fix merged (formancehq/webhooks#146)
but no new tag was cut yet. Bumps all stack pins to v2.3.1, which needs
to be tagged from webhooks main HEAD before this PR can ship.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bumps v3.0 stack orchestration v2.1.1 -> v2.1.2 (formancehq/flows#174,
backport on freshly-created release/v2.1) and v3.2 stack transactionplane
v0.2.1 -> v0.2.2 (formancehq/transaction-plane#85, backport on freshly-
created release/v0.2).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
formancehq/transaction-plane#84 and #85 were closed by paul-nicolas in
favor of a full upgrade to go-libs v5 (separate PR, not yet opened).
v0.2.2 tag will not be cut from the release/v0.2 branch I created.
This stack pin remains vulnerable until Paul ships the v5 upgrade and
this PR will need a separate update once that lands.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant