Skip to content

treewide: replace deprecated http::reply::done()#30395

Open
travisdowns wants to merge 1 commit intoredpanda-data:devfrom
travisdowns:td-replace-deprecated-reply-done
Open

treewide: replace deprecated http::reply::done()#30395
travisdowns wants to merge 1 commit intoredpanda-data:devfrom
travisdowns:td-replace-deprecated-reply-done

Conversation

@travisdowns
Copy link
Copy Markdown
Member

@travisdowns travisdowns commented May 6, 2026

Seastar v26.2 deprecates reply::done() and reply::done(content_type):

  • The bare done() cached _response_line, which write_reply() never read,
    so it was always dead. Replacement: just remove the call.
  • done(content_type) is equivalent to set_content_type(content_type) (the
    upstream impl forwards to it). Replacement: call set_content_type() directly.

This change replaces the four call sites in this tree accordingly. The
replacements are also valid against the currently-pinned seastar SHA, where
_response_line is similarly write-only and set_content_type(string_view)
already exists with the same signature. So this is safe to land on dev ahead
of the seastar v26.2 rebase — it just preempts the -Werror deprecation
warnings that the rebase will turn on.

Mirrors the same upstream pattern applied in seastar's own
src/http/routes.cc, httpd.cc, file_handler.cc etc. when the deprecation
was introduced.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v25.3.x
  • v25.2.x
  • v25.1.x

Release Notes

  • none

Copilot AI review requested due to automatic review settings May 6, 2026 21:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Redpanda’s Seastar HTTP handlers to avoid upcoming Seastar v26.2 deprecation warnings by removing uses of ss::http::reply::done() and replacing done(content_type) with set_content_type(...).

Changes:

  • Removed a now-deprecated reply->done() call after write_body(...) in the direct consumer verifier handler.
  • Replaced done(content_type) with set_content_type(content_type) in HTTP test utilities (and removed done() calls that followed explicit content-type setting).
  • Replaced done("xml") with set_content_type("xml") in an S3 imposter test fixture.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/v/kafka/client/direct_consumer/verifier/application.cc Removes deprecated reply->done() after streaming a JSON reply body.
src/v/http/tests/utils.cc Replaces deprecated done(...) usage with set_content_type(...) in a test handler.
src/v/cloud_io/tests/db_s3_imposter_fixture.cc Replaces deprecated done("xml") with set_content_type("xml") in test fixture HTTP responses.

Comment thread src/v/http/tests/utils.cc
@travisdowns travisdowns requested review from StephanDollberg and removed request for StephanDollberg May 6, 2026 21:56
@travisdowns travisdowns force-pushed the td-replace-deprecated-reply-done branch from 9eccdd1 to 4ccb468 Compare May 6, 2026 23:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment thread src/v/redpanda/admin/server.cc
StephanDollberg
StephanDollberg previously approved these changes May 7, 2026
Seastar v26.2 deprecates reply::done() and reply::done(content_type).
The bare done() cached _response_line, which write_reply() never read,
so it was always dead. The done(content_type) overload is equivalent
to set_content_type(content_type). Replace each call site accordingly:
drop bare done() and use set_content_type() where a content type was
being passed. Also valid against the prior pinned seastar SHA, where
_response_line is similarly write-only.
@travisdowns
Copy link
Copy Markdown
Member Author

travisdowns commented May 8, 2026

4d12911 was a rebase only (one change is gone now as DCV is deleted)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants