Open egbicker opened 1 year ago
@egbicker bunch of conflicts after merging #750
@jw3 Is there a way to request only untrusted files from the backend?
Is there a way to request only untrusted files from the backend?
There is not, right now. Is filtering the system trust slow, or do you have some other use case?
I'm having issues filtering the system trust in the GUI layer while getting a performance increase. It looks like I'm going to have to chop up the system.get("system_trust")
object before trying to load anything or else we still go through every entry.
I'm having issues filtering the system trust in the GUI layer while getting a performance increase. It looks like I'm going to have to chop up the
system.get("system_trust")
object before trying to load anything or else we still go through every entry.
Did you try doing some filtering before a trust entry is put on the queue in the process_trust
method in TrustFileList
. That's running on a separate thread so the performance hit from the UI standpoint shouldn't be too bad.
Thanks @dorschs57 I was working in the wrong spot. That does go quicker, now just have to adjust the loading logic to recognize the different number of items
@egbicker This does not seem to be functioning for me, can you take a look and confirm it is still gtg
@jw3 What isn't working for you? It seems to be working on my end
Ok, Perhaps I was just confused by these things lining up
I just saw the same issue with the toggle button not becoming sensitive. I can just have it be sensitive all the time, even on the ATDB page to avoid what must be some sort of lock up since I'm only seeing it stay insensitive sometimes.
Yeah the sensitivity of the toggle button probably needs adjusted, and needs to consider the state of the trust load.
For example, when I click toggle the first time it starts loading the trust entries into the table, and then when I click it again it doesnt seem to do anything, then if I click again it resets the trust load back to 0%.
Maybe, once you opt-in to trust loading, the toggle button remains is disabled until it is completed?
Python test failing
fapolicy_analyzer/tests/test_main_window.py ..
(pytest:8736): Gtk-CRITICAL **: 13:41:33.321: gtk_main_quit: assertion 'main_loops != NULL' failed
..............s..........................
fapolicy_analyzer/tests/test_notification.py ..............
fapolicy_analyzer/tests/test_object_list.py .........
fapolicy_analyzer/tests/test_policy_rules_admin_page.py ................Fatal Python error: Segmentation fault
Thread 0x00007f0ea2fc6700 (most recent call first):
File "/home/runner/work/fapolicy-analyzer/fapolicy-analyzer/fapolicy_analyzer/ui/main_window.py", line 244 in on_next_system
File "/home/runner/.local/share/virtualenvs/fapolicy-analyzer-Od7Imf31/lib/python3.9/site-packages/rx/core/observer/autodetachobserver.py", line 26 in on_next
File "/home/runner/.local/share/virtualenvs/fapolicy-analyzer-Od7Imf31/lib/python3.9/site-packages/rx/core/operators/map.py", line 41 in on_next
File "/home/runner/.local/share/virtualenvs/fapolicy-analyzer-Od7Imf31/lib/python3.9/site-packages/rx/core/observer/autodetachobserver.py", line 26 in on_next
File "/home/runner/.local/share/virtualenvs/fapolicy-analyzer-Od7Imf31/lib/python3.9/site-packages/rx/subject/behaviorsubject.py", line 52 in _on_next_core
File "/home/runner/.local/share/virtualenvs/fapolicy-analyzer-Od7Imf31/lib/python3.9/site-packages/rx/core/observer/observer.py", line 26 in on_next
File "/home/runner/.local/share/virtualenvs/fapolicy-analyzer-Od7Imf31/lib/python3.9/site-packages/rx/subject/subject.py", line 55 in on_next
File "/home/runner/.local/share/virtualenvs/fapolicy-analyzer-Od7Imf31/lib/python3.9/site-packages/rx/core/observer/autodetachobserver.py", line 26 in on_next
File "/home/runner/.local/share/virtualenvs/fapolicy-analyzer-Od7Imf31/lib/python3.9/site-packages/rx/core/observer/autodetachobserver.py", line 26 in on_next
File "/home/runner/.local/share/virtualenvs/fapolicy-analyzer-Od7Imf31/lib/python3.9/site-packages/rx/core/operators/map.py", line 41 in on_next
File "/home/runner/.local/share/virtualenvs/fapolicy-analyzer-Od7Imf31/lib/python3.9/site-packages/rx/core/observer/autodetachobserver.py", line 26 in on_next
File "/home/runner/.local/share/virtualenvs/fapolicy-analyzer-Od7Imf31/lib/python3.9/site-packages/rx/internal/concurrency.py", line 16 in inner
File "/home/runner/.local/share/virtualenvs/fapolicy-analyzer-Od7Imf31/lib/python3.9/site-packages/rx/core/observer/autodetachobserver.py", line 26 in on_next
File "/home/runner/.local/share/virtualenvs/fapolicy-analyzer-Od7Imf31/lib/python3.9/site-packages/rx/core/observer/autodetachobserver.py", line 26 in on_next
File "/home/runner/.local/share/virtualenvs/fapolicy-analyzer-Od7Imf31/lib/python3.9/site-packages/rx/core/observer/autodetachobserver.py"Segmentation fault (core dumped)
Error: Process completed with exit code 139.
@jw3 It seems like the text display on the ATDB screen is causing some non-reproduceable issues. My local tests aren't showing this issue and sometimes the one or both of the 3.6/3.9 tests pass with no real changes.
Update: I'm not seeing any issues running it locally without the test suite either.
This is bumping back to 1.1. I want more time than we have to see it in action in master.
@egbicker resolve the conflicts here when you have time and I'll review this again.
@jw3 Merges are done, tests worked locally. Looks like something happened to the Ubuntu 20.04 repo between when you commented and now.
@dorschs57 I don't know why the toggle button isn't working, I'm seeing it respond as expected on FC34 and FC38. I did just toss up a fix for the loading jumping from low % to done.
@dorschs57 I don't know why the toggle button isn't working, I'm seeing it respond as expected on FC34 and FC38. I did just toss up a fix for the loading jumping from low % to done.
Your update made it a little better for me. However it still only gets to about 50% and then jumps to completed for me.
I'm still seeing the issue too where the Toggle Display Trust Entries
button does not enable after loading. This only happens when I first start start up the application. Here's my steps:
~/.config/fapolicy-analyzer/config.toml
to include
[ui]
initial_view = 'trust'
System Trust Database
tabIf I then navigate to another view like Rules and back to the Trust view the button will enable properly after loading is complete.
Ill give this a run next week and see what I see.
Still seeing some issues here:
Something about adding Events
to database_admin_page
broke the dispose condition os I fixed that but I'm no longer seeing either of your first 2 issues on fc34 or 38
Toggle button state looks good.
Don't see the multi-view issue.
I do see the trust jump.
That seems like a symptom of not reducing the total number of entries that need added to the view.
Screencast from 2023-06-26 16-14-38.webm
@jw3 Here's what my fc38 rpm loading looks like on a VM with ~8gb of RAM. I wonder if the skip you're seeing is the thread that's doing the file loading going faster than the thread responsible for redrawing the UI? Lines 229-232 in trust_file_list
are removing the trusted files not displayed from the total used in calculating the percentage.
Does the loading of the full trust file database have a skip in the middle as well?
Show trust discrepancies by default in the STDB or a message if store is empty
Closes #520