Bug 428679 - On KDE CI alkonlinequotetest fails while parsing the date
Summary: On KDE CI alkonlinequotetest fails while parsing the date
Status: RESOLVED FIXED
Alias: None
Product: alkimia
Classification: Frameworks and Libraries
Component: General (show other bugs)
Version: 8.0.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-04 11:29 UTC by Ralf Habacker
Modified: 2020-11-22 21:54 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 8.0.5
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2020-11-04 11:29:49 UTC
STEPS TO REPRODUCE
1. inspect https://build.kde.org/job/Extragear/job/alkimia/job/kf5-qt5%20SUSEQt5.14/28/console

OBSERVED RESULT
09:18:41  QDEBUG : AlkOnlineQuoteTest::testLaunchWebKit() test::AlkQuoteReceiver::slotStatus(  "Price found: '1.1657' (1.1657)"  )
09:18:41  QDEBUG : AlkOnlineQuoteTest::testLaunchWebKit() test::AlkQuoteReceiver::slotError(  "Unable to parse date for 'EUR USD'"  )
09:18:41  QDEBUG : AlkOnlineQuoteTest::testLaunchWebKit() test::AlkQuoteReceiver::slotStatus(  "Using current date for 'EUR USD'"  )
09:18:41  FAIL!  : AlkOnlineQuoteTest::testLaunchWebKit() 'quote.launch("EUR USD", "EUR USD", source)' returned FALSE. ()
09:18:41     Loc: [/home/jenkins/workspace/Extragear/alkimia/kf5-qt5 SUSEQt5.14/autotests/alkonlinequotetest.cpp(67)]

EXPECTED RESULT
That error should not happens

SOFTWARE/OS VERSIONS
Linux: see job job
KDE Frameworks Version: 5.75
Qt Version: 5.14
Comment 1 Ralf Habacker 2020-11-04 11:33:22 UTC
In the associated test, the service https://fx-rate.net/BTC/GBP is used. Once with a simple https request via KIO and the second time with a real browser instance (Webkit), whereby the website returns different date formats. In the first case it is a complete date, in the second case only the time. Since the rule expects a complete date, the error message is returned.
Comment 2 Ralf Habacker 2020-11-04 11:44:31 UTC
A fix would be to change the q
Comment 3 Ralf Habacker 2020-11-04 11:47:55 UTC
... A fix could be to set the attribute for the date and/or the date format of the citation source to an empty value and in this case check the error return of AlkOnlineQuote::launch() to see if the returned error concerns the date and then ignore the error.
Comment 4 Bug Janitor Service 2020-11-04 12:43:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/office/alkimia/-/merge_requests/4
Comment 5 Ralf Habacker 2020-11-05 08:16:17 UTC
Git commit 42296b9ce8ff38a523526e4042bec6821279aaa5 by Ralf Habacker.
Committed on 04/11/2020 at 12:41.
Pushed by habacker into branch '8.0'.

Add support for skipping date extraction when a quote service does not provide a valid date

The state of date parsing is also reflected into the associated ui.
FIXED-IN:8.0.5

M  +6    -2    src/alkonlinequote.cpp
M  +3    -0    src/alkonlinequote.h
M  +10   -2    src/alkonlinequotesprofile.cpp
M  +8    -3    src/alkonlinequoteswidget.cpp

https://invent.kde.org/office/alkimia/commit/42296b9ce8ff38a523526e4042bec6821279aaa5
Comment 6 Ralf Habacker 2020-11-05 08:44:43 UTC
Git commit 1534aa745a76565b979f6e0b60ef5920055e98a9 by Ralf Habacker.
Committed on 05/11/2020 at 08:44.
Pushed by habacker into branch 'gitlab-ci-test'.

Added support for skipping date extraction when a quote service does not provide a valid date
FIXED-IN:8.0.5

M  +9    -0    src/alkonlinequotesource.cpp

https://invent.kde.org/office/alkimia/commit/1534aa745a76565b979f6e0b60ef5920055e98a9
Comment 7 Ralf Habacker 2020-11-22 21:54:27 UTC
Git commit 4209011cba698943b623d890b7d5d76ebee31ff6 by Ralf Habacker.
Committed on 22/11/2020 at 21:54.
Pushed by habacker into branch '8.0'.

Added documentation to method AlkOnlineQuoteSource::setDate()

M  +9    -0    src/alkonlinequotesource.cpp

https://invent.kde.org/office/alkimia/commit/4209011cba698943b623d890b7d5d76ebee31ff6