Page MenuHomePhabricator

Enable temp account creation in DevelopmentSettings.php
Open, Needs TriagePublic

Description

This is a follow up from discussion of T355879: Make PHPUnit, Selenium, and API testing tests pass with temp account feature flag enabled:

I thought about this task some more, and would like to consider an alternative approach: don't bother creating new temp-account-specific CI jobs and attempting to have CI handle two different anonymous editing paradigms simultaneously. Just set $wgAutoCreateTempUser['enabled'] = true; in DevelopmentSettings.php in the "experimental" section, like we're doing in DevelopmentSettings: Enable auto creation of temp users, get all the tests to pass (we are not that far off from doing so), then, after we've merged that patch, it would mean:

  • MediaWiki uses temp accounts by default when using DevelopmentSettings.php
  • CI only tests temp accounts paradigm for master branch (REL_ branches would be unaffected)
  • Regressions relating to anonymous IP editing would be caught by PHPUnit tests that explicitly switch off temp accounts functionality, or via manual QA / logs review on beta wikis and testwiki / testwiki2

I am leaning toward this way because:

  • Creating duplicate jobs for Selenium/API testing/PHPUnit is going to be time-consuming to do (updating Quibble, building new images, crafting new jobs, deploying a bunch of new jobs) and time-consuming / resource intensive (we already struggle at times with having enough capacity for CI)
  • Most of our existing tests are not badly broken with $wgAutoCreateTempUser['enabled'] = true; which suggests that we don't have a lot of tests targeting anonymous IP editing anyway. From that, I infer that it is probably not going to be missed much in CI if those tests no longer operate in that paradigm.
  • Temp accounts are in the near term future (see also T355880: Decide long term strategy for temp account default) for WMF. We should not invest substantial time and resources in maintaining a dual anonymous IP editing paradigm in CI, when those time/resources could be better used elsewhere

Event Timeline

Change 980947 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/core@master] DevelopmentSettings: Enable auto creation of temp users

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

There are many places using DevelopmentSettings (e.g. https://www.mediawiki.org/wiki/Local_development_quickstart) and enable a feature that is incomplete and not yet compatible with some extensions by default will surprise users.

There are many places using DevelopmentSettings (e.g. https://www.mediawiki.org/wiki/Local_development_quickstart) and enable a feature that is incomplete and not yet compatible with some extensions by default will surprise users.

We would couple this change with announcements to e.g. wikitech-l. I agree that some developers will be surprised, but I would prefer for that to happen in advance of us deploying this functionality to testwiki and pilot wikis, as it gives people more time to file bug reports, report edge case issues, etc.

There are many places using DevelopmentSettings (e.g. https://www.mediawiki.org/wiki/Local_development_quickstart)

AFAIK the places are:

I think in all of the above, we want temp accounts as the default for development environments. Developers can switch it off in LocalSettings.php if they need to work on a task related to anonymous IP editing, using $wgAutoCreateTempUser['enabled'] = false;. (Side note, T356524: Ensure temp accounts can be safely disabled after being enabled exists but is about production deployments; it should not matter at all for local development environments.)

Beta cluster does not load DevelopmentSettings.php, but even if it did, we have config ($wmgEnableIPMasking) that would override the default value in DevelopmentSettings.php.

Are there other places you're concerned about?