Skip to content
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

json: minor clean-ups #17403

Merged
merged 5 commits into from
Mar 27, 2024
Merged

json: minor clean-ups #17403

merged 5 commits into from
Mar 27, 2024

Conversation

dotnwat
Copy link
Member

@dotnwat dotnwat commented Mar 26, 2024

json: minor clean-ups

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
  • v23.3.x
  • v23.2.x

Release Notes

  • none

dotnwat added 5 commits March 26, 2024 09:10
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
}
w.EndArray();
}

template<typename T, size_t chunk_size = 128>
void rjson_serialize(
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we need to fix these other functions too?

Copy link
Contributor

Choose a reason for hiding this comment

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

By fix I mean move to the public header? The public header is re-exporting these methods right now.

Copy link
Member Author

Choose a reason for hiding this comment

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

sorry i'm not sure what you mean. what's an example?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry I was confused that the new json.h file is in container/include/container, originally I thought you put that in json/include/json. I am assuming that moving json serialization to the container module is intentional? Should we be doing that for everything? Or maybe we should be doing the serde approach and just have a template version?

I am assuming you're moving rjson_serialize for fragmented_vector for some cyclical dependency?

Copy link
Member Author

@dotnwat dotnwat Mar 27, 2024

Choose a reason for hiding this comment

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

Yeh, definitely open to alternatives here. The idea is that it is not scalable for json/json.h to have overrides for everything (e.g. container/* net/*, etc...) and that each module should have its own json.h for its types. what remains in json/json.h would be overloads for external dependencies and stuff in base/*.

wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

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

That SGTM

@vbotbuildovich
Copy link
Collaborator

new failures in https://buildkite.com/redpanda/redpanda/builds/46890#018e80c3-0e4a-43f1-a78b-6dde60bd926b:

"rptest.tests.cluster_config_test.ClusterConfigTest.test_restart"

@dotnwat
Copy link
Member Author

dotnwat commented Mar 27, 2024

new failures in https://buildkite.com/redpanda/redpanda/builds/46890#018e80c3-0e4a-43f1-a78b-6dde60bd926b:

"rptest.tests.cluster_config_test.ClusterConfigTest.test_restart"

Not new #8328

@dotnwat dotnwat merged commit debdfea into redpanda-data:dev Mar 27, 2024
15 of 18 checks passed
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