Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github May 5, 2025

Updates the requirements on serde-xml-rs to permit the latest version.

Release notes

Sourced from serde-xml-rs's releases.

0.8.0

✨ Features:

  • Namespace support for reading and writing
  • #text as well as #content
  • Log messages go from debug level to trace
  • Serialize options in attributes and plain text

📝 Improved documentation

🐛 Bug fixes:

  • Serializing sequences with attributes
  • ...

💥 Breaking changes:

  • $value replaced by #content and #text
  • Attributes must now be deserialized to fields named @..., mirroring what was introduced in the serializer.
  • Tuples become string only. This will be addressed in a future release
Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels May 5, 2025
@dongsupark
Copy link
Collaborator

CI fails during unit tests.

thread 'media::tests::test_get_ovf_env_missing_type' panicked at libazureinit/src/media.rs:476:64:
called `Result::unwrap()` on an `Err` value: Xml(Custom("missing field `ProvisioningSection`"))

@dependabot dependabot bot force-pushed the dependabot/cargo/serde-xml-rs-0.8.0 branch from 6f5e254 to 540da76 Compare May 6, 2025 13:54
Updates the requirements on [serde-xml-rs](https://github.com/RReverser/serde-xml-rs) to permit the latest version.
- [Release notes](https://github.com/RReverser/serde-xml-rs/releases)
- [Commits](RReverser/serde-xml-rs@0.7.0...0.8.0)

---
updated-dependencies:
- dependency-name: serde-xml-rs
  dependency-version: 0.8.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/cargo/serde-xml-rs-0.8.0 branch from 540da76 to 10cf07e Compare May 6, 2025 13:57
Starting from serde-xml-rs 0.8.0, namespace support was added for
deserialization of xml tags. So it is necessary to explicitly add tags
`wa:` into each struct, when actual XML data is tagged with namespace.

See also RReverser/serde-xml-rs#228,
RReverser/serde-xml-rs#50.
@dongsupark
Copy link
Collaborator

Fixed the unit tests.

Starting from serde-xml-rs 0.8.0, namespace support was added for deserialization of xml tags. So it is necessary to explicitly add tags wa: into each struct, when actual XML data is tagged with namespace.

See also RReverser/serde-xml-rs#228, RReverser/serde-xml-rs#50.

Copy link
Member

@jeremycline jeremycline left a comment

Choose a reason for hiding this comment

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

This looks good to me, I think.

I'm not familiar with XML namespace details, so I brushed up a little bit here. They seem a little weird in that the prefix appears to be a convenient way to reference the URI, but just the prefix shows up in the deserialized field names sans URI, but that does appear to be how this works, and matches what cloud-init documents in its example.

/// <ProvisioningSection>
/// <Version>1.0</Version>
/// <Environment xmlns="http://schemas.dmtf.org/ovf/environment/1"
/// xmlns:wa="http://schemas.microsoft.com/windowsazure">
Copy link
Member

Choose a reason for hiding this comment

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

It wouldn't be XML if the schema URL wasn't a 404

Copy link
Collaborator

Choose a reason for hiding this comment

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

I am also not an expert of XML namespace, so I am not sure if the changes for unit tests are enough for the new serde-xml-rs version. If you have a better idea, feel free to create a PR. ;-)

@dongsupark dongsupark merged commit 628d80f into main May 20, 2025
7 checks passed
@dongsupark dongsupark deleted the dependabot/cargo/serde-xml-rs-0.8.0 branch May 20, 2025 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants