Bug 485896

Summary: CI: alkdownloadengine-kio-test often fails
Product: [Frameworks and Libraries] alkimia Reporter: Ralf Habacker <ralf.habacker>
Component: CIAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: master   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In: 8.2
Sentry Crash Report:

Description Ralf Habacker 2024-04-21 13:10:49 UTC
STEPS TO REPRODUCE
1. see https://invent.kde.org/office/alkimia/-/jobs/1758168

OBSERVED RESULT
The log contains: 

11/17 Test #11: alkdownloadengine-kio-test ..........***Failed    9.81 sec

and 

https://invent.kde.org/office/alkimia/-/jobs/1758168#L2287
FAIL!  : AlkDownloadEngineTest::testDownloadEngineError() '!engine->downloadUrl(url, type)' returned FALSE. ()
   Loc: [/builds/office/alkimia/autotests/alkdownloadenginetest.cpp(106)]

EXPECTED RESULT
The test should not fail

ADDITIONAL INFORMATION
Restarting the job sometimes helps, sometimes not
Comment 1 Bug Janitor Service 2024-04-21 13:49:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/office/alkimia/-/merge_requests/37
Comment 2 Ralf Habacker 2024-04-21 14:41:22 UTC
Git commit 72ef78f3307aea87f08ad1f6440f33607f93dc6f by Ralf Habacker.
Committed on 21/04/2024 at 13:48.
Pushed by habacker into branch 'master'.

CI: install and use local webserver on unix os builds

This could help to avoid problems when downloading external URLs, as
firewalls or intrusion detecting systems could block requests.
Related: bug 459128, bug 485662

M  +11   -6    .gitlab-ci.yml
M  +63   -12   tools/ci-build.sh
M  +12   -0    tools/ci-install.sh

https://invent.kde.org/office/alkimia/-/commit/72ef78f3307aea87f08ad1f6440f33607f93dc6f
Comment 3 Ralf Habacker 2024-04-22 07:11:41 UTC
(In reply to Ralf Habacker from comment #2)
> This could help to avoid problems when downloading external URLs, as
> firewalls or intrusion detecting systems could block requests.

At https://invent.kde.org/office/alkimia/-/jobs/1758678#L1868 you can see that this is probably the cause, as in this case KIO repeats the relevant query 1469 times when a server error is returned and is probably blocked.
Comment 4 Bug Janitor Service 2024-04-24 10:33:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/office/alkimia/-/merge_requests/39
Comment 5 Ralf Habacker 2024-04-29 13:10:13 UTC
Git commit f178ac7eb99a12d4a7744e82367546572ec396e7 by Ralf Habacker.
Committed on 29/04/2024 at 10:41.
Pushed by habacker into branch 'master'.

Attempt to fix KIO issue

M  +1    -0    src/alkdownloadengine.cpp

https://invent.kde.org/office/alkimia/-/commit/f178ac7eb99a12d4a7744e82367546572ec396e7
Comment 6 Bug Janitor Service 2024-07-08 22:04:39 UTC
A possibly relevant merge request was started @ https://invent.kde.org/office/alkimia/-/merge_requests/46
Comment 7 Ralf Habacker 2024-07-08 22:13:45 UTC
https://invent.kde.org/office/alkimia/-/jobs/1959836 is another example

17/19 Test #13: alkdownloadengine-kio-test ..........***Failed    6.07 sec
95% tests passed, 1 tests failed out of 19
Total Test time (real) =  16.10 sec
The following tests FAILED:
	 13 - alkdownloadengine-kio-test (Failed)
Errors while running CTest
Comment 8 Ralf Habacker 2024-07-13 17:33:05 UTC
Git commit e43e94a3fd67059e5f2c1ec7ef5ba43201cb8d6f by Ralf Habacker.
Committed on 13/07/2024 at 16:59.
Pushed by habacker into branch 'master'.

Remove support for using KIO as download backend

In CI jobs and user feedback, it was found that errors frequently occur
when using KIO. Since there is also the Qt backend, which does not have
these errors, KIO can be replaced by it.
FIXED-IN:8.2

M  +1    -15   CMakeLists.txt
M  +0    -24   autotests/CMakeLists.txt
M  +2    -21   autotests/alkdownloadenginetest.cpp
D  +0    -66   autotests/test-kio-cli.cpp
M  +0    -109  src/alkdownloadengine.cpp
M  +1    -2    src/alkdownloadengine.h
M  +0    -3    src/alkonlinequote_p.h
M  +2    -2    tests/alknewstuffwidgettest.cpp
M  +2    -2    tools/onlinequoteseditor/main.cpp

https://invent.kde.org/office/alkimia/-/commit/e43e94a3fd67059e5f2c1ec7ef5ba43201cb8d6f