Skip to content

qvm-appmenus: remove unstable-format gate for --get-available#72

Merged
marmarek merged 2 commits intoQubesOS:mainfrom
Jayant-kernel:feat-qvm-appmenus-no-kitten-10595
Mar 14, 2026
Merged

qvm-appmenus: remove unstable-format gate for --get-available#72
marmarek merged 2 commits intoQubesOS:mainfrom
Jayant-kernel:feat-qvm-appmenus-no-kitten-10595

Conversation

@Jayant-kernel
Copy link
Copy Markdown

Summary

Remove the runtime requirement for --i-understand-format-is-unstable when using qvm-appmenus --get-available.

This makes --get-available work directly, as requested in QubesOS/qubes-issues#10595.

What changed

  • qubesappmenus/__init__.py
    • Removed the args.fool gate and kitten error for --get-available.
    • Kept --i-understand-format-is-unstable as a backward-compatible no-op.
  • doc/tools/qvm-appmenus.rst
    • Updated --get-available docs to remove unstable/required-flag wording.
    • Removed unstable-format note from --file-field docs.
  • qubesappmenus/tests.py
    • Added unit test test_132_get_available_does_not_require_unstable_flag.

Why

Issue discussion confirms this output format should now be considered stable and no extra pledge flag is needed.

Validation

  • Added focused unit test for the changed CLI behavior.
  • Could not run tests in this environment because dependency xdg is missing (ModuleNotFoundError: No module named 'xdg').

AI usage disclosure

This change was prepared with AI assistance and manually reviewed before submission.

Closes QubesOS/qubes-issues#10595.

@Jayant-kernel
Copy link
Copy Markdown
Author

Jayant-kernel commented Mar 3, 2026

Pushed the small fix for #10595.

When you have a moment, could you please take a look? Happy to adjust anything needed.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 3, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 65.73%. Comparing base (3667bff) to head (e4cb94a).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
qubesappmenus/__init__.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
+ Coverage   62.07%   65.73%   +3.66%     
==========================================
  Files           2        2              
  Lines         683      683              
==========================================
+ Hits          424      449      +25     
+ Misses        259      234      -25     
Flag Coverage Δ
unittests 65.73% <50.00%> (+3.66%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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
Copy link
Copy Markdown

Please squash the commits.

Comment thread qubesappmenus/__init__.py
'--i-understand-format-is-unstable', dest='fool',
action='store_true',
help='required pledge for --get-available')
help='deprecated no-op for backward compatibility')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please use "deprecated" option: https://docs.python.org/3/library/argparse.html#deprecated. This is only available in python3.13 and therefore cannot be backported to R4.2.

Comment thread qubesappmenus/tests.py Outdated
app = TestApp()
app.domains = {vm.name: vm}

parse_args.return_value = types.SimpleNamespace(
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Are all of the options below necessary to be specified explicitly? Seems a bit verbose.

@Jayant-kernel Jayant-kernel force-pushed the feat-qvm-appmenus-no-kitten-10595 branch from d1fb07e to 60050d4 Compare March 5, 2026 14:55
@Jayant-kernel
Copy link
Copy Markdown
Author

@ben-grande
Rereview the changes

@Jayant-kernel Jayant-kernel requested a review from ben-grande March 5, 2026 14:56
@ben-grande
Copy link
Copy Markdown

Please check the changes you pushed. They haven't addressed my concerns. Clicking on the lastest compare shows no changes: https://github.com/QubesOS/qubes-desktop-linux-common/compare/d1fb07e895b2a6c6c1e9a1fdc5eee333ca617e31..60050d4afd05d7f159916380461233218f922778

@Jayant-kernel
Copy link
Copy Markdown
Author

Jayant-kernel commented Mar 6, 2026

Hi @ben-grande,
addressed both points and added a manual stderr warning for the deprecated flag (since deprecated= needs Python 3.13), and simplified the test to call main() directly with real CLI args instead of the verbose mock.
Are the changes okay

@ben-grande
Copy link
Copy Markdown

dded a manual stderr warning for the deprecated flag (since deprecated= needs Python 3.13)

I think that only Fedora GUIVM is supported (last time I tried to use debian, a lot of things were broken). Only debian-12 doesn't have python3.13. As I think that will break tests, will leave as is.

--get-available no longer requires --i-understand-format-is-unstable.
The flag is kept as a deprecated no-op for backward compatibility and
prints a warning to stderr when used.

Fixes QubesOS/qubes-issues#10595
@qubesos-bot
Copy link
Copy Markdown

qubesos-bot commented Mar 9, 2026

OpenQA test summary

Complete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026031319-4.3-debian&flavor=pull-requests

Test run included the following:

New failures, excluding unstable

Compared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026020304-devel&flavor=update

Failed tests

No failures!

Fixed failures

Compared to: https://openqa.qubes-os.org/tests/166096#dependencies
Nothing fixed

Unstable tests

Details

Performance Tests

Performance degradation:

No issues

Remaining performance tests:

13 tests
  • debian-13-xfce_dom0-dispvm-api (mean:6.539): 78.47 🟢 ( previous job: 79.83, improvement: 98.29%)
  • debian-13-xfce_dom0-dispvm-gui-api (mean:7.827): 93.92 🔻 ( previous job: 92.49, degradation: 101.55%)
  • debian-13-xfce_dom0-dispvm-preload-2-api (mean:3.149): 37.79 🟢 ( previous job: 44.94, improvement: 84.08%)
  • debian-13-xfce_dom0-dispvm-preload-2-delay-0-api (mean:2.917): 35.00 🟢 ( previous job: 41.46, improvement: 84.42%)
  • debian-13-xfce_dom0-dispvm-preload-2-delay-minus-1d2-api (mean:3.307): 39.69 🟢 ( previous job: 47.01, improvement: 84.43%)
  • debian-13-xfce_dom0-dispvm-preload-4-api (mean:2.284): 27.41 🟢 ( previous job: 37.67, improvement: 72.75%)
  • debian-13-xfce_dom0-dispvm-preload-4-delay-0-api (mean:2.809): 33.71 🟢 ( previous job: 36.76, improvement: 91.71%)
  • debian-13-xfce_dom0-dispvm-preload-4-delay-minus-1d2-api (mean:2.441): 29.29 🟢 ( previous job: 37.87, improvement: 77.36%)
  • debian-13-xfce_dom0-dispvm-preload-2-gui-api (mean:4.989): 59.87 🔻 ( previous job: 55.58, degradation: 107.71%)
  • debian-13-xfce_dom0-dispvm-preload-4-gui-api (mean:4.135): 49.62 🔻 ( previous job: 47.73, degradation: 103.97%)
  • debian-13-xfce_dom0-dispvm-preload-6-gui-api (mean:4.198): 50.38 🔻 ( previous job: 47.11, degradation: 106.93%)
  • debian-13-xfce_dom0-vm-api (mean:0.038): 0.45 🔻 ( previous job: 0.41, degradation: 109.93%)
  • debian-13-xfce_dom0-vm-gui-api (mean:0.039): 0.47 🟢 ( previous job: 0.48, improvement: 96.67%)

@ben-grande
Copy link
Copy Markdown

system_tests_extra

* TC_00_Appmenus: [test_132_get_available_does_not_require_unstable_flag](https://openqa.qubes-os.org/tests/169502#step/TC_00_Appmenus/17) (error)
  `~~~~~~~~~^^^^^^^^... SystemExit: 2`

https://openqa.qubes-os.org/tests/169502#step/TC_00_Appmenus/17

The integration test runs as root. Apparently, other tests don't have to deal with that because they are not invoking calling main(). I think it is okay to use --force-root in this case.

@Jayant-kernel
Copy link
Copy Markdown
Author

Jayant-kernel commented Mar 12, 2026

Addressed the OpenQA failure in TC_00_Appmenus.test_132_get_available_does_not_require_unstable_flag.

couse bec of this test invokes qvm-appmenus.main() directly, and OpenQA integration runs as root. Without --force-root, argparse exits with SystemExit: 2.

Fix in commit e4cb94a:

  • Updated test invocation to include --force-root:
    • qubesappmenus.main(['--force-root', '--get-available', vm.name], app=self.app)

This keeps behavior unchanged for users and only makes the integration test valid under root-run environment.

@marmarek
Copy link
Copy Markdown
Member

PipelineRetry

@marmarek
Copy link
Copy Markdown
Member

This one is okay, now please remove usage of this option from qubes-manager and qubes-desktop-linux-manager repositories.

@marmarek marmarek merged commit 75c9924 into QubesOS:main Mar 14, 2026
3 of 5 checks passed
marmarek added a commit to QubesOS/qubes-manager that referenced this pull request Mar 30, 2026
* origin/pr/446:
  appmenu_select: remove --i-understand-format-is-unstable flag

Pull request description:

The `--i-understand-format-is-unstable` flag is no longer needed after QubesOS/qubes-desktop-linux-common#72 removed the unstable-format gate for `--get-available`. Remove the now-redundant flag from the command invocation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the need to sacrifice a cute kitten (and to understand-that-format-is-unstable) with qvm-appmenus

4 participants