r5
r5 copied to clipboard
Uploading multiple feeds with same feed ID causes ID collisions
Currently we put all feeds into a map by feed ID, and in the graphql api we pull them out by feed ID when someone e.g. requests all the trips on a route. Unfortunately this breaks when there are multiple versions of the same feed (which of course have the same feed ID). What this means is that scenarios created by the scenario editor quite likely are based on the wrong feed; as far as I can tell, scenarios get either (a) the most recently uploaded feed with a particular ID, if the server has not been restarted since that upload, or (b) the feed whose bundle comes first lexicographically.
Temporary workaround: edit the feed ID to be unique before uploading.
We need to check whether this problem still exists and ensure that when the error message is logged and we return, this is somehow revealed to the user. Currently it may just fail silently from the UI perspective even though the reason is logged on the backend.