weather-gov / weather.gov

weather.gov 2.0
Other
325 stars 9 forks source link

support unknown alert types #1841

Open jamestranovich-noaa opened 1 day ago

jamestranovich-noaa commented 1 day ago

Description

We are getting Unknown alert type: Evacuation - Immediate errors from the interop layer. Note that we expect evacuation immediate. There's a few other unknown alert types, as well.

Since last week, we've gotten the following unknown alerts:

To grab an updated list in NR, the NRQL query is SELECT uniques(message) FROM Log WHERE message LIKE '%Unknown alert type: %' SINCE 1 week ago

Acceptance criteria

greg-does-weather commented 1 day ago

The interop layer already preserves unknown alert types: https://github.com/weather-gov/weather.gov/blob/api-interop-layer/api-interop-layer/data/alerts/index.js#L70

If it comes across an alert type it doesn't know about it, it marks it as a land hazard with the lowest possible priority and sends it on to the frontend. It also logs it to NewRelic.

Ultimately, this is an upstream problem. None of those four alerts are canonical. NGITWIS is not using the proper names. The list of canonical alerts is here: https://www.weather.gov/help-map/. The API ingests the data from NGITWIS and passes it straight along, I believe, so it's not an API problem - it's upstream even of that.

jamestranovich-noaa commented 1 day ago

I agree, and at the same time we have to deal with the data we're given. I'll leave it to product to prioritize (or not) but my feeling is that we should special case any alert with the word "evacuation" in it, at least.

colinmurphy01 commented 1 day ago

That's a good suggestion. When you say special case, what do you mean?

jamestranovich-noaa commented 22 hours ago

Well, the easiest way to special case is probably to check if the unknown alert type has the word "evacuation" in it, and if so, map the alert to evacuation immediate. (We'd still log the unknown alert type though!)

Generally I am thinking that over time we can build up a list of unknown alert types and decide if we should remap these at IOC/launch.

colinmurphy01 commented 21 hours ago

@shadkeene and @coreypieper (CC @kmranjo because she's observed stuff over time) how do you feel about updating our hazard prioritization logic for beta to prioritize hazards with the mention of evacuation.

My ONLY concern is that these areas are probably getting pummeled with more and more alerts, but I do think we can assume a locally-generated alert like this is likely the most important thing they want their community to see.