Bug 404819 - Inaccurate progress while Discover updates flatpak packages
Summary: Inaccurate progress while Discover updates flatpak packages
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: Flatpak Backend (show other bugs)
Version: 5.25.90
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-25 20:49 UTC by Patrick Silva
Modified: 2022-10-21 15:44 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26.1


Attachments
video recorded on neon unstable (2.18 MB, video/webm)
2022-10-21 10:26 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2019-02-25 20:49:06 UTC
SUMMARY
Discover shows the progress correctly in the side bar when a new flatpak app is installed.
However, the side bar shows "Tasks (1%)" all the time while flatpaks are updated.


STEPS TO REPRODUCE
1. update flatpaks using Discover
2. 
3. 

OBSERVED RESULT
Side bar shows "Tasks (1%)" throughout the update process.

EXPECTED RESULT
Discover shows update progress correctly.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.15.1
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.1
Comment 1 Patrick Silva 2022-09-23 14:59:03 UTC
I have just updated 10 flatpak packages on Arch Linux. The percentage shown in the sidebar progressed up to 16% and then got stuck at this percentage until finishing the update process.

Operating System: Arch Linux
KDE Plasma Version: 5.25.90
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Graphics Platform: Wayland
Comment 2 Aleix Pol 2022-10-13 15:57:11 UTC
Git commit 8226ddf15fd7f04b18fc2d2f571215b695a9b2bb by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 13/10/2022 at 15:52.
Pushed by apol into branch 'master'.

flatpak: Address transaction progress skipping

Flatpak transaction progress skips back and forth as it is reported
according its different operations.
Report the progress according equally split among the different
operations.
Related: bug 434948, bug 435450, bug 448280

M  +10   -4    libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp
M  +3    -0    libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h
M  +6    -0    libdiscover/backends/FlatpakBackend/tests/FlatpakTest.cpp

https://invent.kde.org/plasma/discover/commit/8226ddf15fd7f04b18fc2d2f571215b695a9b2bb
Comment 3 Nate Graham 2022-10-13 16:07:57 UTC
Git commit 336becd3ad0f8aa5b18d3c61b38c15d81a3f3544 by Nate Graham, on behalf of Aleix Pol.
Committed on 13/10/2022 at 16:07.
Pushed by ngraham into branch 'Plasma/5.26'.

flatpak: Address transaction progress skipping

Flatpak transaction progress skips back and forth as it is reported
according its different operations.
Report the progress according equally split among the different
operations.
Related: bug 434948, bug 435450, bug 448280


(cherry picked from commit 8226ddf15fd7f04b18fc2d2f571215b695a9b2bb)

M  +10   -4    libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp
M  +3    -0    libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h
M  +6    -0    libdiscover/backends/FlatpakBackend/tests/FlatpakTest.cpp

https://invent.kde.org/plasma/discover/commit/336becd3ad0f8aa5b18d3c61b38c15d81a3f3544
Comment 4 Patrick Silva 2022-10-20 14:42:12 UTC
This bug persists on Plasma 5.26.1.

Operating System: Arch Linux
KDE Plasma Version: 5.26.1
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Graphics Platform: Wayland
Comment 5 Nate Graham 2022-10-20 16:35:40 UTC
Hmm, I can't reproduce it anymore myself, but I was able to before this commit. Can you attach a screen recording that shows the issue happening with 5.26.1 or current git master?
Comment 6 Patrick Silva 2022-10-21 10:26:08 UTC
Created attachment 153078 [details]
video recorded on neon unstable
Comment 7 Nate Graham 2022-10-21 15:44:54 UTC
It doesn't look like the screen recording shows the original issue of the progress being stuck at 1% all the time; not it's 33%. But the reason why the progress jumps to 33% and then all the way to 100% is because that's the progress data we got from the underlying install progress. If you look, almost everything is so fast that it immediately goes to 100%.