Conversation
The powerpc build was attempting to use removed APIs from the blockdev crate. Update the powerpc target_device function to use the new Device APIs. Assisted-by: Claude Code (Opus 4) Signed-off-by: ckyrouac <ckyrouac@redhat.com>
|
Hi @ckyrouac. Thanks for your PR. I'm waiting for a coreos member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
Code Review
This pull request refactors device handling in src/bios.rs by introducing a Device abstraction, replacing raw string paths in functions like target_device and run_grub_install. This simplifies how device paths and partitions are managed, especially for GRUB installation. A minor improvement opportunity was noted regarding the error message in target_device to include both PREPBOOT_GUID and PREPBOOT_MBR_TYPE for better clarity.
| .ok_or_else(|| { | ||
| anyhow::anyhow!("Failed to find PReP partition with GUID {PREPBOOT_GUID}") | ||
| })?; |
There was a problem hiding this comment.
The error message is a bit misleading as it only mentions the PREPBOOT_GUID. The code also searches for PREPBOOT_MBR_TYPE. Including both in the error message would be clearer for debugging purposes.
| .ok_or_else(|| { | |
| anyhow::anyhow!("Failed to find PReP partition with GUID {PREPBOOT_GUID}") | |
| })?; | |
| .ok_or_else(|| { | |
| anyhow::anyhow!("Failed to find PReP partition with GUID {PREPBOOT_GUID} or type {PREPBOOT_MBR_TYPE}") | |
| })? |
|
/ok-to-test |
The powerpc build was attempting to use removed APIs from the blockdev crate. Update the powerpc target_device function to use the new Device APIs.
Assisted-by: Claude Code (Opus 4)