docs: Fix partition type rendering in docs#662
Merged
Conversation
bfjelds
previously approved these changes
May 26, 2026
Contributor
There was a problem hiding this comment.
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’sDisplayimpl 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 {:#}. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
bfjelds
approved these changes
May 26, 2026
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})"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔍 Description
Fixed
Displayimpl forPartitionTypeto NOT output the unknown UUID by default.