Skip to content

chore(deps): backport go-libs migrator index name fix to release/v3.0#706

Open
Dav-14 wants to merge 3 commits into
release/v3.0from
hotfix/v3.0/go-libs-migrator-index
Open

chore(deps): backport go-libs migrator index name fix to release/v3.0#706
Dav-14 wants to merge 3 commits into
release/v3.0from
hotfix/v3.0/go-libs-migrator-index

Conversation

@Dav-14
Copy link
Copy Markdown
Contributor

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

Summary

Jira: EN-1029

Backport of the go-libs migrator index name fix to payments release/v3.0. Bumps github.com/formancehq/go-libs/v3 from v3.0.0-alpha.2 to v3.6.2.

Pulls in formancehq/go-libs#596 (backport of #594 to release/v3.6) which fixes a hardcoded idx_version_id name collision between migrators sharing a schema. The bug crashes services with SQLSTATE 42P10 at startup. Affected DBs self-heal on next deploy — no manual SQL required.

⚠️ Heavy diff

This branch was on go-libs v3.0.0-alpha.2 and Go 1.23.5. The smallest patched go-libs is v3.6.2, which requires Go 1.24.4 — so go mod tidy cascades into ~280 lines of transitive dep changes (watermill, pgx, pgxlisten, otel, temporal, bun, sync/oauth2/text, …).

The build is clean (go build ./... succeeds). But for a release-branch hotfix, this is much heavier than the v3.1 / v3.2 / v3.3 backports.

Alternatives to consider before merging:

  1. Merge as-is (clears the bug for the v3.0 stack but invasively bumps deps).
  2. Drop payments v3.0.x from regions and shift v3.0 / v3.1 stacks to payments v3.1.x (where chore(deps): backport go-libs migrator index name fix to release/v3.1 #703 already covers the fix with a much smaller diff).
  3. Mark v3.0 stack as EOL.

Companion to #701 (main), #703 (release/v3.1), #704 (release/v3.2), #705 (release/v3.3).

Test plan

  • go mod tidy clean
  • go build ./... succeeds
  • CI green
  • Manual verification on a v3.0 stack deployment

🤖 Generated with Claude Code

Pulls in formancehq/go-libs#596 (backport to release/v3.6, tagged as
v3.6.2) which fixes a hardcoded `idx_version_id` name collision between
migrators sharing a schema. The bug crashes services with
`SQLSTATE 42P10` at startup. Affected DBs self-heal on next deploy -
no manual SQL required.

Note: this branch sat on go-libs v3.0.0-alpha.2 + Go 1.23. The smallest
patched go-libs (v3.6.2) requires Go 1.24, so `go mod tidy` cascades
into substantial transitive dep bumps. Build succeeds clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Dav-14 added a commit to formancehq/helm that referenced this pull request Apr 30, 2026
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>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (1)
  • main

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: e64c8665-f71c-44a3-9420-298db2ece466

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 hotfix/v3.0/go-libs-migrator-index

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

fabrice guery and others added 2 commits May 5, 2026 11:46
The go-libs bump pulled the activities.MockClient onto the v1.35.0
client.Client surface, which adds DescribeWorkflow alongside the
existing DescribeWorkflowExecution. The committed mock was last
generated against v1.33.0, so the test typecheck failed.

Constraint: temporal SDK is pinned at v1.35.0 in go.mod
Confidence: high
Scope-risk: narrow
Directive: client_generated.go has no //go:generate directive — regenerate manually with mockgen against the pinned go.temporal.io/sdk version whenever the temporal SDK is bumped

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pflag treats Bool flags with NoOptDefVal="true", so `--profiler-enable
false` parses as `--profiler-enable=true` plus a positional `false`,
leaving the profiler ENABLED in tests. The profiler module then
registers a second httpserver hook on port :9090 (or :9191 for the
worker), which closes the same `serverport` started channel that the
API hook already closed — panic: close of closed channel.

The same bug was fixed on release/v3.1+ by switching to the
`--profiler-enable=false` syntax, but never backported to v3.0.
Surfaced now because go-libs v3.6.2's serverport.StartedServer panics
on the duplicate close (the alpha.2 path was either silent or hit a
different code path).

Constraint: pflag Bool flags require `--flag=value` syntax to consume the value
Confidence: high
Scope-risk: narrow
Directive: when adding boolean test flags, always use `--name=value` (no space) — otherwise the value is parsed as a positional and the flag defaults to true

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@fguery fguery marked this pull request as ready for review May 5, 2026 12:20
@fguery fguery requested a review from a team as a code owner May 5, 2026 12:20
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release/v3.0@00e7c89). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff               @@
##             release/v3.0     #706   +/-   ##
===============================================
  Coverage                ?   65.41%           
===============================================
  Files                   ?      602           
  Lines                   ?    26039           
  Branches                ?        0           
===============================================
  Hits                    ?    17034           
  Misses                  ?     7942           
  Partials                ?     1063           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fguery
Copy link
Copy Markdown
Contributor

fguery commented May 5, 2026

This looks OK, but pending the test on a stack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants