Skip to content

Problem: dbus call were not async #595

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

Merged
merged 6 commits into from
Apr 22, 2024
Merged

Problem: dbus call were not async #595

merged 6 commits into from
Apr 22, 2024

Conversation

olethanh
Copy link
Collaborator

dbus call to systemd were not called asyncronously and thus were hanging the whole thing

Modify all call to asynchronous, this required switching from
python-dbus to dbus-fast which offer an asyncio backend.

Another adventage of dbus-fast is that is in pure python so won't require libdbus or compilation (also it is packaged in ubuntu & debian )

dbus call to systemd were not called asyncronously.

Modify all call to asynchronous, this required switching from
python-dbus to dbus-fast which offer an asyncio backend.
Copy link

codecov bot commented Apr 10, 2024

Codecov Report

Attention: Patch coverage is 53.50877% with 53 lines in your changes are missing coverage. Please review.

Project coverage is 44.04%. Comparing base (0f77070) to head (f8c9343).

Files Patch % Lines
src/aleph/vm/systemd.py 54.46% 44 Missing and 7 partials ⚠️
src/aleph/vm/pool.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #595      +/-   ##
==========================================
+ Coverage   43.83%   44.04%   +0.21%     
==========================================
  Files          55       55              
  Lines        4944     5018      +74     
  Branches      585      594       +9     
==========================================
+ Hits         2167     2210      +43     
- Misses       2658     2683      +25     
- Partials      119      125       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Failed to retrieve llama text: POST 504:

504 Gateway Time-out


The server didn't respond in time.

Copy link
Member

@hoh hoh left a comment

Choose a reason for hiding this comment

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

This seem to bring nice properties in addition to fixing the core issues.

Looks like you wrote a lot of Systemd specific boilerplate 🤔
Is there an easy way to push that upstream ?

@olethanh
Copy link
Collaborator Author

olethanh commented Apr 15, 2024

This seem to bring nice properties in addition to fixing the core issues.

Looks like you wrote a lot of Systemd specific boilerplate 🤔 Is there an easy way to push that upstream ?

Upstream is a generic lib for dbus and not fixated on any particular interface. I could split this in another python file if you prefer

@hoh hoh merged commit dc961fc into main Apr 22, 2024
@Psycojoker Psycojoker deleted the ol-dbus-async branch July 24, 2024 15:37
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.

2 participants