Skip to content

Conversation

@tenthirtyam
Copy link
Collaborator

  • Utilize errors.Is for accurate error comparison when checking for ErrNoSataController, allowing for correct handling of wrapped errors.
  • Implement error wrapping with %w in fmt.Errorf to preserve underlying error information.
  • Add handling for unexpected error conditions from FindSATAController to ensure robustness.

@tenthirtyam tenthirtyam added this to the v1.5.0 milestone Dec 3, 2024
@tenthirtyam tenthirtyam self-assigned this Dec 3, 2024
@tenthirtyam tenthirtyam requested a review from a team as a code owner December 3, 2024 02:30
@tenthirtyam tenthirtyam force-pushed the fix/sata-controller-error-handling branch from f12204c to 612627b Compare December 3, 2024 02:38
Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @tenthirtyam,

I've left one tiny nitpick on the type check, but besides that, LGTM!

Pre-approving this one

@tenthirtyam tenthirtyam force-pushed the fix/sata-controller-error-handling branch 2 times, most recently from 9e0a0d3 to b0e4ad9 Compare December 5, 2024 21:25
@tenthirtyam tenthirtyam force-pushed the fix/sata-controller-error-handling branch from b0e4ad9 to e23925f Compare December 5, 2024 21:33
- Utilize `errors.Is` for accurate error comparison when checking for `ErrNoSataController`, allowing for correct handling of wrapped errors.
- Implement error wrapping with `%w` in `fmt.Errorf` to preserve underlying error information.
- Add handling for unexpected error conditions from `FindSATAController` to ensure robustness.

Signed-off-by: Ryan Johnson <[email protected]>
@tenthirtyam tenthirtyam force-pushed the fix/sata-controller-error-handling branch from e23925f to bb56e2f Compare December 5, 2024 21:34
Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp left a comment

Choose a reason for hiding this comment

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

Thanks for the reroll @tenthirtyam!

LGTM at first glance, will merge if/when CI goes green :)

@lbajolet-hashicorp lbajolet-hashicorp merged commit 05133be into main Dec 6, 2024
14 checks passed
@lbajolet-hashicorp lbajolet-hashicorp deleted the fix/sata-controller-error-handling branch December 6, 2024 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants