linux-system-roles / storage

Ansible role for linux storage management
https://linux-system-roles.github.io/storage/
MIT License
102 stars 59 forks source link

fix: check mode should not give an error #457

Closed richm closed 3 months ago

richm commented 3 months ago

Cause: The blivet module was not looking for the check_mode flag before reporting an error when the supporting modules could not be loaded.

Consequence: The storage role would give an error in check mode in the "Get required packages" task.

Fix: See if the role is running in check mode, and do not report an error if the underlying modules cannot be loaded. This is expected.

Result: The storage role does not print an error when running in check mode.

Signed-off-by: Rich Megginson rmeggins@redhat.com

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 10.76%. Comparing base (bb51979) to head (978ab07). Report is 3 commits behind head on main.

Files Patch % Lines
library/blivet.py 0.00% 1 Missing :warning:

:exclamation: There is a different number of reports uploaded between BASE (bb51979) and HEAD (978ab07). Click for more details.

HEAD has 1 upload less than BASE | Flag | BASE (bb51979) | HEAD (978ab07) | |------|------|------| |sanity|1|0|
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #457 +/- ## ========================================== - Coverage 16.54% 10.76% -5.79% ========================================== Files 2 8 +6 Lines 284 1942 +1658 Branches 79 0 -79 ========================================== + Hits 47 209 +162 - Misses 237 1733 +1496 ``` | [Flag](https://app.codecov.io/gh/linux-system-roles/storage/pull/457/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles) | Coverage Δ | | |---|---|---| | [sanity](https://app.codecov.io/gh/linux-system-roles/storage/pull/457/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.