Page MenuHomePhabricator

Rename $wgIPInfoGeoIP2Path or hard code the GeoLite2/GeoIP2- prefix [S]
Closed, ResolvedPublic

Description

wgIPInfoGeoIP2Path must contain a path and a prefix. Quoting the documentation:

Then set the $wgIPInfoGeoIP2Path variable to the path to the directory containing the .mmdb files, plus either the GeoLite2- or GeoIP2- prefixes.

We could either:

  1. Just add a note to the inline documentation with a note that it must contain either the GeoLite2- or GeoIP2- prefix depending on which database(s) you downloaded 🤷
  2. Do #1 and also rename it to $wgIPInfoGeoIP2Prefix
  3. Hard code the prefix. I (@phuedx) have checked and all databases that I have access to (including the Anonymous IP and Enterprise databases) share the prefix.

Event Timeline

Meeting notes:
Some questions about the preferred way to do this. Consideration about the "GeoLite" prefix.
We said we'll discuss this in engineering.

phuedx renamed this task from Rename $wgIPInfoGeoIP2Path or hard code the GeoIP2- prefix to Rename $wgIPInfoGeoIP2Path or hard code the GeoLite2/GeoIP2- prefix.Sep 2 2021, 12:56 PM
phuedx updated the task description. (Show Details)
ARamirez_WMF renamed this task from Rename $wgIPInfoGeoIP2Path or hard code the GeoLite2/GeoIP2- prefix to Rename $wgIPInfoGeoIP2Path or hard code the GeoLite2/GeoIP2- prefix [S].Sep 29 2021, 4:42 PM

Decision from engineering/estimation is to rename wgIPInfoGeoIP2Path and update it to $wgIPInfoGeoIP2Prefix .

Change 731281 had a related patch set uploaded (by TsepoThoabala; author: TsepoThoabala):

[mediawiki/extensions/IPInfo@master] Rename $wgIPInfoGeoIP2Path

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

Change 731346 had a related patch set uploaded (by Phuedx; author: Phuedx):

[operations/mediawiki-config@master] [beta] Rename $wgIPInfoGeoIP2Path to $wgIPInfoGeoIP2Prefix

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

Change 731281 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@master] Rename $wgIPInfoGeoIP2Path

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

Change 731346 merged by jenkins-bot:

[operations/mediawiki-config@master] [beta] Rename $wgIPInfoGeoIP2Path to $wgIPInfoGeoIP2Prefix

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

Mentioned in SAL (#wikimedia-operations) [2021-10-18T14:36:36Z] <phuedx@deploy1002> Synchronized wmf-config/InitialiseSettings-labs.php: Config: [[gerrit:731346|[beta] Rename $wgIPInfoGeoIP2Path to $wgIPInfoGeoIP2Prefix (T289361)]] (duration: 00m 56s)

once this gets merged we also need to update documentation here
https://www.mediawiki.org/wiki/Extension:IPInfo#Free_test_data

Good point. We should do this before we consider this task complete.

once this gets merged we also need to update documentation here
https://www.mediawiki.org/wiki/Extension:IPInfo#Free_test_data

Good point. We should do this before we consider this task complete.

Updated.
https://www.mediawiki.org/wiki/Extension:IPInfo#Free_test_data

Verification steps done:
I used the new name in my local settings only, and data loaded in my IP info box
$wgIPInfoGeoIP2Prefix = '/var/www/html/w/GeoLite2-'

Note:
Previous name($wgIPInfoGeoIP2Path = '/var/www/html/w/GeoLite2-';) still generates data