feat(alerts): Remove logic for adding parent informed entities.#1042
feat(alerts): Remove logic for adding parent informed entities.#1042allisonking wants to merge 2 commits into
Conversation
| } = apply_hook(informed_entities) | ||
| end | ||
|
|
||
| test "handles specific case from bugfix ticket" do |
There was a problem hiding this comment.
I did recreate this alert to make sure alerts manager is handling this test case right and I think it is, but wouldn't mind a second pair of eyes. Here's the alert in staging: https://alerts-manager-staging.mbtace.com/alerts/edit/1003230
And here's the equivalent feed: https://mbta-alerts-ui.s3.amazonaws.com/staging/alerts_feed_enhanced.json
Search 1003230, and there should be 12 informed entities, of which 6 are parent entities, and 6 are the original child ones. The 6 original ones match what in this test is in alerts_enhanced_json_excerpt, and the 6 parent entities match what is in expected_new_informed_entities
(actually, the parent entities' activities won't match exactly, but this is a good thing—the alerts manager is a bit stricter about which activities to associate with each parent entity. for example, the activities at North Station and Oak Grove won't be all 3 activities, it'll depend on direction, since these are the beginning/end of the suspension)
The alerts manager now handles that itself, so the API should be able to just pass through what it gets from the alerts manager feed.
9ec7616 to
b536882
Compare
|
Hi @allisonking, thanks for the PR! Your changes look good, I've just been slow to review because I was working on addressing the issues that I'll have a fix done for this shortly, which should stop CI from failing on this and all the other branches. |
Summary of changes
Asana Ticket: 🧑🧒 Publish additional informed_entities for parent stops
This is the other half of https://github.com/mbta/alerts_ui/pull/1051. Alerts manager now adds parent entities itself, so we can remove the API logic. They've been running concurrently up until now, but that was causing problems because we were getting duplicate parent entities in cases where the activities differed.
I recreated the blue line shuttle issue in staging here
To confirm this fixes the duplicate parent entities issue:
api/apps/state_mediator/config/config.exs
Line 25 in b536882
to https://mbta-alerts-ui.s3.amazonaws.com/staging/alerts_feed_enhanced.json
place-wondl(one for each direction) and not 4 for alert1003231