-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serde: Require T::serde_fields for all serde structs #23126
Merged
Merged
Conversation
This file contains 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
oleiman
changed the title
[DO NOT MERGE] serde: Require T::serde_fields for all serde structs
serde: Require T::serde_fields for all serde structs
Sep 5, 2024
new failures in https://buildkite.com/redpanda/redpanda/builds/54056#0191c394-ac5e-4c83-afcb-2e446caf341f:
|
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/54056#0191c394-ac64-43a8-8fc0-ecaacfa9d975 |
CI Failure:
|
dotnwat
previously approved these changes
Sep 5, 2024
With the exception of those that implement BOTH a custom reader and a custom writer. In that case, the fields tuple is not needed, so envelope_to_tuple will not participate in overload resolution. Also removes has_serde_fields concept, which is no longer needed. Signed-off-by: Oren Leiman <oren.leiman@redpanda.com>
oleiman
force-pushed
the
serde/require-serde-fields
branch
from
September 5, 2024 23:01
8def329
to
99f8266
Compare
force push to remove |
dotnwat
approved these changes
Sep 5, 2024
bazel build failed initially - looks to have been a transient 502 error pulling something from github |
CI Failure:
|
7 tasks
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.
With the exception of those that implement BOTH a custom reader and a custom writer. In that case, the fields tuple is not needed, so envelope_to_tuple will not participate in overload resolution.
In effect, this PR modifies serde to require using serde_fields for all structs EXCEPT those implementing both serde_read and serde_write. In these cases envelope_to_tuple won't generally participate in overload resolution
Why do this? #21431 provides a motivating example. Where possible, we try to avoid compat-breaking serde changes by appending new fields to the end of the binary format. The implicit coupling between aggregate field ordering and binary format makes it easy to introduce subtle serialization bugs or unnecessary compat breaks.
Backports Required
Release Notes