Page MenuHomePhabricator

Simetrical (Aryeh Gregor (inactive until at least August 8, 2022))
User

Projects

Today

  • Clear sailing ahead.

Tomorrow

  • Clear sailing ahead.

Sunday

  • Clear sailing ahead.

User Details

User Since
Mar 18 2018, 12:21 PM (223 w, 4 d)
Availability
Available
LDAP User
Unknown
MediaWiki User
Simetrical [ Global Accounts ]

I learn full-time in kollel, and sometimes contract for Wikimedia bein hazemanim.

Recent Activity

May 2 2022

Simetrical updated Simetrical.
May 2 2022, 11:18 AM
Simetrical added a comment to T307301: Many usages of User only make sense for local users and cannot be trivially converted to UserIdentity.

@Simetrical: I don't quite understand why you abandoned the patch you started to fix this, https://gerrit.wikimedia.org/r/c/mediawiki/core/+/787909.

May 2 2022, 7:21 AM · Platform Team Workboards (MW Expedition), MediaWiki-User-management

May 1 2022

Simetrical created T307301: Many usages of User only make sense for local users and cannot be trivially converted to UserIdentity.
May 1 2022, 2:34 PM · Platform Team Workboards (MW Expedition), MediaWiki-User-management

Apr 28 2022

Simetrical closed T305805: Use MainConfigNames constants instead of string literals as Resolved.

I think this is done in core, at least for now. I'm sure more instances will crop up for a while to come, so it probably deserves checking again sometime in the future.

Apr 28 2022, 12:59 PM · MediaWiki-General

Apr 27 2022

Simetrical created T306980: Stop running code in global scope.
Apr 27 2022, 12:35 PM · Patch-For-Review, MediaWiki-General
Simetrical added a comment to T289879: Add type hints to implementers of built-in interfaces for PHP 8.1 compatibility.

Command that should find usages:

Apr 27 2022, 11:47 AM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), MW-1.38-notes, Patch-For-Review, MW-1.35-notes, MW-1.36-notes, MW-1.37-notes, MediaWiki-Authentication-and-authorization, Wikimedia-Rdbms, PHP 8.1 support

Apr 26 2022

Simetrical added a comment to T255309: Remove UserRightsProxy and replace its usages with UserGroupManager.

So a basic question: if I have the ID of a non-local wiki, how do I find out the corresponding database domain? This is necessary to implement UserRightsProxy::invalidateCache as a method of UserrightsPage.

Apr 26 2022, 3:05 PM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), Patch-For-Review, MW-1.38-notes (1.38.0-wmf.22; 2022-02-14), MW-1.37-notes (1.37.0-wmf.23; 2021-09-13), Platform Team Workboards (MW Expedition), MediaWiki-extensions-CentralAuth, Platform Team Initiatives (Decoupling (CDP2)), MediaWiki-User-management
Simetrical renamed T255309: Remove UserRightsProxy and replace its usages with UserGroupManager from Remove UserRightsProxy and replace it's usages with UserGroupManager to Remove UserRightsProxy and replace its usages with UserGroupManager.
Apr 26 2022, 3:03 PM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), Patch-For-Review, MW-1.38-notes (1.38.0-wmf.22; 2022-02-14), MW-1.37-notes (1.37.0-wmf.23; 2021-09-13), Platform Team Workboards (MW Expedition), MediaWiki-extensions-CentralAuth, Platform Team Initiatives (Decoupling (CDP2)), MediaWiki-User-management

Apr 24 2022

Simetrical added a comment to T255309: Remove UserRightsProxy and replace its usages with UserGroupManager.

@daniel, ping?

Apr 24 2022, 12:53 PM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), Patch-For-Review, MW-1.38-notes (1.38.0-wmf.22; 2022-02-14), MW-1.37-notes (1.37.0-wmf.23; 2021-09-13), Platform Team Workboards (MW Expedition), MediaWiki-extensions-CentralAuth, Platform Team Initiatives (Decoupling (CDP2)), MediaWiki-User-management

Apr 14 2022

Simetrical added a comment to T255309: Remove UserRightsProxy and replace its usages with UserGroupManager.

It changes the user table for the other wiki, right? Surely that's why UserRightsProxy::invalidateCache exists to begin with?

Apr 14 2022, 7:58 PM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), Patch-For-Review, MW-1.38-notes (1.38.0-wmf.22; 2022-02-14), MW-1.37-notes (1.37.0-wmf.23; 2021-09-13), Platform Team Workboards (MW Expedition), MediaWiki-extensions-CentralAuth, Platform Team Initiatives (Decoupling (CDP2)), MediaWiki-User-management
Simetrical added a comment to T305805: Use MainConfigNames constants instead of string literals.

This was part two, but I forgot to add the "Bug" annotation:

Apr 14 2022, 7:29 PM · MediaWiki-General

Apr 13 2022

Simetrical added a comment to T255309: Remove UserRightsProxy and replace its usages with UserGroupManager.

What should be used for invalidateCache? Should UserRightsManager have something that can do that, or should it go elsewhere?

Apr 13 2022, 3:59 PM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), Patch-For-Review, MW-1.38-notes (1.38.0-wmf.22; 2022-02-14), MW-1.37-notes (1.37.0-wmf.23; 2021-09-13), Platform Team Workboards (MW Expedition), MediaWiki-extensions-CentralAuth, Platform Team Initiatives (Decoupling (CDP2)), MediaWiki-User-management
Simetrical added a comment to T306020: PHPUnit integration tests fail with "No such service: HookContainer".

In case it's relevant, I get a whole list of those "premature access to service container" warnings also, with no extensions installed. The only change I made to the LocalSettings.php generated by the installer is loading the Vector skin.

Apr 13 2022, 11:48 AM · MediaWiki-Core-Tests
Simetrical created T306020: PHPUnit integration tests fail with "No such service: HookContainer".
Apr 13 2022, 11:47 AM · MediaWiki-Core-Tests

Apr 12 2022

Simetrical closed T289879: Add type hints to implementers of built-in interfaces for PHP 8.1 compatibility as Resolved.

I didn't find any more cases where this is triggered, so I guess let's consider this resolved for now.

Apr 12 2022, 12:16 PM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), MW-1.38-notes, Patch-For-Review, MW-1.35-notes, MW-1.36-notes, MW-1.37-notes, MediaWiki-Authentication-and-authorization, Wikimedia-Rdbms, PHP 8.1 support

Apr 11 2022

Simetrical added a comment to T289879: Add type hints to implementers of built-in interfaces for PHP 8.1 compatibility.

What's the procedure for backporting? I didn't find it in a quick search.

Apr 11 2022, 2:29 PM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), MW-1.38-notes, Patch-For-Review, MW-1.35-notes, MW-1.36-notes, MW-1.37-notes, MediaWiki-Authentication-and-authorization, Wikimedia-Rdbms, PHP 8.1 support
Simetrical added a comment to T289879: Add type hints to implementers of built-in interfaces for PHP 8.1 compatibility.

(because we can't change many of the signatures until T261872: Drop PHP 7.2 support from MediaWiki master branch, once Wikimedia production is on 7.4 is complete... Which is still a way off)

Apr 11 2022, 1:25 PM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), MW-1.38-notes, Patch-For-Review, MW-1.35-notes, MW-1.36-notes, MW-1.37-notes, MediaWiki-Authentication-and-authorization, Wikimedia-Rdbms, PHP 8.1 support
Simetrical added a comment to T289879: Add type hints to implementers of built-in interfaces for PHP 8.1 compatibility.

ArrayAccess and JsonSerializable are two culprits that I find when running unit tests. Interestingly, the change doesn't seem to affect Iterator or Countable.

Apr 11 2022, 12:03 PM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), MW-1.38-notes, Patch-For-Review, MW-1.35-notes, MW-1.36-notes, MW-1.37-notes, MediaWiki-Authentication-and-authorization, Wikimedia-Rdbms, PHP 8.1 support
Simetrical added a comment to T289879: Add type hints to implementers of built-in interfaces for PHP 8.1 compatibility.

Reopening to deal with the remaining issues of this nature. (I figured that made more sense than opening a new task, right?)

Apr 11 2022, 11:44 AM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), MW-1.38-notes, Patch-For-Review, MW-1.35-notes, MW-1.36-notes, MW-1.37-notes, MediaWiki-Authentication-and-authorization, Wikimedia-Rdbms, PHP 8.1 support
Simetrical renamed T289879: Add type hints to implementers of built-in interfaces for PHP 8.1 compatibility from Signatures of several built-in interfaces implemented by MW have changed in PHP 8.1 to Add type hints to implementers of built-in interfaces for PHP 8.1 compatibility.
Apr 11 2022, 11:44 AM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), MW-1.38-notes, Patch-For-Review, MW-1.35-notes, MW-1.36-notes, MW-1.37-notes, MediaWiki-Authentication-and-authorization, Wikimedia-Rdbms, PHP 8.1 support

Apr 10 2022

Simetrical added a comment to T305093: Move dynamic configuration defaults out of Setup.php.

Why not just make it a fixed name based on the name of the setting? Then we wouldn't even have to array_filter(), we could just iterate through the methods with reflection.

Apr 10 2022, 5:58 PM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), Patch-For-Review, MediaWiki-SettingsBuilder
Simetrical created T305805: Use MainConfigNames constants instead of string literals.
Apr 10 2022, 3:39 PM · MediaWiki-General
Simetrical added a comment to T305093: Move dynamic configuration defaults out of Setup.php.

What's the problem with a one-pass iteration to automatically collect all the settings with dynamic defaults? If it's really measured to be a performance problem, it could be done very easily with code generation to avoid repeating the work on each page load.

Apr 10 2022, 2:32 PM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), Patch-For-Review, MediaWiki-SettingsBuilder
Simetrical claimed T300667: Title::loadFromRow leaking memory (due to RestrictionStore::cache having no size limit).

This should only be set if Title::loadFromRow is passed a row that has page_restrictions set. But, sure, cache eviction sounds like a reasonable idea here.

Apr 10 2022, 1:06 PM · Patch-For-Review, MediaWiki-Page-protection

Apr 7 2022

Simetrical closed T305632: Code coverage report generation doesn't work locally as Invalid.

It turns out I had a phpunit.xml from ages ago that I didn't remember existed (nor did I remember that such a thing existed). Now everything works fine.

Apr 7 2022, 6:41 PM · MediaWiki-Core-Tests
Simetrical added a comment to T305632: Code coverage report generation doesn't work locally.

Oh, and the same happens for any other files I try, so it's not just a problem with this file (which I'm in the process of writing now).

Apr 7 2022, 12:49 PM · MediaWiki-Core-Tests
Simetrical created T305632: Code coverage report generation doesn't work locally.
Apr 7 2022, 12:48 PM · MediaWiki-Core-Tests
Simetrical closed T305624: Your Composer dependencies require a PHP version ">= 8.0.2". You are running ... as Resolved.

I have no idea where I originally got my vendor, I installed it years ago. I probably just followed whatever the instructions were on the wiki.

Apr 7 2022, 12:14 PM · MediaWiki-Core-Tests
Simetrical created T305624: Your Composer dependencies require a PHP version ">= 8.0.2". You are running ....
Apr 7 2022, 11:54 AM · MediaWiki-Core-Tests

Apr 6 2022

Simetrical added a comment to T305093: Move dynamic configuration defaults out of Setup.php.

The following are set by default to the value of another setting:

Apr 6 2022, 6:55 PM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), Patch-For-Review, MediaWiki-SettingsBuilder
Simetrical added a comment to T305093: Move dynamic configuration defaults out of Setup.php.

So it occurred to me -- what's the purpose of having a separate class to compute dynamic defaults? Wouldn't it make more sense to put this information in includes/MainConfigSchema.php by allowing 'default' to be a callable that will be executed and return the default value based on the other values that have so far been configured? Of course you'd have to make sure to call the callbacks in the right order, but it seems like a much better solution than pushing this logic all off to a separate class. Dynamic defaults would then be set when SettingsBuilder::finalize() was called, or something like that.

Apr 6 2022, 11:11 AM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), Patch-For-Review, MediaWiki-SettingsBuilder

Apr 5 2022

Simetrical added a comment to T288819: NamespaceInfo service missing namespaces if initialized too early.

Why does the hook not work? Why can't you register a hook for CanonicalNamespaces like

Apr 5 2022, 12:57 PM · Dependency injection, MediaWiki-General
Simetrical added a comment to T288819: NamespaceInfo service missing namespaces if initialized too early.

It sounds to me like his problem is that he wants to set config globals after services are initialized and have the changes be picked up by services. This isn't caught by any existing warning, and can't really be, unless we have some way of making the config globals read-only when services are initialized.

Apr 5 2022, 12:31 PM · Dependency injection, MediaWiki-General
Simetrical added a comment to T288819: NamespaceInfo service missing namespaces if initialized too early.

Minimal example: an extension wants to register a namespace only if a certain config variable is true. As I mentioned in T288819#7409029, the current documentation for this use case is at best misleading, as far as I can tell. (Less minimal example: an extension wants the namespace numbers to be configurable as well.)

Apr 5 2022, 12:06 PM · Dependency injection, MediaWiki-General

Apr 4 2022

Simetrical added a comment to T288819: NamespaceInfo service missing namespaces if initialized too early.

This looks like a bug in the extension. Extensions can either declare namespaces statically, in which case they should work fine; or use the CanonicalNamespaces hook, in which case it should work as long as the hook returns consistent results (and of course is registered before service initialization). Changing configuration globals after service initialization is not supported and will not be supported.

Apr 4 2022, 8:02 PM · Dependency injection, MediaWiki-General

Apr 3 2022

Simetrical added a comment to T300667: Title::loadFromRow leaking memory (due to RestrictionStore::cache having no size limit).

Yes, RestrictionStore doesn't manage its cache and it could in theory grow boundlessly. This is true for all the cache entries there -- I'd think oldRestrictions should be the least of the problem, since the vast majority of titles with restrictions shouldn't have an entry in it. Is this causing real-world problems? Do we have a nice off-the-shelf way to limit the size of caches like this, or best to just write a little method and run it every time a cache entry is added?

Apr 3 2022, 7:42 PM · Patch-For-Review, MediaWiki-Page-protection
Simetrical added a comment to T297082: DefaultPreferencesFactoryTest fails when run on its own.

TestAllServiceOptionsUsed probably should do nothing if the whole suite is not being run?

Apr 3 2022, 7:27 PM · MW-1.39-notes (1.39.0-wmf.6; 2022-04-04), Patch-For-Review, MW-1.38-notes (1.38.0-wmf.12; 2021-12-06), CirrusSearch, Discovery-Search, Growth-Team, Notifications, User-kostajh, MediaWiki-Core-Tests
Simetrical updated Simetrical.
Apr 3 2022, 12:01 PM
Simetrical claimed T305093: Move dynamic configuration defaults out of Setup.php.
Apr 3 2022, 12:00 PM · MW-1.39-notes (1.39.0-wmf.12; 2022-05-16), Patch-For-Review, MediaWiki-SettingsBuilder

Aug 9 2021

Simetrical updated Simetrical.
Aug 9 2021, 10:12 AM

Aug 1 2021

Simetrical updated subscribers of T287575: PageIdentity::getId needs to support reading from DB_PRIMARY for compat with Title::getArticleID.
Aug 1 2021, 3:37 PM · MediaWiki-General
Simetrical updated Simetrical.
Aug 1 2021, 3:36 PM

Jul 28 2021

Simetrical created T287575: PageIdentity::getId needs to support reading from DB_PRIMARY for compat with Title::getArticleID.
Jul 28 2021, 12:33 PM · MediaWiki-General

Apr 22 2020

DannyS712 awarded T200790: Auto-fix errors in pushed changesets where possible a Barnstar token.
Apr 22 2020, 5:50 AM · MediaWiki-Codesniffer, Continuous-Integration-Infrastructure

Oct 30 2019

Simetrical updated Simetrical.
Oct 30 2019, 11:53 AM
Simetrical created T236880: Document when to use different ILoadBalancer::get*Connection* methods.
Oct 30 2019, 9:24 AM · MW-1.35-notes (1.35.0-wmf.35; 2020-06-02), Platform Engineering (Icebox), Performance-Team, Documentation, Wikimedia-Rdbms, MediaWiki-Documentation

Oct 29 2019

Simetrical added a comment to T178136: Encourage type hints for function parameters and return after moving MediaWiki to PHP 7.

What type of errors? Keeping in mind, again, that it only affects type hints on functions, not anything else.

Oct 29 2019, 6:49 PM · MediaWiki-Codesniffer, Technical-Debt, MediaWiki-General
Simetrical added a comment to T178136: Encourage type hints for function parameters and return after moving MediaWiki to PHP 7.

Also, as we start using scalar type hints, we should require declare( strict_types = 1 ) for all files. This will not affect backward compatibility, because it only affects calls to functions with strict type hints. If it's not enabled, PHP will silently cast other scalar types when you call the function, which is surprising. (I'm posting this because I was just bitten by it -- although in my case strict_types wouldn't have helped, because the call to the function was from within PHPUnit.)

Oct 29 2019, 6:19 PM · MediaWiki-Codesniffer, Technical-Debt, MediaWiki-General
Simetrical added a comment to T231419: Audit using a library to bypass 'final' keyword in PHPUnit.

See also the PHP bug: https://bugs.php.net/bug.php?id=65119

Oct 29 2019, 2:28 PM · phan, Patch-For-Review, MediaWiki-Core-Tests
Simetrical updated subscribers of T231419: Audit using a library to bypass 'final' keyword in PHPUnit.

The problem of finals is still interfering with testing work. (This time it's unit tests for FileBackend, where I can't test that it's properly forwarding to LockManager because the LockManager methods are marked final.)

Oct 29 2019, 2:10 PM · phan, Patch-For-Review, MediaWiki-Core-Tests
Simetrical added a comment to T178136: Encourage type hints for function parameters and return after moving MediaWiki to PHP 7.

In addition to the advantages of type hints that have already been mentioned, I'll point out that the language is moving toward more and better type hints. PHP 7.4 has typed class properties, and the next version looks like it will have union types, probably followed by a "mixed" type.

Oct 29 2019, 1:05 PM · MediaWiki-Codesniffer, Technical-Debt, MediaWiki-General
Simetrical closed T201405: Separate Language static methods/members into service(s), a subtask of T231866: Circular dependency when creating service! ContentLanguage, as Resolved.
Oct 29 2019, 10:21 AM · MW-1.34-notes, MW-1.35-notes (1.35.0-wmf.10; 2019-12-10), Performance-Team (Radar), Language-Team, MW-1.34-release, Platform Team Workboards (Clinic Duty Team), MediaWiki-ResourceLoader, MediaWiki-extensions-Gadgets, MediaWiki-libs-Services
Simetrical closed T201405: Separate Language static methods/members into service(s) as Resolved.
Oct 29 2019, 10:21 AM · MW-1.35-notes (1.35.0-wmf.4; 2019-10-29), MW-1.34-notes, MW-1.34-release, Platform Team Workboards (Clinic Duty Team), Patch-For-Review, Platform Team Initiatives (Decoupling (CDP2)), I18n, MediaWiki-Internationalization

Oct 28 2019

Simetrical added a comment to T201405: Separate Language static methods/members into service(s).

Remaining non-deprecated public static methods on Language:

Oct 28 2019, 5:58 PM · MW-1.35-notes (1.35.0-wmf.4; 2019-10-29), MW-1.34-notes, MW-1.34-release, Platform Team Workboards (Clinic Duty Team), Patch-For-Review, Platform Team Initiatives (Decoupling (CDP2)), I18n, MediaWiki-Internationalization

Oct 27 2019

Simetrical added a comment to T231930: Introduce Authority objects to represent the user performing a given action.

As far as I can tell, the issue is we need a way for IP address and cookies to be available for logging and security checks. We obviously are not going to pass these all the way down the call chain. This seems like exactly the use-case a service manager is intended for. Why not just make a service that contains the needed info? Generally we can just inject the info from the service, but if some code wants to perform certain actions that should be considered relevant to a different IP address/set of cookies, it can inject different info. If something is being performed without relevance to any specific IP address, like a maintenance script run via a cron job, it can use 127.0.0.1 as the IP address (which I imagine is the info PHP supplies anyway). And of course empty cookies.

Oct 27 2019, 10:31 AM · Epic, Platform Team Workboards (MW Expedition), Platform Team Initiatives (Decoupling (CDP2)), User-Daniel, MediaWiki-User-management
Simetrical closed T202094: Deprecate Title::getUserCaseDBKey(), a subtask of T214319: In File and FileRepo, replace usage of Title with usage of LinkTarget and PageIdentity , as Resolved.
Oct 27 2019, 9:27 AM · Platform Team Workboards (MW Expedition), Patch-For-Review, MediaWiki-File-management, Multimedia, Commons
Simetrical closed T202094: Deprecate Title::getUserCaseDBKey() as Resolved.
Oct 27 2019, 9:27 AM · MW-1.35-notes (1.35.0-wmf.4; 2019-10-29), Platform Team Workboards (Clinic Duty Team), Platform Team Initiatives (Decoupling (CDP2)), MW-1.33-notes (1.33.0-wmf.9; 2018-12-18), MediaWiki-General

Oct 25 2019

Simetrical added a comment to T236191: SSH login to gerrit no longer works for me (simetrical/Aryeh Gregor).

Nope, config was fine, it was a filtering proxy. The proxy had been configured to allow SSH to the old IP, but needed to be updated to allow the new IP. I should always remember to check for that first before bothering anyone else about issues that could be network-related, but sometimes I forget. :/

Oct 25 2019, 8:36 AM · Gerrit
Simetrical closed T236191: SSH login to gerrit no longer works for me (simetrical/Aryeh Gregor) as Invalid.

Sorry about that, it was a problem on my end after all. All fixed now.

Oct 25 2019, 7:38 AM · Gerrit

Oct 24 2019

Simetrical added a comment to T234227: Improve test coverage for FileBackend and friends.

Coverage for includes/libs/lockmanager: 16.64% of lines (116/697)

Oct 24 2019, 9:25 AM · MW-1.35-notes (1.35.0-wmf.5; 2019-11-05), Patch-For-Review, Platform Team Workboards (Clinic Duty Team), Platform Team Initiatives (Decoupling (CDP2))

Oct 23 2019

Simetrical added a comment to T234227: Improve test coverage for FileBackend and friends.

Coverage for includes/filebackend/: 41.18% of lines (119/289)

Oct 23 2019, 5:19 PM · MW-1.35-notes (1.35.0-wmf.5; 2019-11-05), Patch-For-Review, Platform Team Workboards (Clinic Duty Team), Platform Team Initiatives (Decoupling (CDP2))
Simetrical added a comment to T231799: LuaWikibaseEntityLibraryTest: CI failing en masse.

It runs them a while after the patch is already merged, or what? It doesn't seem to run them every time a new changeset is submitted to Gerrit, nor in gate-and-submit, nor in the post-merge run that Jenkins reports. Those are the test runs I see in practice.

Oct 23 2019, 4:36 PM · MW-1.35-notes (1.35.0-wmf.4; 2019-10-29), Wikimedia-production-error (ARCHIVED -- Shared Build Failure), MW-1.34-notes (1.34.0-wmf.21; 2019-09-03), User-Ladsgroup, Wikidata-Campsite (Wikidata-Campsite-Iteration-∞ (On Hold)), MediaWiki-extensions-Scribunto, Wikidata
Simetrical added a comment to T236191: SSH login to gerrit no longer works for me (simetrical/Aryeh Gregor).

Pushing over HTTPS works for the time being as a workaround.

Oct 23 2019, 4:29 PM · Gerrit
Simetrical added a comment to T193613: RFC: Establish stable interface policy for PHP code.

It occurs to me that we need to define rules for changes in stability similar to rules for deprecation and removal. If I want to mark a public interface as internal when it wasn't officially marked as such in the past, does that need a mention in release notes? If so, where -- the deprecation section or somewhere else? Are there any rules for how soon I can remove a method (or otherwise break callers) after declaring it unstable? Is there going to be any equivalent of hard deprecation for declaring things unstable?

Oct 23 2019, 2:36 PM · TechCom-RFC (TechCom-RFC-Closed), Platform Engineering, Discovery-Search, MediaWiki-General
Simetrical added a comment to T193613: RFC: Establish stable interface policy for PHP code.

If I understand you right, you would like an explicit notice on the generated documentation for all constructors that state that they are not safe to call (unless marked as stable, or the class being marked newable).

I don't know how hard that would be do achieve. Also, seeing the same notice on most constructors make result in "banner blindness"...

Oct 23 2019, 8:56 AM · TechCom-RFC (TechCom-RFC-Closed), Platform Engineering, Discovery-Search, MediaWiki-General

Oct 22 2019

Simetrical added a comment to T236191: SSH login to gerrit no longer works for me (simetrical/Aryeh Gregor).

Gerrit bails out after five failed "logins" - that is, if you have more than five miscellaneous identity files preceding the right one. Yes, it's stupid. (We have a task about it but I can't find it now.) Use something like

Host gerrit.wikimedia.org
  IdentityFile /path/to/gerrit/keyfile
  IdentitiesOnly yes

in your SSH config.

Oct 22 2019, 6:12 PM · Gerrit
Simetrical created T236191: SSH login to gerrit no longer works for me (simetrical/Aryeh Gregor).
Oct 22 2019, 5:04 PM · Gerrit
Simetrical added a comment to T231799: LuaWikibaseEntityLibraryTest: CI failing en masse.

How am I supposed to test its impact on Wikibase before merging? How can I run Wikibase tests on a patch I'm submitting to core, if they aren't run automatically?

Oct 22 2019, 4:41 PM · MW-1.35-notes (1.35.0-wmf.4; 2019-10-29), Wikimedia-production-error (ARCHIVED -- Shared Build Failure), MW-1.34-notes (1.34.0-wmf.21; 2019-09-03), User-Ladsgroup, Wikidata-Campsite (Wikidata-Campsite-Iteration-∞ (On Hold)), MediaWiki-extensions-Scribunto, Wikidata

Sep 1 2019

Simetrical updated Simetrical.
Sep 1 2019, 11:13 AM
Simetrical added a comment to T231710: Recommend PHP7-only features after dropping HHVM support.
  • void return value for functions, for the same reason we want to type-hint generally
  • Convert list() to [] just like we converted array()
  • Specify visibility of class constants (some are only used internally and should be made protected or private)
Sep 1 2019, 10:01 AM · MW-1.34-notes, MW-1.35-notes (1.35.0-wmf.1; 2019-10-08), PHP 7.0 support, Code-Health
Simetrical added a comment to T231710: Recommend PHP7-only features after dropping HHVM support.

It looks like soon we're probably going to require PHP 7.2, so features from 7.1 and 7.2 should be considered as well. These pages are useful:

Sep 1 2019, 9:29 AM · MW-1.34-notes, MW-1.35-notes (1.35.0-wmf.1; 2019-10-08), PHP 7.0 support, Code-Health
Simetrical added a comment to T231159: Wrap file access so it can be mocked.

It is not part of the contract of a cache to cache something, insofar as caches by definition are for things that can be regenerated, and therefore are not designed to guarantee persistency.

Sep 1 2019, 9:01 AM · MediaWiki-Core-Tests
Simetrical added a comment to T231656: MediaWikiTestCaseTrait::creatNoOpMock should permit calling destructors.

Is this actually causing problems? MovePage did have it because destruct would actually get called, but now it seems it doesn't. Why would destruct actually get called on the mock? It seems it doesn't really get called every time an object is destroyed.

Sep 1 2019, 8:53 AM · MW-1.34-notes (1.34.0-wmf.21; 2019-09-03), MediaWiki-Core-Tests

Aug 30 2019

Simetrical added a comment to T225730: Reduce runtime of MW shared gate Jenkins jobs to 5 min.

For the overloading issue, is there any option of just getting more resources? Maybe using EC2 or similar? We're trying to add lots more tests, and one way or another, we're going to need more resources to run them.

Aug 30 2019, 9:10 AM · MW-1.39-notes (1.39.0-wmf.8; 2022-04-18), MW-1.38-notes (1.38.0-wmf.16; 2022-01-03), Release-Engineering-Team (Next), MW-1.36-notes (1.36.0-wmf.36; 2021-03-23), MW-1.35-notes (1.35.0-wmf.27; 2020-04-07), Patch-For-Review, Developer Productivity, Code-Health, Performance-Team (Radar), Epic, MediaWiki-Core-Tests, Continuous-Integration-Config
Simetrical created T231631: Allow using non-Gregorian calendars in all languages.
Aug 30 2019, 8:42 AM · MediaWiki-Internationalization
Simetrical added a comment to T231551: NamespaceInfo.php: PHP Notice: A non well formed numeric value encountered.

ChangesListSpecialPage is not validating the parameters. It's assuming that the namespace parameter in the query string is a semicolon-delimited list of numbers. The URL here is invalid, and has garbage after the namespace parameter:

namespace=1%20waitfor%20delay%20'0:0:10'%20--%20

This will be parsed to int(1), which is probably correct, but it issues a notice.

Aug 30 2019, 7:24 AM · Growth-Team-Filtering, Growth-Team, MediaWiki-General
Simetrical added a comment to T225730: Reduce runtime of MW shared gate Jenkins jobs to 5 min.

Again, there are two concerns: reducing latency, and reducing server load. The two are only related if the servers are actually overloaded and therefore individual jobs take longer. What exactly is our concern here? Latency, server load, or both?

Aug 30 2019, 7:16 AM · MW-1.39-notes (1.39.0-wmf.8; 2022-04-18), MW-1.38-notes (1.38.0-wmf.16; 2022-01-03), Release-Engineering-Team (Next), MW-1.36-notes (1.36.0-wmf.36; 2021-03-23), MW-1.35-notes (1.35.0-wmf.27; 2020-04-07), Patch-For-Review, Developer Productivity, Code-Health, Performance-Team (Radar), Epic, MediaWiki-Core-Tests, Continuous-Integration-Config

Aug 29 2019

Simetrical added a comment to T231159: Wrap file access so it can be mocked.

It seems that what you're suggesting is that instead of defining a wrapper class that you can use if you want to mock the file access, each class should define separate methods on an ad hoc basis to wrap the file access. Wouldn't it be preferable to define the wrappers only once?

Aug 29 2019, 3:24 PM · MediaWiki-Core-Tests
Simetrical added a comment to T230979: CR+2 on MediaWiki for Aryeh Gregor (aka Simetrical).

It's been seven days, and seemingly no objections. It would be useful for me to have +2 rights now just to re-submit patches I've written that failed gate-and-submit due to flaky tests or non-substantive reasons ("HHVM doesn't like syntax X"). I seem to have a lot of those, and right now I have to wait for someone else to deal with it.

Aug 29 2019, 2:42 PM · MediaWiki-Gerrit-Group-Requests
Simetrical added a comment to T218555: Provide access to WebRequest and associated information via a service object.

What I mean is - what is our strategy for constructing things like a RevisionStore, Parser or MessageCache for another wiki. If services only vary by wiki and their Config, it is logically trivial to construct another tree for that, so long as its config can be retrieved (SiteConfiguration, legacy, known issues, limitations etc. yes).

Aug 29 2019, 2:32 PM · TechCom, MediaWiki-libs-Services, Platform Team Initiatives (Decoupling (CDP2))
Simetrical added a comment to T218555: Provide access to WebRequest and associated information via a service object.

Will do next. Meanwhile:

  • What are both your thoughts on the cross-wiki use case?

How might this work with WebRequest in the service container? Or does it not matter for that use case whether WebRequest is in or out the service container? Or should we depart from this long-term ideal? If so, what would be our strategy for use cases of that kind going forward? (E.g. HTTP requests to API only)

Aug 29 2019, 1:08 PM · TechCom, MediaWiki-libs-Services, Platform Team Initiatives (Decoupling (CDP2))
Simetrical added a comment to T231159: Wrap file access so it can be mocked.

Since the point of a cache is to save disk reads, I think we would want to directly test that it doesn't do unnecessary disk risks. Otherwise the cache isn't doing its job. Just injecting the directory doesn't give you any way to directly test that the cache is saving disk reads, i.e., that it's behaving usefully.

Aug 29 2019, 11:35 AM · MediaWiki-Core-Tests
Simetrical added a comment to T225730: Reduce runtime of MW shared gate Jenkins jobs to 5 min.

If you want to split things up, split up PHPUnit tests themselves into multiple chunks. That will allow reducing latencies more or less arbitrarily, assuming we have adequate server resources and we don't spend too much time in setting up the test instance.

Aug 29 2019, 11:31 AM · MW-1.39-notes (1.39.0-wmf.8; 2022-04-18), MW-1.38-notes (1.38.0-wmf.16; 2022-01-03), Release-Engineering-Team (Next), MW-1.36-notes (1.36.0-wmf.36; 2021-03-23), MW-1.35-notes (1.35.0-wmf.27; 2020-04-07), Patch-For-Review, Developer Productivity, Code-Health, Performance-Team (Radar), Epic, MediaWiki-Core-Tests, Continuous-Integration-Config
Simetrical added a comment to T231488: UploadFromChunks.php: Call to undefined method MediaWiki\FileBackend\FSFile\TempFSFileFactory::getTempFSFile().

Why did phan not catch this?

Aug 29 2019, 10:09 AM · MW-1.34-notes (1.34.0-wmf.20; 2019-08-27), MediaWiki-Uploading, Wikimedia-production-error

Aug 28 2019

Simetrical added a comment to T218555: Provide access to WebRequest and associated information via a service object.
  • It's not everywhere –The subset of MediaWiki that both 1) cannot compute these and 2) cannot be given these by method parameter, almost always has a RequestContext already. So we've already paid the migration cost for this over the past years. They already have direct or nearby access to these concepts. The number of places where we currently need to call RequestContext::getMain() is quite small, and migrating these away seems quite doable (we've already done it in most other places).
Aug 28 2019, 4:05 PM · TechCom, MediaWiki-libs-Services, Platform Team Initiatives (Decoupling (CDP2))
Simetrical added a comment to T218555: Provide access to WebRequest and associated information via a service object.

In practical terms:
PermissionManager::getUserPermissions currently relies on global variables via RequestContext::getMain(). I want to change that. Making the necessary context injectable is simple and would fix the problem.

Aug 28 2019, 1:55 PM · TechCom, MediaWiki-libs-Services, Platform Team Initiatives (Decoupling (CDP2))
Simetrical added a comment to T218555: Provide access to WebRequest and associated information via a service object.

If I understand correctly, Krinke's point is that the behavior of a service should only vary on 1) the parameters provided and b) configuration. Injecting knowledge about the current Request, User, Session, etc breaks that assumption. So these things should be provided as parameters where needed.

Aug 28 2019, 1:50 PM · TechCom, MediaWiki-libs-Services, Platform Team Initiatives (Decoupling (CDP2))
Simetrical created T231434: How to support extensions overriding services without having to update them for every constructor signature change.
Aug 28 2019, 11:47 AM · MediaWiki-extensions-General, MediaWiki-libs-Services
Simetrical added a comment to T231159: Wrap file access so it can be mocked.

For that matter, testing anything in that method requires making assumptions about the contents of files in the filesystem and perhaps copy-pasting something about their contents. This doesn't seem like the best approach. The correctness of Language::getGrammarTransformations() shouldn't have to depend on the data that we happen to ship.

Aug 28 2019, 10:08 AM · MediaWiki-Core-Tests
Simetrical reopened T231159: Wrap file access so it can be mocked as "Open".

So here's an example: Language::getGrammarTransformations() will throw an exception if it finds invalid JSON in a grammar transformations file. The file path is hardcoded to __DIR__ . "/data/grammarTransformations/$languageCode.json" and accessed with is_readable() and file_get_contents(). How are we supposed to test that the exception is thrown properly?

Aug 28 2019, 9:48 AM · MediaWiki-Core-Tests
Simetrical added a comment to T30426: Remove stub link formatting user preference from MediaWiki core.

If we wanted to make this feature work properly, I think the right way would be to parse the HTML page content for links, find all links to pages on the current wiki, run a DB query to see how big they are, and add a suitable class to the parsed HTML. This would not affect caching; would have no performance impact on anyone who has the feature disabled; and for whoever has the feature enabled, will add one HTML parse/serialize and one (small, indexed) database query.

Aug 28 2019, 8:48 AM · Performance Issue, WorkType-NewFunctionality, MediaWiki-General
Simetrical closed T231159: Wrap file access so it can be mocked as Invalid.

Maybe it doesn't really need to be mocked, then. I'll reopen if I find a case where it really does.

Aug 28 2019, 7:31 AM · MediaWiki-Core-Tests

Aug 27 2019

Simetrical added a comment to T225730: Reduce runtime of MW shared gate Jenkins jobs to 5 min.

I think the best returns here are going to be not on pinpointing specific tests, but looking for systemic issues. Even if you find a test that takes ten seconds, optimizing it will save at most ten seconds, and there aren't enough such tests to add up to the target savings of 10+ minutes.

Aug 27 2019, 4:30 PM · MW-1.39-notes (1.39.0-wmf.8; 2022-04-18), MW-1.38-notes (1.38.0-wmf.16; 2022-01-03), Release-Engineering-Team (Next), MW-1.36-notes (1.36.0-wmf.36; 2021-03-23), MW-1.35-notes (1.35.0-wmf.27; 2020-04-07), Patch-For-Review, Developer Productivity, Code-Health, Performance-Team (Radar), Epic, MediaWiki-Core-Tests, Continuous-Integration-Config
Simetrical closed T231183: L10n cache is completely broken, a subtask of T220745: 1.34.0-wmf.20 deployment blockers, as Resolved.
Aug 27 2019, 7:15 AM · User-zeljkofilipin, Release-Engineering-Team-TODO (201908), Release-Engineering-Team (Deployment services), Release, Train Deployments
Simetrical closed T231183: L10n cache is completely broken as Resolved.
Aug 27 2019, 7:15 AM · Platform Engineering, MW-1.34-notes (1.34.0-wmf.20; 2019-08-27), MediaWiki-Internationalization, MediaWiki-libs-ObjectCache

Aug 26 2019

Simetrical added a comment to T218555: Provide access to WebRequest and associated information via a service object.

So let's say for LBFactory, how would you suggest making it not depend at all on the current request? How should it get the request's IP address and User-Agent so that ChronologyProtector works?

Aug 26 2019, 5:56 PM · TechCom, MediaWiki-libs-Services, Platform Team Initiatives (Decoupling (CDP2))
Simetrical added a comment to T231183: L10n cache is completely broken.

Then I think it's resolved, although the patch is being backed out anyway for now because of T231198/T231200.

Aug 26 2019, 5:51 PM · Platform Engineering, MW-1.34-notes (1.34.0-wmf.20; 2019-08-27), MediaWiki-Internationalization, MediaWiki-libs-ObjectCache
Simetrical added a comment to T231220: Figure out how to make LocalisationCache a service without hurting performance.

By the way, @Ladsgroup, how did you actually measure the performance hit here? I'm going to need a way to test it to make sure I've fixed the problem before re-committing.

Aug 26 2019, 5:49 PM · Platform Team Workboards (Clinic Duty Team), MediaWiki-General
Simetrical created T231220: Figure out how to make LocalisationCache a service without hurting performance.
Aug 26 2019, 5:48 PM · Platform Team Workboards (Clinic Duty Team), MediaWiki-General
Simetrical added a comment to T218555: Provide access to WebRequest and associated information via a service object.

Few services will actually want direct access to the request info, so I'd think it doesn't make sense to make a service for this without specific use-cases that don't make more sense to deal with by other means. For instance, LBFactory needs only a few specific pieces of information from the request, so it doesn't seem necessary to make a whole service to pass in for it.

Aug 26 2019, 5:21 PM · TechCom, MediaWiki-libs-Services, Platform Team Initiatives (Decoupling (CDP2))