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

statedb: Fix WriteJSON with multiple tables #24970

Merged

Conversation

joamaki
Copy link
Contributor

@joamaki joamaki commented Apr 19, 2023

WriteJSON produced broken JSON with multiple tables. This refactors it to use a buffered writer and extends the tests to check that it works with two tables instead of just one.

@joamaki joamaki requested a review from a team as a code owner April 19, 2023 07:27
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Apr 19, 2023
@joamaki joamaki added the release-note/misc This PR makes changes that have no direct user impact. label Apr 19, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Apr 19, 2023
Copy link
Member

@bimmlerd bimmlerd left a comment

Choose a reason for hiding this comment

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

generally seems fine, would be good to clean up the error handling

pkg/statedb/db.go Show resolved Hide resolved
@joamaki joamaki force-pushed the pr/joamaki/statedb-fix-writejson branch from cb0a5a0 to 2836a0e Compare May 5, 2023 07:37
WriteJSON produced broken JSON with multiple tables. This refactors
it to use a buffered writer and extends the tests to check that it
works with two tables instead of just one.

Signed-off-by: Jussi Maki <jussi@isovalent.com>
@joamaki joamaki force-pushed the pr/joamaki/statedb-fix-writejson branch from 2836a0e to 7bd3019 Compare May 29, 2023 14:24
@joamaki joamaki requested a review from a team as a code owner May 29, 2023 14:24
@joamaki joamaki requested a review from ti-mo May 29, 2023 14:24
@joamaki
Copy link
Contributor Author

joamaki commented May 29, 2023

generally seems fine, would be good to clean up the error handling

Cleaned up the error handling.

@joamaki joamaki added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jun 5, 2023
@dylandreimerink dylandreimerink merged commit 4dc6ac7 into cilium:main Jun 5, 2023
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants