linux-system-roles / storage

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

fix: facts being gathered unnecessarily #374

Closed richm closed 1 year ago

richm commented 1 year ago

Cause: The comparison of the present facts with the required facts is being done on unsorted lists.

Consequence: The comparison may fail if the only difference is the order. Facts are gathered unnecessarily.

Fix: Use difference which works no matter what the order is. Ensure that the fact gathering subsets used are the absolute minimum required.

Result: The role gathers only the facts it requires, and does not unnecessarily gather facts.

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

richm commented 1 year ago

Fixes https://github.com/linux-system-roles/storage/issues/373

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -1.68 :warning:

Comparison is base (07022f4) 13.70% compared to head (708d557) 12.03%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #374 +/- ## ========================================== - Coverage 13.70% 12.03% -1.68% ========================================== Files 8 8 Lines 1729 1729 Branches 71 0 -71 ========================================== - Hits 237 208 -29 - Misses 1492 1521 +29 ``` | Flag | Coverage Δ | | |---|---|---| | sanity | `?` | | 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. [see 1 file with indirect coverage changes](https://app.codecov.io/gh/linux-system-roles/storage/pull/374/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=linux-system-roles)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

richm commented 1 year ago

[citest]