Skip to content

D-Bus API for storage issues#548

Merged
joseivanlopez merged 7 commits intoagama-project:issuesfrom
joseivanlopez:storage-issues-dbus
Apr 27, 2023
Merged

D-Bus API for storage issues#548
joseivanlopez merged 7 commits intoagama-project:issuesfrom
joseivanlopez:storage-issues-dbus

Conversation

@joseivanlopez
Copy link
Contributor

@joseivanlopez joseivanlopez commented Apr 25, 2023

Problem

The Agama D-Bus API has the validation concept, which is provided by the org.opensuse.Agama1.Validation interface. That validation is used by clients to check if there is any error. But a more generic mechanishm is required to report diffirent kind of issues, for example warnings. This would be useful, for example, to get the list of issues reported by the storage probing.

Solution

Add a new org.opensuse.Agama1.Issues interface. That interface would replace the previous org.opensuse.Agama1.Validation interface. Now, services can report different types of issues (warn and error for now). Clients can subscribe to changes in the issues.

This PR only adapts the storage service to use the issues interface instead of validations. The rest of services will be adapted later in a serparate PR.

Note: Failures in the integration tests are expected. They will be fixed after adapting the web UI, see #540.

Testing

  • Added a new unit tests
  • Tested manually

@joseivanlopez joseivanlopez force-pushed the storage-issues-dbus branch 2 times, most recently from 50a5c79 to 0a77681 Compare April 26, 2023 14:36
@coveralls
Copy link

coveralls commented Apr 26, 2023

Pull Request Test Coverage Report for Build 4817478639

  • 124 of 142 (87.32%) changed or added relevant lines in 11 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.2%) to 74.043%

Changes Missing Coverage Covered Lines Changed/Added Lines %
service/lib/agama/dbus/interfaces/issues.rb 20 21 95.24%
service/lib/agama/storage/proposal.rb 11 12 91.67%
service/lib/agama/dbus.rb 0 3 0.0%
service/lib/agama/dbus/storage/manager.rb 9 12 75.0%
service/lib/agama/dbus/interfaces.rb 0 10 0.0%
Files with Coverage Reduction New Missed Lines %
service/lib/agama/dbus.rb 1 0%
service/lib/agama/storage/proposal.rb 1 93.88%
Totals Coverage Status
Change from base Build 4796705073: 0.2%
Covered Lines: 4848
Relevant Lines: 6318

💛 - Coveralls

@joseivanlopez joseivanlopez marked this pull request as ready for review April 26, 2023 15:58
Copy link
Contributor

@dgdavid dgdavid left a comment

Choose a reason for hiding this comment

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

LGTM, but I'd wait for another review from someone with more D-Bus background.

@joseivanlopez joseivanlopez merged commit b1b9366 into agama-project:issues Apr 27, 2023
This was referenced Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments