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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
zbus update and a fix #412
Conversation
Hi @zeenix , Thank you so much, PR looks good but CI is red. |
Thanks for the quick response. |
Ah, I think I know the issue: with tight On a related note, are there plans to make good use of tokio and async/await? |
Not really? The API process for firewalld is very synchronous - we can't do much while waiting for responses from the server. Thanks for this, by the way - I've really been neglecting the firewalld/dbus bits of the project. |
The main problem with zbus is the MSRV requirement, which makes it impossible to build on stock debian/ubuntu, see #355 and the ubuntu20_build job |
Ah ok. There is
No worries.
Most of the MSRV bumps were not planned ones but we tackled the issue of unintentional bumps a month back. What's left now is to decide how recent an MSRV we can require w/o breaking things for debian. If 6 months old releases are OK then that's good enough for me as well. |
I'm having a bit of difficulty figuring out the latest MSRV that would be good for debian. Could you please let me know which version is that and I'll see if I can port to that version? |
For ubuntu 2004 at least it seems to be 1.59 at the moment: https://packages.ubuntu.com/focal/rustc. |
Agreed and I've a much better chance of succeeding. :) I'll see what I can do. |
I briefly looked into what 1.60 features zbus depends on and one that seems impossible to port back from (w/o it being a breaking change) is use of |
Can we just wait for ubuntu to update the version? Looks like 22.10 ships with rust v1.61 so I guess we could wait and see if they will backport it to the other ubuntu versions as well. |
Oh you will not hear any objections from me. :) I'm not a user of this crate at all (tbh I keep forgetting what the crate is really about even). I just saw this crate appear as a dependent crate on crates.io for zbus, and then saw that it's still on 2.x so I decided to help out. |
I very much appreciate that, thanks for this contribution and your work on the zbus crate. |
Seems they've done that already. I rebased again my work (was trivial actually) so if the Ubuntu20 CI jobs still fails, maybe it needs an update? |
oh, I had forgotten that the issue wasn't just that they don't ship Rust 1.60 but rather that they don't ship zbus 3. Since they do have the MSRV for zbus 3, they should be able to upgrade now. |
@Luap99 I feel like there is a bit of a chicken&egg situation involved if you want to only depend on rust crates already packaged in the distro. Wouldn't it be better to leave that problem to distros themselves and just ensure that this project along w/ all its deps can be built with Rust tools available in the distro in question? |
Wait, the debian/ubuntu cargo install does not use the official crates.io index? Do they only pull from debian sources? If this is the case I agree we should not wait for them. I only care about a to fast moving MSRV. |
Hmm, maybe this error is caused by rust-lang/cargo#10623? |
The latest version should be 1.61 in ubuntu 2004, however our image is not updating on quay.io? https://quay.io/repository/libpod/ubuntu20rust |
I am not sure about the details but the CI clearly shows that current failure is about too old zbus. Otherwise, we'd have this resolved 22 days ago. :) |
Ah, makes sense. |
As we have it checked in the CI now in zbus, accidental bumps hopefully would never happen anymore and I don't intend to bump to too new MSRV, no matter how appealing a new feature might be. :) I promise you that. :) I think a 6 months grace period is good enough in the Rust world but I'll still first check availability in Ubuntu LTS before bumping. |
Yes we should be good in the future, I look into why the quay.io auto builder did not rebuild the image so far. In any case could you rebase this PR, we no longer use tokio for netlink and just make blocking calls. |
Sure.
Interesting. |
Use it through zbus to ensure it's always compatible with the zbus version being used. Signed-off-by: Zeeshan Ali <zeeshanak@gnome.org>
3.x is the latest stable and supported release cycle. Signed-off-by: Zeeshan Ali <zeeshanak@gnome.org>
Instead of wrapping async calls in block_on manually. This also fixes the issue of zbus using tokio API underneath and failing because of these APIs assuming a tokio runtime context. Signed-off-by: Zeeshan Ali <zeeshanak@gnome.org>
This also drops a few subcrate deps. Signed-off-by: Zeeshan Ali Khan <zeeshanak@gnome.org>
Done. I'm afraid porting to 3 doesn't provide any other benefits than just using the latest and supported release cycle. The commit that switches to use of zbus' blocking wrapper does allow dropping some deps though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99, mheon, zeenix The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Yay! |
Hi there,
zbus maintainer here. 馃憢 I wanted to help out a bit with zbus part of this project so providing this PR.