Skip to content
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

Devices widget: label recently-connected devices as "NEW" #207

Merged
merged 8 commits into from
Jul 18, 2024

Conversation

kennethrrosen
Copy link

@kennethrrosen
Copy link
Author

@marmarek I've now pushed the PR with my signing key.

@marmarek
Copy link
Member

marmarek commented Jul 7, 2024

PipelineRetry

@marmarek
Copy link
Member

marmarek commented Jul 8, 2024

pylint:

************* Module qui.devices.actionable_widgets
qui/devices/actionable_widgets.py:412:0: C0301: Line too long (101/80) (line-too-long)

@qubesos-bot
Copy link

qubesos-bot commented Jul 8, 2024

OpenQA test summary

Complete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2024071717-4.3&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=2024070519-4.3&flavor=update

Failed tests

40 failures

Fixed failures

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

8 fixed
  • system_tests_pvgrub_salt_storage

    • TC_41_HVMGrub_fedora-40-xfce: test_000_standalone_vm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

    • TC_41_HVMGrub_fedora-40-xfce: test_010_template_based_vm (error)
      qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...

  • system_tests_splitgpg

  • system_tests_extra

    • TC_00_QVCTest_fedora-40-xfce: test_020_webcam (failure + cleanup)
      AssertionError: 'qubes-video-companion webcam' exited early (0): b'...

    • TC_00_QVCTest_whonix-workstation-17: test_020_webcam (failure + cleanup)
      AssertionError: 'qubes-video-companion webcam' exited early (0): b'...

  • system_tests_usbproxy

  • system_tests_network_updates

    • TC_11_QvmTemplateMgmtVM_debian-12-xfce: test_000_template_list (failure)
      AssertionError: libvirt event impl drain timeout

