Page MenuHomePhabricator

Be explicit about GeoLite2 support in GeoIp2InfoRetriever [M]
Closed, ResolvedPublic

Description

GeoIp2InfoRetriever has implicitly been the reader for "free" tier databases, ie. GeoLite2. We should be explicit about this and remove faux-support for the info we know we won't have access to in the GeoLite2 databases (eg. proxy information).

AC

  • Rename GeoIp2InfoRetriever to GeoLite2InfoRetriever and make all necessary downstream changes where it's called
  • Audit and clean up functions that will never return anything besides a null/null-like value (eg. proxy information) and make a note of its lack of support*
  • Document in https://www.mediawiki.org/wiki/Extension:IPInfo that GeoLite2InfoRetriever only supports GeoLite2-like databases (I can't immediately find a list from maxmind but a list would certainly be helpful, even if we have to make it ourselves)

*For now. An update could come with T293907: Be more specific about falsy values in IP Info api [1H] that would change this AC to support whatever the decision from that ticket is.

Event Timeline

ARamirez_WMF renamed this task from Be explicit about GeoLite2 support in GeoIp2InfoRetriever to Be explicit about GeoLite2 support in GeoIp2InfoRetriever [M].Dec 14 2021, 4:53 PM

Change 752257 had a related patch set uploaded (by STran; author: STran):

[mediawiki/extensions/IPInfo@master] Update GeoLite2 reader to reflect supported dbs

https://gerrit.wikimedia.org/r/752257

Change 752257 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@master] Update GeoLite2 reader to reflect supported dbs

https://gerrit.wikimedia.org/r/752257

Performed regression on IP info masking on Beta.