-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: remove group by on event trigger value #1549
Conversation
@gal-agmon This morning you mentioned for a region we should not show trigger and warning. My interpretation is that if there is both trigger and warning then we should only show trigger. Is this correct? This change also affects all other countries and hazard types. In the case of PHL typhoon we currently have, This will become, Checking to make sure this change is intended. |
|
@gulfaraz I don't understand in what situation the same area would be affected by both a warning and a trigger at the same time? according to the screenshosts these looks like exactly the same event |
I agree. I find it weird that this is consistent across multiple countries and hazard types. You can see this behaviour in ibf-demo and then confirm if this change can be merged. |
'event."eventName"', | ||
'event."triggerValue"', | ||
]) | ||
.select(['area."countryCodeISO3"', 'event."eventName"']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gulfaraz I am a bit hesitant if this is OK to just change, and doesn't have adverse affects in other scenarios. This was put in like this I think because of the multi-threshold work in e.g. UGA floods, where it is used to distinguish events of different magnitude? I guess as I'm writing this that they should already be separated by eventName (= glofasStation in that case). But did you check this in that scenario, and others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I've tested the UGA floods case myself. And have also read up now on the other comments in this PR (e.g. regarding typhoon). I do think I can confirm this change is OK to merge, but I am afraid that it just solves a symptom of wider-spread disease. Because why is e.g. the typhoon being stored as something that can come out as trigger+warning? So we can either just merge it and treat this as step-by-step iterative solving, or we should dive deeper into it..
@gulfaraz probably not related but is the [object Object] bug in the typhoon-screenshots, right above the area bullet list (but seen everywhere on local/test/demo), a known bug taken up somewhere? |
In case there are duplicate event names with different magnitudes, then the expectation is that we only show the highest magnitude. i.e.) If we received 3 flood forecasts,
We expect to see 2 flood events,
Yes, this is unclear to me as well. The example I described for flood forecasts should also apply for other countries and hazards. In PHL typhoon, we should not see a warning and a trigger event simultaneously for the same regions. But this has been the case for a while, so I assumed this is the desired behaviour. If this is undesired behaviour, this PR will change it. I requested input on this PR to check if this behaviour is desired. So far we're aligned that this change is needed.
I prefer to merge this as it fixes at least 4 known issues. We can do a deeper dive into it if we can identify at least one undesired behaviour caused by this change.
This was an object I added for debugging but forgot to remove. It is removed in this commit. It does not occur in ibf-test anymore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gulfaraz clear, approved in that case.
Describe your changes
Restrict to one event per region.
Checklist before requesting a review