agama-project / agama

A service-based Linux installer
https://agama-project.github.io/
GNU General Public License v2.0
143 stars 43 forks source link

AgamaProposal: Honor DiskAnalyzer candidate devices when searching drives #1765

Closed ancorgs closed 1 week ago

ancorgs commented 1 week ago

Problem

When searching drives, the initial implementation of AgamaProposal uses all disk (or disk-like devices, to be precise) in the system.

That is ok as a first attempt, but we always knew we might need to refine that a bit.

Now that we are working on the new interface for storage configuration, fully based on AgamaProposal, the fact that AgamaProposal can choose a disk that is not considered by DiskAnalyzer to be an installation candidate feels a bit odd.

Solution

For the time being (and with minimal code changes), this adapts the AgamaProposal algorithm to filter out disks that are skipped by DiskAnalyzer. That typically means the disks from which the installer is running, disks that contain installation repositories, etc.

We may need to refine that in the future again. But for now that's the most consistent behavior we can adopt without taking big decisions.

Testing

Added a new unit test

Manual testing done by @joseivanlopez.

coveralls commented 1 week ago

Pull Request Test Coverage Report for Build 11838176757

Details


Files with Coverage Reduction New Missed Lines %
service/lib/agama/storage/manager.rb 1 97.1%
service/service/lib/agama/storage/manager.rb 1 97.1%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 11831842629: 0.02%
Covered Lines: 16915
Relevant Lines: 23707

💛 - Coveralls