Skip to content

Move the software API to a separate service org.opensuse.DInstaller.Software#201

Merged
imobachgs merged 27 commits intomulti-processfrom
split-software-service
Jun 17, 2022
Merged

Move the software API to a separate service org.opensuse.DInstaller.Software#201
imobachgs merged 27 commits intomulti-processfrom
split-software-service

Conversation

@imobachgs
Copy link
Copy Markdown
Contributor

@imobachgs imobachgs commented Jun 16, 2022

Problem

This PRs moves the software management logic to a separate service, org.opensuse.DInstaller.Software. See #168 for further information.

Solution

This is the first PR to move the software API to a separate org.opensuse.DInstaller.Software. It sets the basic infrastructure:

  • Move the software API to a separate SoftwareService.
  • Extend bin/d-installer to run all services at once or just one of them. More work is expected to improve this executable soon.
  • Support for using a different Y2DIR per service.
  • Adapt the UI to use the new software service.

Testing

  • Added a new unit test
  • Tested manually

Tasks (other PRs)

  • Keep track of the status
  • API to add resolvables to the packages proposal (if needed)

@imobachgs imobachgs changed the base branch from master to multi-process June 16, 2022 09:37
@imobachgs imobachgs force-pushed the split-software-service branch from 4bdc39f to 528c991 Compare June 16, 2022 09:52
@imobachgs imobachgs changed the title Split software service Move the softare API to a separate service org.opensuse.DInstaller.Service Jun 16, 2022
@coveralls
Copy link
Copy Markdown

coveralls commented Jun 16, 2022

Pull Request Test Coverage Report for Build 2514470738

  • 66 of 134 (49.25%) changed or added relevant lines in 15 files are covered.
  • 41 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-5.9%) to 72.718%

Changes Missing Coverage Covered Lines Changed/Added Lines %
service/lib/dinstaller/dbus/clients.rb 0 1 0.0%
service/lib/dinstaller/dbus/manager.rb 0 1 0.0%
service/lib/dinstaller/progress.rb 1 2 50.0%
service/lib/dinstaller/package_callbacks.rb 0 2 0.0%
service/lib/dinstaller/software.rb 12 14 85.71%
service/lib/dinstaller/dbus/clients/software.rb 26 29 89.66%
service/lib/dinstaller/dbus/software.rb 0 23 0.0%
service/lib/dinstaller/dbus/software_service.rb 0 35 0.0%
Files with Coverage Reduction New Missed Lines %
service/lib/dinstaller/dbus/clients.rb 1 0%
service/lib/dinstaller/manager.rb 1 92.52%
service/lib/dinstaller/software.rb 1 65.55%
service/lib/dinstaller/dbus/software.rb 38 0%
Totals Coverage Status
Change from base Build 2503418449: -5.9%
Covered Lines: 1490
Relevant Lines: 2049

💛 - Coveralls

@imobachgs imobachgs changed the title Move the softare API to a separate service org.opensuse.DInstaller.Service Move the sofwtare API to a separate service org.opensuse.DInstaller.Service Jun 17, 2022
@imobachgs imobachgs marked this pull request as ready for review June 17, 2022 05:58
@imobachgs imobachgs mentioned this pull request Jun 17, 2022
2 tasks
@imobachgs imobachgs changed the title Move the sofwtare API to a separate service org.opensuse.DInstaller.Service Move the software API to a separate service org.opensuse.DInstaller.Service Jun 17, 2022
Copy link
Copy Markdown
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.

So far, LGTM. Will you add unit testing in this or a subsequent PR?

Comment thread service/bin/d-installer Outdated
Comment thread service/bin/d-installer Outdated

ORDERED_SERVICES = [:software, :users, :manager].freeze

# Start all the services
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

NP: Starts

#
# @param done [Proc] Block to execute once the probing is done
def probe(&done)
return dbus_object.Probe unless block_given?
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This line is not needed. You can simply use dbus_object.Probe(&block), which will perform the D-Bus call without passing any block if the block was not given.

Comment thread service/lib/dinstaller/dbus/clients/software.rb Outdated
Comment thread service/lib/dinstaller/dbus/software.rb Outdated
Comment thread service/lib/dinstaller/dbus/software.rb
end

# Exports the software object through the D-Bus service
def export
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

At some point we will need a DBus::Base class.

@joseivanlopez joseivanlopez changed the title Move the software API to a separate service org.opensuse.DInstaller.Service Move the software API to a separate service org.opensuse.DInstaller.Software Jun 17, 2022
Copy link
Copy Markdown
Contributor

@joseivanlopez joseivanlopez left a comment

Choose a reason for hiding this comment

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

LGTM

@imobachgs imobachgs merged commit e35c5b3 into multi-process Jun 17, 2022
@imobachgs imobachgs deleted the split-software-service branch June 17, 2022 09:53
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