Skip to content

docs: Fix partition type rendering in docs#662

Merged
frhuelsz merged 2 commits into
mainfrom
user/frhuelsz/partition-type-rendering
May 26, 2026
Merged

docs: Fix partition type rendering in docs#662
frhuelsz merged 2 commits into
mainfrom
user/frhuelsz/partition-type-rendering

Conversation

@frhuelsz
Copy link
Copy Markdown
Contributor

🔍 Description

Fixed Display impl for PartitionType to NOT output the unknown UUID by default.

Copilot AI review requested due to automatic review settings May 26, 2026 18:25
@frhuelsz frhuelsz requested a review from a team as a code owner May 26, 2026 18:25
bfjelds
bfjelds previously approved these changes May 26, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts how PartitionType is rendered so that unknown partition types no longer print their UUID by default, aligning runtime output with the docs.

Changes:

  • Update storage rules documentation to list the partition type as unknown (without an embedded UUID).
  • Change PartitionType’s Display impl to only include the UUID for unknown types when using alternate formatting ({:#}).
  • Update select storage graph error messages to use {:#} so unknown UUIDs remain visible in error output.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
docs/Reference/Host-Configuration/Storage-Rules.md Updates the mount-path table to render unknown partition types as unknown.
crates/trident_api/src/config/host/storage/storage_graph/error.rs Uses alternate formatting ({:#}) for partition type fields in error messages to preserve UUID visibility when needed.
crates/trident_api/src/config/host/storage/partitions.rs Changes Display formatting behavior for PartitionType, hiding unknown UUIDs by default and showing them only with {:#}.

Comment thread crates/trident_api/src/config/host/storage/partitions.rs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 26, 2026 19:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread crates/trident_api/src/config/host/storage/storage_graph/error.rs
Comment on lines 271 to +279
impl Display for PartitionType {
/// Formats known partition types using systemd-repart names and unknown
/// partition types as `unknown(<uuid>)` to preserve UUID visibility.
/// Formats partition types using systemd-repart names for regular `{}`
/// output; unknown partition types print as `unknown`, or as
/// `unknown(<uuid>)` when using alternate `{:#}` formatting.
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
if let Self::Unknown(uuid) = self {
write!(f, "unknown({uuid})")
} else {
write!(f, "{}", self.to_sdrepart_part_type())
// On alternate format, show unknown partition types as `unknown(<uuid>)`.
if f.alternate() {
if let Self::Unknown(uuid) = self {
return write!(f, "unknown({uuid})");
@frhuelsz frhuelsz merged commit a94600d into main May 26, 2026
22 checks passed
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