Bug 481492 - Environment Canada shows wind gust speed even when the wind is steady
Summary: Environment Canada shows wind gust speed even when the wind is steady
Status: RESOLVED FIXED
Alias: None
Product: kdeplasma-addons
Classification: Plasma
Component: Weather (show other bugs)
Version: 5.27.9
Platform: openSUSE Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-18 01:41 UTC by Darryl Gregorash
Modified: 2024-08-25 23:40 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darryl Gregorash 2024-02-18 01:41:51 UTC
STEPS TO REPRODUCE
1. Not applicable
2. 
3. 

OBSERVED RESULT
When the wind speed reported on the Env. Canada website shows wind speed X gusting to Y, the same wind speeds are properly displayed in the widget. 
Later, when the reported wind speed is Z with no wind gusts, the widget shows winds Z gusting to Y. 

Note: when Env. Canada is selected for the first time, the wind speed is properly reported. It is only after Env. Canada stops reporting any wind gusts that this behaviour appears.

EXPECTED RESULT
The wind gust speed should be set to 0 when Env. Canada reports the wind is no longer gusting.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
openSUSE Leap 15.5
Kernel version: 5.14.21-150500.55.49-default (64-bit)

KDE Plasma Version: 
5.27.9
KDE Frameworks Version:
 5.103.0
Qt Version: 
5.15.8

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2024-02-21 23:39:01 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3960
Comment 2 Ismael Asensio 2024-02-22 20:18:55 UTC
Git commit d21d57ad326761a5d25f9825335aa68f14c2fa9d by Ismael Asensio.
Committed on 22/02/2024 at 19:54.
Pushed by iasensio into branch 'master'.

dataengines/weather: Reset wind info when parsing new data (envcan)

M  +6    -0    dataengines/weather/ions/envcan/ion_envcan.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/d21d57ad326761a5d25f9825335aa68f14c2fa9d
Comment 3 Ismael Asensio 2024-02-22 20:43:58 UTC
Git commit 5d67da23721aa31be2a2a71f7aa54a8b7a96ba1a by Ismael Asensio.
Committed on 22/02/2024 at 20:19.
Pushed by iasensio into branch 'Plasma/6.0'.

dataengines/weather: Reset wind info when parsing new data (envcan)


(cherry picked from commit d21d57ad326761a5d25f9825335aa68f14c2fa9d)

M  +6    -0    dataengines/weather/ions/envcan/ion_envcan.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/5d67da23721aa31be2a2a71f7aa54a8b7a96ba1a
Comment 4 Ismael Asensio 2024-02-22 21:22:36 UTC
Git commit 7e7c042a93d294cf79ee440ac16383495e5b7294 by Ismael Asensio.
Committed on 22/02/2024 at 20:21.
Pushed by iasensio into branch 'Plasma/5.27'.

dataengines/weather: Reset wind info when parsing new data (envcan)


(cherry picked from commit d21d57ad326761a5d25f9825335aa68f14c2fa9d)

M  +6    -0    dataengines/weather/ions/envcan/ion_envcan.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/7e7c042a93d294cf79ee440ac16383495e5b7294
Comment 5 Ismael Asensio 2024-03-04 19:41:55 UTC
The previous fix resets the wind gust info from the DataEngine  ata when it's no longer provided.

Unfortunately this is not enough to remove that info from the applet. After trying several different ways, it seems not possible to remove existing keys on the consumer side. 

Reopening until we can find a way to do this within the DataEngine/DataSource (deprecated) mechanism, or either porting the applet and providers out of it and into a new plugin.
Comment 6 Bug Janitor Service 2024-08-25 15:31:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4645
Comment 7 Ismael Asensio 2024-08-25 23:40:59 UTC
Git commit c8cd82cc860e8c9fc462c9155604d7d8fa12bdb7 by Ismael Asensio.
Committed on 25/08/2024 at 23:22.
Pushed by iasensio into branch 'master'.

dataengines/weather: Fix stalled data on weather updates

Due to the weather's ion and the DataEngine's infrastructure it was
not possible to remove outdated keys from the data, which resulted
in the applet showing stalled info that were no longer relevant, like
"wind gust" or the "feels like" indices.

The root cause is double:

- A dataengine's `setData()` will not remove keys that are no longer
  present in the new data, so we need to force removing them manually
  via `removeData()` or `removeAllData()`

- There are two concurrent dataengines involved:
  - The master `weather` engine which the applet is connected to and
    serves as a general interface
  - An internal `ion` engine loaded by the master which does the
    actual weather job

To fix the issue let's provide a signal for the ions to request
cleaning up the data on the master engine, and call it before setting
the new weather updates.
FIXED-IN: 6.2

M  +1    -0    dataengines/weather/ions/bbcukmet/ion_bbcukmet.cpp
M  +1    -0    dataengines/weather/ions/dwd/ion_dwd.cpp
M  +2    -0    dataengines/weather/ions/envcan/ion_envcan.cpp
M  +1    -0    dataengines/weather/ions/ion.cpp
M  +4    -0    dataengines/weather/ions/ion.h
M  +2    -1    dataengines/weather/ions/noaa/ion_noaa.cpp
M  +1    -0    dataengines/weather/ions/wetter.com/ion_wettercom.cpp
M  +4    -0    dataengines/weather/weatherengine.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/c8cd82cc860e8c9fc462c9155604d7d8fa12bdb7