treewide: replace deprecated http::reply::done()#30395
Open
travisdowns wants to merge 1 commit intoredpanda-data:devfrom
Open
treewide: replace deprecated http::reply::done()#30395travisdowns wants to merge 1 commit intoredpanda-data:devfrom
travisdowns wants to merge 1 commit intoredpanda-data:devfrom
Conversation
Contributor
There was a problem hiding this comment.
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 afterwrite_body(...)in the direct consumer verifier handler. - Replaced
done(content_type)withset_content_type(content_type)in HTTP test utilities (and removeddone()calls that followed explicit content-type setting). - Replaced
done("xml")withset_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. |
9eccdd1 to
4ccb468
Compare
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.
4ccb468 to
4d12911
Compare
Member
Author
|
4d12911 was a rebase only (one change is gone now as DCV is deleted) |
This was referenced May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seastar v26.2 deprecates
reply::done()andreply::done(content_type):done()cached_response_line, whichwrite_reply()never read,so it was always dead. Replacement: just remove the call.
done(content_type)is equivalent toset_content_type(content_type)(theupstream 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_lineis similarly write-only andset_content_type(string_view)already exists with the same signature. So this is safe to land on
devaheadof the seastar v26.2 rebase — it just preempts the
-Werrordeprecationwarnings that the rebase will turn on.
Mirrors the same upstream pattern applied in seastar's own
src/http/routes.cc,httpd.cc,file_handler.ccetc. when the deprecationwas introduced.
Backports Required
Release Notes