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

netdog: Move to quick-xml for XML serialization #2311

Merged
merged 1 commit into from
Aug 3, 2022

Conversation

zmrow
Copy link
Contributor

@zmrow zmrow commented Jul 28, 2022

Description of changes:

`serde_xml_rs` has a few bugs that we were able to work around, but the
inability to serialize a `Vec` is something we can't work around.  This
change moves the netdog code to `quick-xml` for serialization.

This change also allows us to get rid of the _f: () struct member that worked around a serde_xml_rs bug. However, quick-xml is slightly more wordy in that you need to supply $unflatten attributes for anything that is a simple type and needs to have it's own tag; otherwise it gets made an attribute of the tag itself.

Testing done:

  • All unit tests still pass
  • Built and ran an aws-k8s-1.21 node successfully.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

`serde_xml_rs` has a few bugs that we were able to work around, but the
inability to serialize a `Vec` is something we can't work around.  This
change moves the netdog code to `quick-xml` for serialization.
@zmrow
Copy link
Contributor Author

zmrow commented Aug 2, 2022

^ Rebases on develop and resolves merge conflicts

Copy link
Contributor

@etungsten etungsten left a comment

Choose a reason for hiding this comment

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

🍔

Copy link
Contributor

@stmcginnis stmcginnis left a comment

Choose a reason for hiding this comment

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

Tests are happy and the code changes look good to me. Not super familiar with the code and any side effects changes might have though, so will leave to someone else to merge.

@zmrow zmrow merged commit 36ba6f8 into bottlerocket-os:develop Aug 3, 2022
@zmrow zmrow deleted the netconfig_quickxml branch August 3, 2022 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants