Skip to content

Handle more events and deprecate Transient state - #480

Open
ben-grande wants to merge 4 commits into
QubesOS:mainfrom
ben-grande:transient
Open

Handle more events and deprecate Transient state#480
ben-grande wants to merge 4 commits into
QubesOS:mainfrom
ben-grande:transient

Conversation

@ben-grande

@ben-grande ben-grande commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

ben-grande added a commit to ben-grande/qubes-desktop-linux-manager that referenced this pull request Jul 15, 2026
Cache events to allow caching power state and avoid extra API calls.
With that, also trust the client to return us the appropriate power
state that it set on the event, instead of making derivative tools roll
their own state definition.

Fixes: QubesOS/qubes-issues#10977
Fixes: QubesOS/qubes-issues#10978
For: QubesOS/qubes-issues#10966
Requires: QubesOS/qubes-core-admin-client#480
ben-grande added a commit to ben-grande/qubes-desktop-linux-manager that referenced this pull request Jul 15, 2026
@ben-grande ben-grande linked an issue Jul 15, 2026 that may be closed by this pull request
ben-grande added a commit to ben-grande/qubes-desktop-linux-menu that referenced this pull request Jul 15, 2026
Cache events to allow caching power state and avoid extra API calls.
With that, also trust the client to return us the appropriate power
state that it set on the event, instead of making derivative tools roll
their own state definition.

Fixes: QubesOS/qubes-issues#10979
For: QubesOS/qubes-issues#10966
Requires: QubesOS/qubes-core-admin-client#480
ben-grande added a commit to ben-grande/qubes-desktop-linux-menu that referenced this pull request Jul 15, 2026
ben-grande added a commit to ben-grande/qubes-desktop-linux-manager that referenced this pull request Jul 15, 2026
Cache events to allow caching power state and avoid extra API calls.
With that, also trust the client to return us the appropriate power
state that it set on the event, instead of making derivative tools roll
their own state definition.

Fixes: QubesOS/qubes-issues#10977
Fixes: QubesOS/qubes-issues#10978
For: QubesOS/qubes-issues#10966
Requires: QubesOS/qubes-core-admin-client#480
ben-grande added a commit to ben-grande/qubes-desktop-linux-manager that referenced this pull request Jul 15, 2026
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.22222% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.73%. Comparing base (ab514c1) to head (ca85d07).

Files with missing lines Patch % Lines
qubesadmin/app.py 54.54% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #480      +/-   ##
==========================================
+ Coverage   76.71%   76.73%   +0.01%     
==========================================
  Files          53       53              
  Lines        9430     9438       +8     
==========================================
+ Hits         7234     7242       +8     
  Misses       2196     2196              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ben-grande
ben-grande marked this pull request as ready for review July 23, 2026 13:25
ben-grande added a commit to ben-grande/qubes-desktop-linux-menu that referenced this pull request Jul 24, 2026
"Transient" state will be fully deprecated on Qubes R5.0. For now,
"Halting" is received but "Staring" is not received yet.

For: QubesOS/qubes-issues#10966
Requires: QubesOS/qubes-core-admin-client#480
ben-grande added a commit to ben-grande/qubes-desktop-linux-manager that referenced this pull request Jul 24, 2026
Cache events to allow caching power state and avoid extra API calls.
With that, also trust the client to return us the appropriate power
state that it set on the event, instead of making derivative tools roll
their own state definition.

Fixes: QubesOS/qubes-issues#10977
Fixes: QubesOS/qubes-issues#10978
For: QubesOS/qubes-issues#10966
Requires: QubesOS/qubes-core-admin-client#480
ben-grande added a commit to ben-grande/qubes-desktop-linux-manager that referenced this pull request Jul 24, 2026
"Transient" state will be fully deprecated on Qubes R5.0. For now,
"Halting" is received but "Staring" is not received yet.

For: QubesOS/qubes-issues#10966
Requires: QubesOS/qubes-core-admin-client#480
ben-grande added a commit to ben-grande/qubes-manager that referenced this pull request Jul 24, 2026
"Transient" state will be fully deprecated on Qubes R5.0. For now,
"Halting" is received but "Staring" is not received yet.

For: QubesOS/qubes-issues#10966
Requires: QubesOS/qubes-core-admin-client#480
ben-grande added a commit to ben-grande/qubes-mgmt-salt-dom0-qvm that referenced this pull request Jul 24, 2026
"Transient" state will be fully deprecated on Qubes R5.0. For now,
"Halting" is received but "Staring" is not received yet.

As a bonus, for argument choices, depend on core-admin-client to have
the most up-to-date list.

For: QubesOS/qubes-issues#10966
Requires: QubesOS/qubes-core-admin-client#480
ben-grande added a commit to ben-grande/qubes-desktop-linux-manager that referenced this pull request Jul 24, 2026
Cache events to allow caching power state and avoid extra API calls.
With that, also trust the client to return us the appropriate power
state that it set on the event, instead of making derivative tools roll
their own state definition.

Fixes: QubesOS/qubes-issues#10977
Fixes: QubesOS/qubes-issues#10978
For: QubesOS/qubes-issues#10966
Requires: QubesOS/qubes-core-admin-client#480
ben-grande added a commit to ben-grande/qubes-desktop-linux-manager that referenced this pull request Jul 24, 2026
"Transient" state will be fully deprecated on Qubes R5.0. For now,
"Halting" is received but "Staring" is not received yet.

For: QubesOS/qubes-issues#10966
Requires: QubesOS/qubes-core-admin-client#480
ben-grande added a commit to ben-grande/qubes-desktop-linux-menu that referenced this pull request Jul 29, 2026
Using EventsDispatcher enables caching of properties, including qube
state. With that, also trust the client to return us the appropriate
power state that it set on the event, instead of making derivative tools
roll their own state definition.

Fixes: QubesOS/qubes-issues#10979
For: QubesOS/qubes-issues#10966
Requires: QubesOS/qubes-core-admin-client#480
ben-grande added a commit to ben-grande/qubes-desktop-linux-menu that referenced this pull request Jul 29, 2026
"Transient" state will be fully deprecated on Qubes R5.0. For now,
"Halting" is received but "Staring" is not received yet.

For: QubesOS/qubes-issues#10966
Requires: QubesOS/qubes-core-admin-client#480
ben-grande added a commit to ben-grande/qubes-desktop-linux-manager that referenced this pull request Jul 30, 2026
Cache events to allow caching power state and avoid extra API calls.
With that, also trust the client to return us the appropriate power
state that it set on the event, instead of making derivative tools roll
their own state definition.

Fixes: QubesOS/qubes-issues#10977
Fixes: QubesOS/qubes-issues#10978
For: QubesOS/qubes-issues#10966
Requires: QubesOS/qubes-core-admin-client#480
ben-grande added a commit to ben-grande/qubes-desktop-linux-manager that referenced this pull request Jul 30, 2026
"Transient" state will be fully deprecated on Qubes R5.0. For now,
"Halting" is received but "Staring" is not received yet.

For: QubesOS/qubes-issues#10966
Requires: QubesOS/qubes-core-admin-client#480
When checking libvirt event callbacks, VIR_DOMAIN_EVENT_STOPPED is the
only event called when shutting down or destroying/killing a domain, so
the state transitions from Running->Halted, therefore, never sending
"Halting" or "Dying".

I checked the clients, and only qubes-manager uses "Dying", but it has a
"Halting" equivalent, which all translate to the same visuals as
"Transient".
Variables set on the module level so it can be reused by other clients.
Besides the name "Transient" means impermanent, it could as well take a
long time in case the qrexec agent on the qube broke. Also it doesn't
help anything knowing that via the power state, it should be broadcasted
in another manner. It also doesn't tell the clients why it is in a
transient state, while "Starting" and "Halting" really does tell us what
is happening.

On Qubes R5.0, there will be no "Transient" state, it will be fully
replaced by "Starting".

For: QubesOS/qubes-issues#10964
For: QubesOS/qubes-issues#10966
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.

Improve handling of Transient power state API client that enables caching always sets the state after unpause to Running when it could be Transient

1 participant