Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to ruby-dbus 0.18.0.beta2 breaks the installer #126

Closed
imobachgs opened this issue Apr 7, 2022 · 11 comments
Closed

Updating to ruby-dbus 0.18.0.beta2 breaks the installer #126

imobachgs opened this issue Apr 7, 2022 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@imobachgs
Copy link
Contributor

Updating to ruby-dbus 0.18.0.beta2 causes the installer to break. I found out that, for some properties, no values are returned at all. For instance, on interface org.opensuse.DInstaller.Language1, I am not able to get a value for AvailableLanguages and MarkedForInstall properties. Playing with busctl, I get this error:

‣ Type=method_call  Endian=l  Flags=0  Version=1 Cookie=523  Timestamp="Thu 2022-04-07 15:24:01.541983 UTC"
  Sender=:1.1515  Destination=:1.1590  Path=/org/opensuse/DInstaller/Language1  Interface=org.freedesktop.DBus.Properties  Member=Get
  UniqueName=:1.1515
  MESSAGE "ss" {
          STRING "org.opensuse.DInstaller.Language1";
          STRING "MarkedForInstall";
  };

‣ Type=error  Endian=l  Flags=0  Version=1 Cookie=195  ReplyCookie=523  Timestamp="Thu 2022-04-07 15:24:01.643540 UTC"
  Sender=:1.1590  Destination=:1.1515
  ErrorName=org.freedesktop.DBus.Error.Failed  ErrorMessage="missing keyword: :member_type; caused by 1 sender=:1.1515 -> dest=:1.1590 serial=523 reply_serial= path=/org/opensuse/DInstaller/Language1; interface=org.freedesktop.DBus.Properties; member=Get error_name="
  UniqueName=:1.1590
  MESSAGE "sas" {
          STRING "missing keyword: :member_type; caused by 1 sender=:1.1515 -> dest=:1.1590 serial=523 reply_serial= path=/org/opensuse/DInstaller/Language1; interface=org.freedesktop.DBus.Properties; member=Get error_name=";
          ARRAY "s" {
                  STRING "/home/imobach/Proyectos/yast/repos/d-installer/service/vendor/bundle/ruby/3.1.0/gems/ruby-dbus-0.18.0.beta2/lib/dbus/data.rb:555:in `initialize'";
                  STRING "/home/imobach/Proyectos/yast/repos/d-installer/service/vendor/bundle/ruby/3.1.0/gems/ruby-dbus-0.18.0.beta2/lib/dbus/data.rb:545:in `new'";
                  STRING "/home/imobach/Proyectos/yast/repos/d-installer/service/vendor/bundle/ruby/3.1.0/gems/ruby-dbus-0.18.0.beta2/lib/dbus/data.rb:545:in `from_typed'";
                  STRING "/home/imobach/Proyectos/yast/repos/d-installer/service/vendor/bundle/ruby/3.1.0/gems/ruby-dbus-0.18.0.beta2/lib/dbus/data.rb:46:in `make_typed'";
...

Non-arrays values seem to work just fine. It looks like the member_type is not being passed to the Array constructor.

@mvidner could you have a look, please?

Unfortunately, this version is already included in the Live image, so it is currently broken. If the fix is not trivial, I will revert the image to use a previous version.

@imobachgs imobachgs added the bug Something isn't working label Apr 7, 2022
@imobachgs
Copy link
Contributor Author

I reverted the rubygem-ruby-dbus version in the YaST:Head:D-Installer project to 0.18.0.beta1, so the installation image is working again.

@jreidinger
Copy link
Contributor

yeap, it was at line https://github.com/mvidner/ruby-dbus/blob/master/lib/dbus/data.rb#L545 There is missing member type. I can try to make fix and what is more important also cover it by tests.

@imobachgs
Copy link
Contributor Author

imobachgs commented Apr 8, 2022

yeap, it was at line https://github.com/mvidner/ruby-dbus/blob/master/lib/dbus/data.rb#L545 There is missing member type. I can try to make fix and what is more important also cover it by tests.

Yes, I tried that fix yesterday an the MarkedForInstall property worked just fine. But the AvailableLanguages failed anyway. Sure I overlooked something. Thanks for having a look!

@mvidner
Copy link
Contributor

mvidner commented Apr 8, 2022

Thanks for the report. That will teach me not to release new code with less than 100% coverage 🤦‍♂️

AvailableLanguages might be a problem even with Josef's fix, I'll add an integration test into the testing service.

@mvidner
Copy link
Contributor

mvidner commented Apr 8, 2022

PR merged, will release beta3 on Monday

@mvidner
Copy link
Contributor

mvidner commented Apr 12, 2022

@imobachgs
Copy link
Contributor Author

imobachgs commented Apr 18, 2022

Thanks @mvidner!

I tried the 0.18.0.beta3 and I got the following error once I load the D-Installer UI:

/home/imobach/Proyectos/yast/repos/d-installer/service/vendor/bundle/ruby/3.1.0/gems/ruby-dbus-0.18.0.beta3/lib/dbus/marshall.rb:328:in `append_array': Expected an Enumerable of DICT_ENTRY but got a DBus::Data::Array; caused by 1 sender=:1.320 -> dest=org.opensuse.DInstaller serial=25 reply_serial= path=/org/opensuse/DInstaller/Language1; interface=org.freedesktop.DBus.Properties; member=GetAll error_name= (DBus::TypeException)
        from /home/imobach/Proyectos/yast/repos/d-installer/service/vendor/bundle/ruby/3.1.0/gems/ruby-dbus-0.18.0.beta3/lib/dbus/marshall.rb:253:in `append'
        from /home/imobach/Proyectos/yast/repos/d-installer/service/vendor/bundle/ruby/3.1.0/gems/ruby-dbus-0.18.0.beta3/lib/dbus/marshall.rb:272:in `block (2 levels) in append'
        from /home/imobach/Proyectos/yast/repos/d-installer/service/vendor/bundle/ruby/3.1.0/gems/ruby-dbus-0.18.0.beta3/lib/dbus/marshall.rb:271:in `each'
        from /home/imobach/Proyectos/yast/repos/d-installer/service/vendor/bundle/ruby/3.1.0/gems/ruby-dbus-0.18.0.beta3/lib/dbus/marshall.rb:271:in `block in append'
        from /home/imobach/Proyectos/yast/repos/d-installer/service/vendor/bundle/ruby/3.1.0/gems/ruby-dbus-0.18.0.beta3/lib/dbus/marshall.rb:215:in `struct'
...

Could you, please, have a look? Thanks in advance!

mvidner added a commit to mvidner/ruby-dbus that referenced this issue Apr 20, 2022
agama-project/agama#126 (comment)
busctl get-property org.opensuse.DInstaller /org/opensuse/DInstaller/Language1 org.opensuse.DInstaller.Language1 AvailableLanguages
@mvidner
Copy link
Contributor

mvidner commented Apr 20, 2022

@imobachgs with this line added to Gemfile I can read all properties without error

gem "ruby-dbus", git: "https://github.com/mvidner/ruby-dbus.git", branch: "marshall-typed-array"

Please give it a try, and I'll release another beta soon :)

@imobachgs
Copy link
Contributor Author

It works great, thank you. However, we need to adapt the UI to those changes. I have done some changes, but it is not finished yet.

@mvidner
Copy link
Contributor

mvidner commented Apr 21, 2022

Released: https://rubygems.org/gems/ruby-dbus/versions/0.18.0.beta4
Factory SR https://build.opensuse.org/request/show/971689 is under review

@imobachgs
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants