Found during a fresh-install walkthrough of 2.5.0-rc.5, measured straight after the first-boot seed completed.
What happens
SELECT count(*) FROM (
SELECT iata FROM airports
WHERE iata IS NOT NULL AND iata <> ''
GROUP BY iata HAVING count(*) > 1
) x;
--> 119
Out of 18,609 seeded airports (all of which do carry a timezone — that part is healthy), 119 IATA codes are held by more than one row. A concrete example: MUC exists both as Munich Airport and as Flughafen München-Riem, the latter closed since 1992.
Why it matters
IATA is what users type and what imports match on. Where a code is ambiguous, whichever row wins the lookup decides the airport's coordinates, country and timezone — so a flight can silently land at a closed airfield, with the wrong country feeding the country statistics and the wrong timezone feeding the displayed times.
This is the same family as the already-fixed #169 (a cruise stop resolving to the wrong country), and 2.5.0 added the guard that a closed airfield is never picked as the nearest airport — but direct IATA lookup still has 119 ambiguous codes to choose from.
Steps to reproduce
- Fresh install; wait for
seed_airports_complete in the log.
- Run the query above.
SELECT iata, name, is_closed FROM airports WHERE iata = 'MUC'; shows the pair.
Worth deciding
Whether the seed should keep placeholder/closed entries that collide with a live code at all, or whether lookup should deterministically prefer the open airport. Either way the ambiguity should not be left to row order.
Version
2.5.0-rc.5 (fresh install, seed completed: 18,609 airports)
Found during a fresh-install walkthrough of 2.5.0-rc.5, measured straight after the first-boot seed completed.
What happens
Out of 18,609 seeded airports (all of which do carry a timezone — that part is healthy), 119 IATA codes are held by more than one row. A concrete example:
MUCexists both as Munich Airport and as Flughafen München-Riem, the latter closed since 1992.Why it matters
IATA is what users type and what imports match on. Where a code is ambiguous, whichever row wins the lookup decides the airport's coordinates, country and timezone — so a flight can silently land at a closed airfield, with the wrong country feeding the country statistics and the wrong timezone feeding the displayed times.
This is the same family as the already-fixed #169 (a cruise stop resolving to the wrong country), and 2.5.0 added the guard that a closed airfield is never picked as the nearest airport — but direct IATA lookup still has 119 ambiguous codes to choose from.
Steps to reproduce
seed_airports_completein the log.SELECT iata, name, is_closed FROM airports WHERE iata = 'MUC';shows the pair.Worth deciding
Whether the seed should keep placeholder/closed entries that collide with a live code at all, or whether lookup should deterministically prefer the open airport. Either way the ambiguity should not be left to row order.
Version
2.5.0-rc.5 (fresh install, seed completed: 18,609 airports)