qubes-core-admin-client icon indicating copy to clipboard operation
qubes-core-admin-client copied to clipboard

Add free-form text to qube for notes, comments, ...

Open alimirjamali opened this issue 9 months ago • 1 comments

qubesadmin part of adding free-form text to each qube for comments, notes, descriptions, remarks, reminders, etc.

fixes: https://github.com/QubesOS/qubes-issues/issues/899

alimirjamali avatar Feb 16 '25 16:02 alimirjamali

Codecov Report

Attention: Patch coverage is 96.61017% with 4 lines in your changes missing coverage. Please review.

Project coverage is 76.12%. Comparing base (16834f9) to head (ee39d27). Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
qubesadmin/backup/core3.py 20.00% 4 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #334      +/-   ##
==========================================
+ Coverage   75.80%   76.12%   +0.32%     
==========================================
  Files          52       53       +1     
  Lines        9080     9198     +118     
==========================================
+ Hits         6883     7002     +119     
+ Misses       2197     2196       -1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Feb 16 '25 17:02 codecov[bot]

@marmarek please let me know if you agree with qvm-notes syntax and options. So I can proceed with its unittests. in the meantime, I will write the unittests for the rest.

alimirjamali avatar May 01 '25 15:05 alimirjamali

Generally qvm-notes interface looks fine (based on its man page). I think append action needs a clarification regarding newlines if any are inserted automatically.

As for the implementation, IMO too many of the actions ask for confirmation. Maybe remove should, but others seems unnecessary.

marmarek avatar May 02 '25 15:05 marmarek

This is ready for review. Only 3 lines are not covered by tests but two lines are abstract lines (maybe I should add #pragma: no cover) and one other is for backup restore notes failure which is highly unlikely to happen (this is covered in lots of other places).

Generally qvm-notes interface looks fine (based on its man page). I think append action needs a clarification regarding newlines if any are inserted automatically.

This is done. I also added some more notes for better clarification

As for the implementation, IMO too many of the actions ask for confirmation. Maybe remove should, but others seems unnecessary.

Theoretically It is possible to check with get_notes and only ask for confirmation on set, delete & import actions that the action is going to replace existing note. On the other hand, it will require admin.vm.notes.Get permission. So I implemented your recommendation.

alimirjamali avatar May 02 '25 18:05 alimirjamali

@marmarek I just rebased this and excluded few irrelevant lines for codecov. Otherwise nothing is changed.

alimirjamali avatar May 21 '25 13:05 alimirjamali

OpenQA test summary

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

Test run included the following:

  • https://github.com/QubesOS/qubes-core-admin-client/pull/334 (https://github.com/QubesOS/qubes-core-admin-client/pull/334/commits/ee39d272ac4912653ddbe7d5f364ce8dd5dee08b)
  • https://github.com/QubesOS/qubes-manager/pull/398 (https://github.com/QubesOS/qubes-manager/pull/398/commits/679eff400bd0de4887f0bb61de34250a1f842709)
  • https://github.com/QubesOS/qubes-core-qrexec/pull/205 (https://github.com/QubesOS/qubes-core-qrexec/pull/205/commits/27facce1ccf74b80a442a601773d9e5e54fa083c)
  • https://github.com/QubesOS/qubes-mgmt-salt-base-topd/pull/15 (https://github.com/QubesOS/qubes-mgmt-salt-base-topd/pull/15/commits/44d09b1dbe0918c9013c301bf556900419f45bd6)
  • https://github.com/QubesOS/qubes-desktop-linux-manager/pull/258 (https://github.com/QubesOS/qubes-desktop-linux-manager/pull/258/commits/b636b0314b6ed9fbf81198efd0a0daf0be626009)
  • https://github.com/QubesOS/qubes-core-agent-linux/pull/573 (https://github.com/QubesOS/qubes-core-agent-linux/pull/573/commits/9f9916211338bb7dca437e8f3b99c5d719b4bee3)
  • https://github.com/QubesOS/qubes-core-admin-client/pull/332 (https://github.com/QubesOS/qubes-core-admin-client/pull/332/commits/e22c531c6eb2e0b5404b58295e499ca758627009)
  • https://github.com/QubesOS/qubes-core-agent-linux/pull/571 (https://github.com/QubesOS/qubes-core-agent-linux/pull/571/commits/f9a21b65a5f37f2f48251f5e31f85707759bfcc4)
  • https://github.com/QubesOS/qubes-manager/pull/423 (https://github.com/QubesOS/qubes-manager/pull/423/commits/7192b9a9673cc2973254d247c4aa3b51c1a01622)
  • https://github.com/QubesOS/qubes-core-admin/pull/681 (https://github.com/QubesOS/qubes-core-admin/pull/681/commits/06cf964f609911704ff81a8296c4f5b381f70836)
  • https://github.com/QubesOS/qubes-core-admin-client/pull/355 (https://github.com/QubesOS/qubes-core-admin-client/pull/355/commits/37e30300244b04133036eed797321fb062851a64)
  • https://github.com/QubesOS/qubes-gui-agent-linux/pull/228 (https://github.com/QubesOS/qubes-gui-agent-linux/pull/228/commits/6898bf9d51cf66dd77418901b465ed841dfd440a)
  • https://github.com/QubesOS/qubes-manager/pull/406 (https://github.com/QubesOS/qubes-manager/pull/406/commits/8e727b88f34b6d9e6cf4d80438f0406d0be282db)
  • https://github.com/QubesOS/qubes-core-admin/pull/660 (https://github.com/QubesOS/qubes-core-admin/pull/660/commits/b5e89704b5e4507b711277149742ee5e0afdec03)
  • https://github.com/QubesOS/qubes-gui-daemon/pull/163 (https://github.com/QubesOS/qubes-gui-daemon/pull/163/commits/1ddd88d5fe85adb5641061d3125bd44219a66fce)
  • https://github.com/QubesOS/qubes-manager/pull/421 (https://github.com/QubesOS/qubes-manager/pull/421/commits/2bed45c886640ae439096bc3a8673a68efaad776)
  • https://github.com/QubesOS/qubes-app-linux-split-gpg2/pull/25 (https://github.com/QubesOS/qubes-app-linux-split-gpg2/pull/25/commits/47259d4db72432b3955925ad3db62fb150f2a87e)
  • https://github.com/QubesOS/qubes-core-qrexec/pull/198 (https://github.com/QubesOS/qubes-core-qrexec/pull/198/commits/c717c927efec3bc3deff3cbc0c00db450eccb327)
  • https://github.com/QubesOS/qubes-core-admin-client/pull/351 (https://github.com/QubesOS/qubes-core-admin-client/pull/351/commits/abd1c6d49f2b5c4c97a52f29fe5b9828402d8157)

New failures, excluding unstable

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

  • system_tests_whonix

    • whonix_torbrowser: unnamed test (unknown)
    • whonix_torbrowser: Failed (test died) # Test died: no candidate needle with tag(s) 'anon-whonix-tor-brows...
  • system_tests_dispvm

  • system_tests_kde_gui_interactive

    • gui_keyboard_layout: wait_serial (wait serial expected) # wait_serial expected: "echo -e '[Layout]\nLayoutList=us,de' | sud...

    • gui_keyboard_layout: Failed (test died) # Test died: command 'test "$(cd ~user;ls e1*)" = "$(qvm-run -p wor...

  • system_tests_qwt_win10_seamless@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died) # Test died: no candidate needle with tag(s) 'windows-Edge-address-...
  • system_tests_qwt_win11@hw13

    • windows_install: wait_serial (wait serial expected) # wait_serial expected: qr/dcWzE-\d+-/...

    • windows_install: Failed (test died + timed out) # Test died: command 'script -e -c 'bash -x /usr/bin/qvm-create-win...

  • system_tests_gui_tools@hw7

    • qui_widgets_devices: unnamed test (unknown)
    • qui_widgets_devices: Failed (test died) # Test died: no candidate needle with tag(s) 'qui-devices-dev-opene...

Failed tests

18 failures
  • system_tests_whonix

    • whonix_torbrowser: unnamed test (unknown)
    • whonix_torbrowser: Failed (test died) # Test died: no candidate needle with tag(s) 'anon-whonix-tor-brows...
  • system_tests_dispvm

  • system_tests_kde_gui_interactive

    • gui_keyboard_layout: wait_serial (wait serial expected) # wait_serial expected: "echo -e '[Layout]\nLayoutList=us,de' | sud...

    • gui_keyboard_layout: Failed (test died) # Test died: command 'test "$(cd ~user;ls e1*)" = "$(qvm-run -p wor...

  • system_tests_qwt_win10_seamless@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died) # Test died: no candidate needle with tag(s) 'windows-Edge-address-...
  • system_tests_qwt_win11@hw13

    • windows_install: wait_serial (wait serial expected) # wait_serial expected: qr/dcWzE-\d+-/...

    • windows_install: Failed (test died + timed out) # Test died: command 'script -e -c 'bash -x /usr/bin/qvm-create-win...

  • system_tests_gui_tools@hw7

    • qui_widgets_devices: unnamed test (unknown)
    • qui_widgets_devices: Failed (test died) # Test died: no candidate needle with tag(s) 'qui-devices-dev-opene...

Fixed failures

Compared to: https://openqa.qubes-os.org/tests/132953#dependencies

14 fixed
  • system_tests_whonix

    • whonixcheck: fail (unknown) Whonixcheck for sys-whonix failed...

    • whonixcheck: unnamed test (unknown)

  • system_tests_suspend

    • suspend: unnamed test (unknown)
    • suspend: Failed (test died) # Test died: no candidate needle with tag(s) 'SUSPEND-FAILED' match...
  • system_tests_basic_vm_qrexec_gui

  • system_tests_qrexec

  • system_tests_kde_gui_interactive

    • clipboard_and_web: unnamed test (unknown)

    • clipboard_and_web: Failed (test died) # Test died: no candidate needle with tag(s) 'qubes-website' matche...

    • clipboard_and_web: wait_serial (wait serial expected) # wait_serial expected: "lspci; echo 2E8vz-\$?-"...

  • system_tests_guivm_vnc_gui_interactive

    • gui_filecopy: unnamed test (unknown)
    • gui_filecopy: Failed (test died) # Test died: no candidate needle with tag(s) 'files-work' matched...
  • system_tests_audio

  • system_tests_whonix@hw7

    • whonixcheck: fail (unknown) Whonixcheck for sys-whonix failed...

    • whonixcheck: unnamed test (unknown)

Unstable tests

  • system_tests_update

    update2/Failed (1/5 times with errors)
    • job 139051 # Test died: command 'script -c 'qubes-vm-update --force-update --l...
  • system_tests_update@hw1

    update2/Failed (1/5 times with errors)
    • job 139051 # Test died: command 'script -c 'qubes-vm-update --force-update --l...
  • system_tests_update@hw7

    update2/Failed (1/5 times with errors)
    • job 139051 # Test died: command 'script -c 'qubes-vm-update --force-update --l...
  • system_tests_update@hw13

    update2/Failed (1/5 times with errors)
    • job 139051 # Test died: command 'script -c 'qubes-vm-update --force-update --l...

Performance Tests

Performance degradation:

15 performance degradations
  • debian-12-xfce_exec: 8.56 :small_red_triangle: ( previous job: 7.12, degradation: 120.17%)
  • fedora-41-xfce_exec-data-duplex: 79.08 :small_red_triangle: ( previous job: 71.56, degradation: 110.51%)
  • dom0_root_seq1m_q8t1_read 3:read_bandwidth_kb: 214696.00 :small_red_triangle: ( previous job: 446963.00, degradation: 48.03%)
  • dom0_root_seq1m_q1t1_read 3:read_bandwidth_kb: 224919.00 :small_red_triangle: ( previous job: 294295.00, degradation: 76.43%)
  • dom0_varlibqubes_seq1m_q8t1_write 3:write_bandwidth_kb: 141171.00 :small_red_triangle: ( previous job: 250795.00, degradation: 56.29%)
  • dom0_varlibqubes_rnd4k_q1t1_write 3:write_bandwidth_kb: 3093.00 :small_red_triangle: ( previous job: 4903.00, degradation: 63.08%)
  • fedora-41-xfce_root_seq1m_q1t1_read 3:read_bandwidth_kb: 271230.00 :small_red_triangle: ( previous job: 318716.00, degradation: 85.10%)
  • fedora-41-xfce_root_seq1m_q1t1_write 3:write_bandwidth_kb: 39245.00 :small_red_triangle: ( previous job: 87940.00, degradation: 44.63%)
  • fedora-41-xfce_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 2673.00 :small_red_triangle: ( previous job: 3599.00, degradation: 74.27%)
  • fedora-41-xfce_private_seq1m_q8t1_write 3:write_bandwidth_kb: 143005.00 :small_red_triangle: ( previous job: 170062.00, degradation: 84.09%)
  • fedora-41-xfce_private_rnd4k_q32t1_write 3:write_bandwidth_kb: 1473.00 :small_red_triangle: ( previous job: 2215.00, degradation: 66.50%)
  • fedora-41-xfce_private_rnd4k_q1t1_write 3:write_bandwidth_kb: 795.00 :small_red_triangle: ( previous job: 1130.00, degradation: 70.35%)
  • fedora-41-xfce_volatile_seq1m_q8t1_write 3:write_bandwidth_kb: 120234.00 :small_red_triangle: ( previous job: 179949.00, degradation: 66.82%)
  • fedora-41-xfce_volatile_rnd4k_q32t1_write 3:write_bandwidth_kb: 2890.00 :small_red_triangle: ( previous job: 5672.00, degradation: 50.95%)
  • fedora-41-xfce_volatile_rnd4k_q1t1_write 3:write_bandwidth_kb: 1117.00 :small_red_triangle: ( previous job: 1953.00, degradation: 57.19%)

Remaining performance tests:

41 tests
  • debian-12-xfce_exec-root: 29.75 :small_red_triangle: ( previous job: 28.65, degradation: 103.83%)
  • debian-12-xfce_socket: 8.19 :green_circle: ( previous job: 8.60, improvement: 95.16%)
  • debian-12-xfce_socket-root: 7.81 :green_circle: ( previous job: 8.52, improvement: 91.56%)
  • debian-12-xfce_exec-data-simplex: 76.07 :small_red_triangle: ( previous job: 71.62, degradation: 106.21%)
  • debian-12-xfce_exec-data-duplex: 74.54 :small_red_triangle: ( previous job: 70.34, degradation: 105.96%)
  • debian-12-xfce_exec-data-duplex-root: 71.93 :green_circle: ( previous job: 82.72, improvement: 86.96%)
  • debian-12-xfce_socket-data-duplex: 147.66 :green_circle: ( previous job: 156.96, improvement: 94.08%)
  • fedora-41-xfce_exec: 9.63 :small_red_triangle: ( previous job: 9.27, degradation: 103.96%)
  • fedora-41-xfce_exec-root: 59.70 :green_circle: ( previous job: 61.51, improvement: 97.06%)
  • fedora-41-xfce_socket: 8.37 :green_circle: ( previous job: 8.63, improvement: 96.95%)
  • fedora-41-xfce_socket-root: 8.76 :small_red_triangle: ( previous job: 8.71, degradation: 100.58%)
  • fedora-41-xfce_exec-data-simplex: 75.95 :small_red_triangle: ( previous job: 75.53, degradation: 100.54%)
  • fedora-41-xfce_exec-data-duplex-root: 94.74 :green_circle: ( previous job: 109.13, improvement: 86.82%)
  • fedora-41-xfce_socket-data-duplex: 153.88 :small_red_triangle: ( previous job: 150.61, degradation: 102.17%)
  • dom0_root_seq1m_q8t1_write 3:write_bandwidth_kb: 140551.00 :green_circle: ( previous job: 129298.00, improvement: 108.70%)
  • dom0_root_seq1m_q1t1_write 3:write_bandwidth_kb: 142793.00 :green_circle: ( previous job: 95454.00, improvement: 149.59%)
  • dom0_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 95102.00 :green_circle: ( previous job: 79803.00, improvement: 119.17%)
  • dom0_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 7184.00 :green_circle: ( previous job: 6149.00, improvement: 116.83%)
  • dom0_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 12079.00 :green_circle: ( previous job: 10795.00, improvement: 111.89%)
  • dom0_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 4642.00 :small_red_triangle: ( previous job: 4826.00, degradation: 96.19%)
  • dom0_varlibqubes_seq1m_q8t1_read 3:read_bandwidth_kb: 505825.00 :green_circle: ( previous job: 382273.00, improvement: 132.32%)
  • dom0_varlibqubes_seq1m_q1t1_read 3:read_bandwidth_kb: 443560.00 :green_circle: ( previous job: 437636.00, improvement: 101.35%)
  • dom0_varlibqubes_seq1m_q1t1_write 3:write_bandwidth_kb: 204187.00 :green_circle: ( previous job: 184752.00, improvement: 110.52%)
  • dom0_varlibqubes_rnd4k_q32t1_read 3:read_bandwidth_kb: 92496.00 :green_circle: ( previous job: 62195.00, improvement: 148.72%)
  • dom0_varlibqubes_rnd4k_q32t1_write 3:write_bandwidth_kb: 10526.00 :green_circle: ( previous job: 6479.00, improvement: 162.46%)
  • dom0_varlibqubes_rnd4k_q1t1_read 3:read_bandwidth_kb: 7759.00 :green_circle: ( previous job: 7669.00, improvement: 101.17%)
  • fedora-41-xfce_root_seq1m_q8t1_read 3:read_bandwidth_kb: 375295.00 :green_circle: ( previous job: 368309.00, improvement: 101.90%)
  • fedora-41-xfce_root_seq1m_q8t1_write 3:write_bandwidth_kb: 187051.00 :green_circle: ( previous job: 162081.00, improvement: 115.41%)
  • fedora-41-xfce_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 86047.00 :green_circle: ( previous job: 82694.00, improvement: 104.05%)
  • fedora-41-xfce_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 8695.00 :green_circle: ( previous job: 8485.00, improvement: 102.47%)
  • fedora-41-xfce_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 488.00 :small_red_triangle: ( previous job: 542.00, degradation: 90.04%)
  • fedora-41-xfce_private_seq1m_q8t1_read 3:read_bandwidth_kb: 377185.00 :green_circle: ( previous job: 373957.00, improvement: 100.86%)
  • fedora-41-xfce_private_seq1m_q1t1_read 3:read_bandwidth_kb: 343795.00 :green_circle: ( previous job: 334687.00, improvement: 102.72%)
  • fedora-41-xfce_private_seq1m_q1t1_write 3:write_bandwidth_kb: 87088.00 :green_circle: ( previous job: 61534.00, improvement: 141.53%)
  • fedora-41-xfce_private_rnd4k_q32t1_read 3:read_bandwidth_kb: 84817.00 :green_circle: ( previous job: 80283.00, improvement: 105.65%)
  • fedora-41-xfce_private_rnd4k_q1t1_read 3:read_bandwidth_kb: 7690.00 :green_circle: ( previous job: 7540.00, improvement: 101.99%)
  • fedora-41-xfce_volatile_seq1m_q8t1_read 3:read_bandwidth_kb: 371440.00 :green_circle: ( previous job: 369868.00, improvement: 100.43%)
  • fedora-41-xfce_volatile_seq1m_q1t1_read 3:read_bandwidth_kb: 311797.00 :small_red_triangle: ( previous job: 324737.00, degradation: 96.02%)
  • fedora-41-xfce_volatile_seq1m_q1t1_write 3:write_bandwidth_kb: 29757.00 :green_circle: ( previous job: 17567.00, improvement: 169.39%)
  • fedora-41-xfce_volatile_rnd4k_q32t1_read 3:read_bandwidth_kb: 72455.00 :small_red_triangle: ( previous job: 79021.00, degradation: 91.69%)
  • fedora-41-xfce_volatile_rnd4k_q1t1_read 3:read_bandwidth_kb: 8489.00 :green_circle: ( previous job: 7867.00, improvement: 107.91%)

qubesos-bot avatar May 22 '25 11:05 qubesos-bot