Unstable tests

  • system_tests_update@hw7

    update2/Failed (1/5 times with errors)
    • job 103358 # Test died: command 'script -c 'qubes-vm-update --max-concurrency=...
  • system_tests_update

    update2/Failed (1/5 times with errors)
    • job 103358 # Test died: command 'script -c 'qubes-vm-update --max-concurrency=...
  • system_tests_suspend

    suspend/ (1/5 times with errors)
    suspend/Failed (1/5 times with errors)
    • job 103660 # Test died: no candidate needle with tag(s) 'xscreensaver-prompt' ...
    suspend/wait_serial (1/5 times with errors)
    • job 103660 # wait_serial expected: qr/2E8vz-\d+-/...
  • system_tests_pvgrub_salt_storage

    TC_41_HVMGrub_debian-12-xfce/test_000_standalone_vm (1/5 times with errors)
    • job 102428 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
    TC_41_HVMGrub_debian-12-xfce/test_010_template_based_vm (1/5 times with errors)
    • job 102428 qubes.exc.QubesVMError: Cannot connect to qrexec agent for 120 seco...
  • system_tests_splitgpg

    TC_10_Thunderbird_debian-12-xfce/test_010_send_receive_inline_signed_only (1/5 times with errors)
    • job 105472 dogtail.tree.SearchError: descendent of [application | Thunderbird]...
  • system_tests_extra

    TC_00_QVCTest_debian-12-xfce/test_020_webcam (2/5 times with errors)
    • job 102420 AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
    • job 104728 AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
    TC_00_QVCTest_fedora-40-xfce/test_020_webcam (2/5 times with errors)
    • job 105464 AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
    • job 105868 AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
    TC_00_QVCTest_whonix-gateway-17/test_020_webcam (4/5 times with errors)
    • job 102420 AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
    • job 103649 self.assertNotEqual(vm.run('test -e /dev/vid... AssertionError: 0 == 0
    • job 105464 AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
    • job 105868 AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
    TC_00_QVCTest_whonix-workstation-17/test_020_webcam (4/5 times with errors)
    • job 102420 AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
    • job 103649 AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
    • job 105464 AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
    • job 105868 AssertionError: 'qubes-video-companion webcam' exited early (0): b'...
  • system_tests_usbproxy

    TC_20_USBProxy_core3_fedora-40-xfce/test_070_attach_not_installed_front (1/5 times with errors)
    • job 105442 qubesusbproxy.core3ext.QubesUSBException: Device attach failed: 202...
  • system_tests_network_updates

    TC_11_QvmTemplateMgmtVM_debian-12-xfce/test_000_template_list (1/5 times with errors)
    • job 105469 AssertionError: libvirt event impl drain timeout
    TC_10_QvmTemplate_whonix-gateway-17/test_010_template_install (2/5 times with errors)
    • job 103656 AssertionError: libvirt event impl drain timeout
    • job 105873 AssertionError: libvirt event impl drain timeout
    VmUpdates_debian-12-xfce/test_020_updates_available_notification (1/5 times with errors)
    • job 104735 subprocess.CalledProcessError: Command '/usr/lib/qubes/upgrades-sta...
    VmUpdates_debian-12-xfce/test_110_update_via_proxy_qubes_vm_update (1/5 times with errors)
    • job 104735 AssertionError: 1 not found in [0] : dpkg -l test-pkg | grep 1.1: b''
    VmUpdates_fedora-40-xfce/test_110_update_via_proxy_qubes_vm_update (1/5 times with errors)
    • job 104735 AssertionError: 1 not found in [0, 100] : rpm -q test-pkg | grep 1....
    VmUpdates_debian-12-xfce/test_111_update_via_proxy_qubes_vm_update_cli (1/5 times with errors)
    • job 104735 AssertionError: 1 not found in [0] : dpkg -l test-pkg | grep 1.1: b''
    VmUpdates_fedora-40-xfce/test_111_update_via_proxy_qubes_vm_update_cli (1/5 times with errors)
    • job 104735 AssertionError: 1 not found in [0, 100] : rpm -q test-pkg | grep 1....
    VmUpdates_debian-12-xfce/test_130_no_network_qubes_vm_update (1/5 times with errors)
    • job 104735 AssertionError: qubes-vm-update return unexpected code: 0 in (1, 2, 5)
    VmUpdates_fedora-40-xfce/test_130_no_network_qubes_vm_update (1/5 times with errors)
    • job 104735 AssertionError: qubes-vm-update return unexpected code: 0 in (1, 2, 5)
    VmUpdates_debian-12-xfce/test_131_no_network_qubes_vm_update_cli (1/5 times with errors)
    • job 104735 AssertionError: qubes-vm-update return unexpected code: 0 in (1, 2, 5)
    VmUpdates_fedora-40-xfce/test_131_no_network_qubes_vm_update_cli (1/5 times with errors)
    • job 104735 AssertionError: qubes-vm-update return unexpected code: 0 in (1, 2, 5)
  • system_tests_dispvm

    TC_20_DispVM_fedora-40-xfce/test_100_open_in_dispvm (1/5 times with errors)
    • job 102419 AssertionError: './open-file test.txt' failed with ./open-file test...
  • system_tests_basic_vm_qrexec_gui_zfs

    TC_20_AudioVM_Pulse_debian-12-xfce-pool/test_223_audio_play_hvm (1/5 times with errors)
    • job 103646 AssertionError: only silence detected, no useful audio data
  • system_tests_basic_vm_qrexec_gui_ext4

    TC_20_AudioVM_Pulse_debian-12-xfce-pool/test_223_audio_play_hvm (1/5 times with errors)
    • job 102415 AssertionError: only silence detected, no useful audio data
  • system_tests_basic_vm_qrexec_gui_xfs

    TC_20_AudioVM_PipeWire_debian-12-xfce-pool/test_226_audio_playback_pipewire (1/5 times with errors)
    • job 102416 AssertionError: too short audio, expected 10s, got 8.31034013605442...
    TC_20_AudioVM_PipeWire_debian-12-xfce-pool/test_228_audio_rec_unmuted_pipewire (1/5 times with errors)
    • job 102416 AssertionError: too short audio, expected 10s, got 8.89784580498866...
    TC_20_AudioVM_PipeWire_fedora-40-xfce-pool/test_228_audio_rec_unmuted_pipewire (1/5 times with errors)
    • job 102416 AssertionError: too short audio, expected 10s, got 9.45630385487528...
    TC_20_AudioVM_PipeWire_debian-12-xfce-pool/test_250_audio_playback_audiovm_pipewire (1/5 times with errors)
    • job 102416 AssertionError: too short audio, expected 10s, got 7.48553287981859...
    TC_20_AudioVM_PipeWire_debian-12-xfce-pool/test_251_audio_playback_audiovm_pipewire_late_start (1/5 times with errors)
    • job 102416 AssertionError: too short audio, expected 10s, got 9.19612244897959...
    TC_20_AudioVM_Pulse_whonix-workstation-17-pool/test_252_audio_playback_audiovm_switch_hvm (1/5 times with errors)
    • job 102416 AssertionError: too short audio, expected 10s, got 6.77941043083900...
  • system_tests_update@hw1

    update2/Failed (1/5 times with errors)
    • job 103358 # Test died: command 'script -c 'qubes-vm-update --max-concurrency=...
  • system_tests_basic_vm_qrexec_gui@hw1

    TC_20_AudioVM_Pulse_whonix-workstation-17/test_220_audio_play_pulseaudio (1/5 times with errors)
    • job 103642 AssertionError: too short audio, expected 10s, got 8.64043083900226...
    TC_20_AudioVM_Pulse_whonix-workstation-17/test_221_audio_rec_muted_pulseaudio (1/5 times with errors)
    • job 103642 Cannot process volume group qubes_dom0...
    TC_20_AudioVM_Pulse_whonix-workstation-17/test_223_audio_play_hvm (1/5 times with errors)
    • job 102413 AssertionError: only silence detected, no useful audio data
  • system_tests_suspend@hw1

    suspend/ (1/5 times with errors)
    suspend/Failed (1/5 times with errors)
    • job 103660 # Test died: no candidate needle with tag(s) 'xscreensaver-prompt' ...
    suspend/wait_serial (1/5 times with errors)
    • job 103660 # wait_serial expected: qr/2E8vz-\d+-/...
  • system_tests_basic_vm_qrexec_gui

    TC_20_AudioVM_Pulse_whonix-workstation-17/test_220_audio_play_pulseaudio (1/5 times with errors)
    • job 103642 AssertionError: too short audio, expected 10s, got 8.64043083900226...
    TC_20_AudioVM_Pulse_whonix-workstation-17/test_221_audio_rec_muted_pulseaudio (1/5 times with errors)
    • job 103642 Cannot process volume group qubes_dom0...
    TC_20_AudioVM_Pulse_whonix-workstation-17/test_223_audio_play_hvm (1/5 times with errors)
    • job 102413 AssertionError: only silence detected, no useful audio data

@marmarek
Copy link
Member

marmarek commented Jul 8, 2024

system_tests_gui_tools

* qui_widgets_devices: [unnamed test](https://openqa.qubes-os.org/tests/105621#step/qui_widgets_devices/6) (unknown)

* qui_widgets_devices: [Failed](https://openqa.qubes-os.org/tests/105621#step/qui_widgets_devices/7) (test died)
  `# Test died: no candidate needle with tag(s) 'qui-devices-opened' m...`
Jul 08 01:43:45 dom0 widget-wrapper[2863]: Traceback (most recent call last):
Jul 08 01:43:45 dom0 widget-wrapper[2863]:   File "/usr/lib/python3.11/site-packages/qui/devices/device_widget.py", line 320, in show_menu
Jul 08 01:43:45 dom0 widget-wrapper[2863]:     device_widget = actionable_widgets.MainDeviceWidget(dev, theme)
Jul 08 01:43:45 dom0 widget-wrapper[2863]:                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jul 08 01:43:45 dom0 widget-wrapper[2863]:   File "/usr/lib/python3.11/site-packages/qui/devices/actionable_widgets.py", line 412, in __init__
Jul 08 01:43:45 dom0 widget-wrapper[2863]:     if device.connection_timestamp and int(time.monotonic() - device.connection_timestamp) < 120:
Jul 08 01:43:45 dom0 widget-wrapper[2863]:        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jul 08 01:43:45 dom0 widget-wrapper[2863]: AttributeError: 'Device' object has no attribute 'connection_timestamp'

@kennethrrosen
Copy link
Author

@marmarek corrected the pylint and initial value error

@marmarek
Copy link
Member

marmarek commented Jul 8, 2024

pylint complains about trailing whitespace...

Fixes Pylint trailing whitespace
Copy link

codecov bot commented Jul 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.55%. Comparing base (7fb21f3) to head (35de124).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #207   +/-   ##
=======================================
  Coverage   93.54%   93.55%           
=======================================
  Files          57       57           
  Lines       10816    10823    +7     
=======================================
+ Hits        10118    10125    +7     
  Misses        698      698           

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

@kennethrrosen
Copy link
Author

@marmarek all set. thank you for your patience!

@marmarta
Copy link
Member

marmarta commented Jul 9, 2024

sorry for being a complainer, but: I'm not that sure about two things. One is red color of the font - red is generally a "bad" color, although recently it has also been used for "new stuff". Two is the exclamation mark, which makes it even scarier for a user (at least I get this feeling). Maybe it would be a bit less scary if the NEW was blue, in one of the Qubes Blue colors (e.g. primary blue: https://www.qubes-os.org/doc/visual-style-guide/ )

@kennethrrosen
Copy link
Author

sorry for being a complainer, but: I'm not that sure about two things. One is red color of the font - red is generally a "bad" color, although recently it has also been used for "new stuff". Two is the exclamation mark, which makes it even scarier for a user (at least I get this feeling). Maybe it would be a bit less scary if the NEW was blue, in one of the Qubes Blue colors (e.g. primary blue: https://www.qubes-os.org/doc/visual-style-guide/ )

@marmarta Would adding "qubes-blue" work within the span style, or would I also need to load_css from qubes-colors-dark.css? Using "blue" would also work, but it would be outside the style framework.

Removes exclamation mark and changes text color from red to blue
@marmarta
Copy link
Member

marmarta commented Jul 9, 2024

@marmarta Would adding "qubes-blue" work within the span style, or would I also need to load_css from qubes-colors-dark.css? Using "blue" would also work, but it would be outside the style framework.

Sadly, Gtk is not great here and you can't use CSS stuff in span (worse, they literally rejected a PR that would add it, because "they want to go in the direction of more widgets") - you can just use the literal color number ( #3874d8 or #63a0ff , not sure which would look better, probably the lighter one

@marmarta
Copy link
Member

marmarta commented Jul 9, 2024

looks really good!

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.

Devices widget: Label recently-connected devices as "NEW"
5 participants