qubes-core-agent-linux icon indicating copy to clipboard operation
qubes-core-agent-linux copied to clipboard

Disable (in updatevm) dnf ANSI coloring of output

Open alimirjamali opened this issue 6 months ago • 4 comments

Since dnf5 does a lot of coloring of output, it is better to disable it for UpdateVM as it messes the outputs of many actions such as: qubes-dom0-update --action=search|list|...

improves: https://github.com/QubesOS/qubes-issues/issues/9482

alimirjamali avatar May 14 '25 16:05 alimirjamali

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.68%. Comparing base (4fb6c15) to head (9f99162).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #573      +/-   ##
==========================================
- Coverage   71.10%   70.68%   -0.42%     
==========================================
  Files           3        3              
  Lines         481      481              
==========================================
- Hits          342      340       -2     
- Misses        139      141       +2     

: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 May 14 '25 16:05 codecov[bot]

I have dnf5 5.2.13.1 and dnf5 --color=never search edit still uses color output (marks the "edit" word in green). Similarly qubes-dom0-update --action=search edit with this PR.

marmarek avatar May 19 '25 02:05 marmarek

OpenQA test summary

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

Test run included the following:

  • 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-linux-utils/pull/124 (https://github.com/QubesOS/qubes-linux-utils/pull/124/commits/d1af3f7775933b3856affab6e811779841b2f742)
  • https://github.com/QubesOS/qubes-core-agent-linux/pull/574 (https://github.com/QubesOS/qubes-core-agent-linux/pull/574/commits/6dca8b6be522f9372c260f7fb520777da6e9b110)
  • 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-app-linux-split-gpg2/pull/25 (https://github.com/QubesOS/qubes-app-linux-split-gpg2/pull/25/commits/47259d4db72432b3955925ad3db62fb150f2a87e)
  • 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-manager/pull/406 (https://github.com/QubesOS/qubes-manager/pull/406/commits/8c4cd254ed130f051e545d6729b1aa3e00d6ebcc)
  • 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-core-admin-client/pull/355 (https://github.com/QubesOS/qubes-core-admin-client/pull/355/commits/37e30300244b04133036eed797321fb062851a64)
  • 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-manager/pull/423 (https://github.com/QubesOS/qubes-manager/pull/423/commits/7192b9a9673cc2973254d247c4aa3b51c1a01622)
  • 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-gui-agent-linux/pull/228 (https://github.com/QubesOS/qubes-gui-agent-linux/pull/228/commits/6898bf9d51cf66dd77418901b465ed841dfd440a)
  • https://github.com/QubesOS/qubes-manager/pull/398 (https://github.com/QubesOS/qubes-manager/pull/398/commits/679eff400bd0de4887f0bb61de34250a1f842709)
  • 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-core-admin/pull/681 (https://github.com/QubesOS/qubes-core-admin/pull/681/commits/06cf964f609911704ff81a8296c4f5b381f70836)

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_network_updates

    • TC_00_Dom0Upgrade_archlinux: test_000_update (failure) AssertionError: qubes-dom0-update failed: Using test-inst-updatevm ...

    • TC_00_Dom0Upgrade_archlinux: test_001_update_check (failure) ^... AssertionError: '' is not true

    • TC_00_Dom0Upgrade_archlinux: test_005_update_flag_clear (failure) AssertionError: qubes-dom0-update failed: Using test-inst-updatevm ...

    • TC_00_Dom0Upgrade_archlinux: test_006_update_flag_clear (failure) AssertionError: qubes-dom0-update failed: Using test-inst-updatevm ...

    • TC_00_Dom0Upgrade_archlinux: test_010_instal (failure) AssertionError: qubes-dom0-update failed: Using test-inst-updatevm ...

    • TC_10_QvmTemplate_archlinux: test_000_template_list (failure) AssertionError: qvm-template failed: [Qrexec] ERROR: dnf command is...

    • TC_10_QvmTemplate_archlinux: test_010_template_install (failure) AssertionError: qvm-template failed: [Qrexec] ERROR: dnf command is...

    • TC_11_QvmTemplateMgmtVM_archlinux: test_000_template_list (failure) AssertionError: qvm-template failed: [Qrexec] ERROR: dnf command is...

    • TC_11_QvmTemplateMgmtVM_archlinux: test_010_template_install (failure) AssertionError: qvm-template failed: [Qrexec] ERROR: dnf command is...

    • VmUpdates_archlinux: test_020_updates_available_notification (failure) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^... AssertionError: '1' is not false

  • system_tests_dispvm

  • system_tests_audio

  • system_tests_audio@hw1

  • 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

    • startup: unnamed test (unknown)
    • startup: Failed (test died) # Test died: no candidate needle with tag(s) 'login-prompt-user-sel...
  • system_tests_gui_tools@hw7

    • qubesmanager_vmsettings: unnamed test (unknown)
    • qubesmanager_vmsettings: Failed (test died) # Test died: no candidate needle with tag(s) 'vm-settings-devices-s...
  • 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: unnamed test (unknown)

    • gui_keyboard_layout: Failed (test died) # Test died: no candidate needle with tag(s) 'work-xterm, work-xter...

  • system_tests_misc

    • TC_06_AppVM_archlinux: test_020_custom_persist (failure) AssertionError: Too much / too little files persisted: b'test1\ntes...

Failed tests

55 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_network_updates

    • TC_00_Dom0Upgrade_archlinux: test_000_update (failure) AssertionError: qubes-dom0-update failed: Using test-inst-updatevm ...

    • TC_00_Dom0Upgrade_archlinux: test_001_update_check (failure) ^... AssertionError: '' is not true

    • TC_00_Dom0Upgrade_archlinux: test_005_update_flag_clear (failure) AssertionError: qubes-dom0-update failed: Using test-inst-updatevm ...

    • TC_00_Dom0Upgrade_archlinux: test_006_update_flag_clear (failure) AssertionError: qubes-dom0-update failed: Using test-inst-updatevm ...

    • TC_00_Dom0Upgrade_archlinux: test_010_instal (failure) AssertionError: qubes-dom0-update failed: Using test-inst-updatevm ...

    • TC_10_QvmTemplate_archlinux: test_000_template_list (failure) AssertionError: qvm-template failed: [Qrexec] ERROR: dnf command is...

    • TC_10_QvmTemplate_archlinux: test_010_template_install (failure) AssertionError: qvm-template failed: [Qrexec] ERROR: dnf command is...

    • TC_11_QvmTemplateMgmtVM_archlinux: test_000_template_list (failure) AssertionError: qvm-template failed: [Qrexec] ERROR: dnf command is...

    • TC_11_QvmTemplateMgmtVM_archlinux: test_010_template_install (failure) AssertionError: qvm-template failed: [Qrexec] ERROR: dnf command is...

    • VmUpdates_archlinux: test_020_updates_available_notification (failure) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^... AssertionError: '1' is not false

  • system_tests_dispvm

  • system_tests_audio

  • system_tests_audio@hw1

  • 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

    • startup: unnamed test (unknown)
    • startup: Failed (test died) # Test died: no candidate needle with tag(s) 'login-prompt-user-sel...
  • system_tests_gui_tools@hw7

    • qubesmanager_vmsettings: unnamed test (unknown)
    • qubesmanager_vmsettings: Failed (test died) # Test died: no candidate needle with tag(s) 'vm-settings-devices-s...
  • 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: unnamed test (unknown)

    • gui_keyboard_layout: Failed (test died) # Test died: no candidate needle with tag(s) 'work-xterm, work-xter...

  • system_tests_misc

    • TC_06_AppVM_archlinux: test_020_custom_persist (failure) AssertionError: Too much / too little files persisted: b'test1\ntes...

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_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)

  • 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-\$?-"...

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:

14 performance degradations
  • dom0_root_seq1m_q8t1_read 3:read_bandwidth_kb: 152271.00 :small_red_triangle: ( previous job: 446963.00, degradation: 34.07%)
  • dom0_root_seq1m_q1t1_read 3:read_bandwidth_kb: 48528.00 :small_red_triangle: ( previous job: 294295.00, degradation: 16.49%)
  • dom0_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 4201.00 :small_red_triangle: ( previous job: 79803.00, degradation: 5.26%)
  • dom0_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 9599.00 :small_red_triangle: ( previous job: 10795.00, degradation: 88.92%)
  • dom0_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 1558.00 :small_red_triangle: ( previous job: 4826.00, degradation: 32.28%)
  • dom0_varlibqubes_seq1m_q8t1_read 3:read_bandwidth_kb: 244594.00 :small_red_triangle: ( previous job: 382273.00, degradation: 63.98%)
  • dom0_varlibqubes_seq1m_q8t1_write 3:write_bandwidth_kb: 119281.00 :small_red_triangle: ( previous job: 250795.00, degradation: 47.56%)
  • dom0_varlibqubes_rnd4k_q32t1_write 3:write_bandwidth_kb: 5699.00 :small_red_triangle: ( previous job: 6479.00, degradation: 87.96%)
  • fedora-41-xfce_root_rnd4k_q32t1_read 3:read_bandwidth_kb: 63285.00 :small_red_triangle: ( previous job: 82694.00, degradation: 76.53%)
  • fedora-41-xfce_private_seq1m_q1t1_read 3:read_bandwidth_kb: 277401.00 :small_red_triangle: ( previous job: 334687.00, degradation: 82.88%)
  • fedora-41-xfce_private_rnd4k_q32t1_read 3:read_bandwidth_kb: 46891.00 :small_red_triangle: ( previous job: 80283.00, degradation: 58.41%)
  • fedora-41-xfce_volatile_rnd4k_q32t1_read 3:read_bandwidth_kb: 34293.00 :small_red_triangle: ( previous job: 79021.00, degradation: 43.40%)
  • fedora-41-xfce_volatile_rnd4k_q32t1_write 3:write_bandwidth_kb: 3079.00 :small_red_triangle: ( previous job: 5672.00, degradation: 54.28%)
  • fedora-41-xfce_volatile_rnd4k_q1t1_write 3:write_bandwidth_kb: 535.00 :small_red_triangle: ( previous job: 1953.00, degradation: 27.39%)

Remaining performance tests:

26 tests
  • dom0_root_seq1m_q8t1_write 3:write_bandwidth_kb: 169116.00 :green_circle: ( previous job: 129298.00, improvement: 130.80%)
  • dom0_root_seq1m_q1t1_write 3:write_bandwidth_kb: 96511.00 :green_circle: ( previous job: 95454.00, improvement: 101.11%)
  • dom0_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 5872.00 :small_red_triangle: ( previous job: 6149.00, degradation: 95.50%)
  • dom0_varlibqubes_seq1m_q1t1_read 3:read_bandwidth_kb: 398546.00 :small_red_triangle: ( previous job: 437636.00, degradation: 91.07%)
  • dom0_varlibqubes_seq1m_q1t1_write 3:write_bandwidth_kb: 176319.00 :small_red_triangle: ( previous job: 184752.00, degradation: 95.44%)
  • dom0_varlibqubes_rnd4k_q32t1_read 3:read_bandwidth_kb: 105768.00 :green_circle: ( previous job: 62195.00, improvement: 170.06%)
  • dom0_varlibqubes_rnd4k_q1t1_read 3:read_bandwidth_kb: 8360.00 :green_circle: ( previous job: 7669.00, improvement: 109.01%)
  • dom0_varlibqubes_rnd4k_q1t1_write 3:write_bandwidth_kb: 4498.00 :small_red_triangle: ( previous job: 4903.00, degradation: 91.74%)
  • fedora-41-xfce_root_seq1m_q8t1_read 3:read_bandwidth_kb: 384234.00 :green_circle: ( previous job: 368309.00, improvement: 104.32%)
  • fedora-41-xfce_root_seq1m_q8t1_write 3:write_bandwidth_kb: 214916.00 :green_circle: ( previous job: 162081.00, improvement: 132.60%)
  • fedora-41-xfce_root_seq1m_q1t1_read 3:read_bandwidth_kb: 304730.00 :small_red_triangle: ( previous job: 318716.00, degradation: 95.61%)
  • fedora-41-xfce_root_seq1m_q1t1_write 3:write_bandwidth_kb: 87076.00 :small_red_triangle: ( previous job: 87940.00, degradation: 99.02%)
  • fedora-41-xfce_root_rnd4k_q32t1_write 3:write_bandwidth_kb: 3754.00 :green_circle: ( previous job: 3599.00, improvement: 104.31%)
  • fedora-41-xfce_root_rnd4k_q1t1_read 3:read_bandwidth_kb: 8055.00 :small_red_triangle: ( previous job: 8485.00, degradation: 94.93%)
  • fedora-41-xfce_root_rnd4k_q1t1_write 3:write_bandwidth_kb: 1480.00 :green_circle: ( previous job: 542.00, improvement: 273.06%)
  • fedora-41-xfce_private_seq1m_q8t1_read 3:read_bandwidth_kb: 412500.00 :green_circle: ( previous job: 373957.00, improvement: 110.31%)
  • fedora-41-xfce_private_seq1m_q8t1_write 3:write_bandwidth_kb: 260580.00 :green_circle: ( previous job: 170062.00, improvement: 153.23%)
  • fedora-41-xfce_private_seq1m_q1t1_write 3:write_bandwidth_kb: 106168.00 :green_circle: ( previous job: 61534.00, improvement: 172.54%)
  • fedora-41-xfce_private_rnd4k_q32t1_write 3:write_bandwidth_kb: 2505.00 :green_circle: ( previous job: 2215.00, improvement: 113.09%)
  • fedora-41-xfce_private_rnd4k_q1t1_read 3:read_bandwidth_kb: 8317.00 :green_circle: ( previous job: 7540.00, improvement: 110.31%)
  • fedora-41-xfce_private_rnd4k_q1t1_write 3:write_bandwidth_kb: 1186.00 :green_circle: ( previous job: 1130.00, improvement: 104.96%)
  • fedora-41-xfce_volatile_seq1m_q8t1_read 3:read_bandwidth_kb: 381994.00 :green_circle: ( previous job: 369868.00, improvement: 103.28%)
  • fedora-41-xfce_volatile_seq1m_q8t1_write 3:write_bandwidth_kb: 268590.00 :green_circle: ( previous job: 179949.00, improvement: 149.26%)
  • fedora-41-xfce_volatile_seq1m_q1t1_read 3:read_bandwidth_kb: 313944.00 :small_red_triangle: ( previous job: 324737.00, degradation: 96.68%)
  • fedora-41-xfce_volatile_seq1m_q1t1_write 3:write_bandwidth_kb: 99967.00 :green_circle: ( previous job: 17567.00, improvement: 569.06%)
  • fedora-41-xfce_volatile_rnd4k_q1t1_read 3:read_bandwidth_kb: 8987.00 :green_circle: ( previous job: 7867.00, improvement: 114.24%)

qubesos-bot avatar May 19 '25 04:05 qubesos-bot

I have dnf5 5.2.13.1 and dnf5 --color=never search edit still uses color output (marks the "edit" word in green). Similarly qubes-dom0-update --action=search edit with this PR.

I am sorry that I missed this reply. Yes. It appears i missed this item. The --color=never was implemented for almost everything except search. I will work on it.

p.s. Maybe I missed it since the long openQA report was after your message

alimirjamali avatar Jun 14 '25 12:06 alimirjamali