Skip to content

[v25.3.x] dl/coordinator: add default formatter for errc#31006

Open
vbotbuildovich wants to merge 1 commit into
redpanda-data:v25.3.xfrom
vbotbuildovich:ai-backport-pr-31003-v25.3.x-1783022853
Open

[v25.3.x] dl/coordinator: add default formatter for errc#31006
vbotbuildovich wants to merge 1 commit into
redpanda-data:v25.3.xfrom
vbotbuildovich:ai-backport-pr-31003-v25.3.x-1783022853

Conversation

@vbotbuildovich

Copy link
Copy Markdown
Collaborator

Backport of PR #31003

  • Command: git cherry-pick -x a9b2926
  • Commits backported: 1
  • Conflicts resolved: 1
  • Commits skipped (already on target): 0
  • Backport branch: ai-backport-pr-31003-v25.3.x-1783022853

Conflict details

  • a9b2926 (src/v/datalake/coordinator/types.h, src/v/datalake/coordinator/types.cc): The source commit added an unknown-value fallback to a format_to(errc, ...) free function in types.h, but that format_to-based formatter only exists on dev — v25.3.x still formats errc via operator<<(std::ostream&, const errc&) declared in types.h and defined in types.cc (the operator<<format_to migration is a separate, un-backported commit). Resolved by keeping the target branch's operator<< declaration in types.h and applying the commit's actual intent — gracefully formatting unknown/future numeric errc values — to the operator<< definition in types.cc. Mirrored dev's exhaustive-switch + post-switch fallback by converting the per-case breaks to early returns and adding return o << fmt::format("errc::unknown({})", static_cast<int16_t>(errc)); after the switch, preserving -Wswitch exhaustiveness checking.

This errc gets serialized over the wire, so it's possible for a binary
to get unknown numeric values (e.g. future errors). The formatter
previously didn't account for this and would result in UB when adding
errc types.

(cherry picked from commit a9b2926)
@vbotbuildovich vbotbuildovich added this to the v25.3.x-next milestone Jul 2, 2026
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jul 2, 2026
@vbotbuildovich vbotbuildovich requested a review from andrwng July 2, 2026 20:11
@vbotbuildovich

Copy link
Copy Markdown
Collaborator Author

CI test results

test results on build#86683
test_status test_class test_method test_arguments test_kind job_url passed reason test_history
FAIL src/v/storage/tests/storage_e2e_single_thread src/v/storage/tests/storage_e2e_single_thread unit https://buildkite.com/redpanda/redpanda/builds/86683#019f2475-7db8-4862-bdfc-cdc851e4776a 0/1

@vbotbuildovich

Copy link
Copy Markdown
Collaborator Author

Retry command for Build#86683

please wait until all jobs are finished before running the slash command

/ci-repeat 1
skip-redpanda-build
skip-units
skip-rebase
tests/rptest/tests/data_migrations_api_test.py::DataMigrationsApiTest.test_creating_and_listing_migrations

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

Labels

area/redpanda kind/backport PRs targeting a stable branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants