Page MenuHomePhabricator

Anomie (Brad Jorsch)
Senior Software Engineer, WMF

Projects (16)

Today

  • Clear sailing ahead.

Tomorrow

  • Clear sailing ahead.

Saturday

  • Clear sailing ahead.

User Details

User Since
Oct 7 2014, 1:25 PM (241 w, 2 d)
Availability
Available
IRC Nick
anomie
LDAP User
Anomie
MediaWiki User
Anomie [ Global Accounts ]

Recent Activity

Today

Anomie added a project to T144482: ISO date format not honored by Mediawiki API (arvbadtimestamp_arvstart): Core Platform Team Kanban (Waiting for Review).
Thu, May 23, 6:01 PM · Core Platform Team Kanban (Waiting for Review), Patch-For-Review, Timestamp, MediaWiki-API
Anomie committed R1985:556477d76889: Accept ISO 8601 expanded format with space in place of T (authored by Anomie).
Accept ISO 8601 expanded format with space in place of T
Thu, May 23, 6:01 PM
Anomie committed R1985:f30fcd07021b: Improve ISO 8601 support in setTimestamp() (authored by Anomie).
Improve ISO 8601 support in setTimestamp()
Thu, May 23, 6:01 PM
Anomie committed R1985:f79a68e49132: Honor timezones in input, and correct some odd accepted values (authored by Anomie).
Honor timezones in input, and correct some odd accepted values
Thu, May 23, 6:01 PM
Anomie committed R1985:b5346b03b54b: Improve ISO 8601 support in setTimestamp() (authored by Anomie).
Improve ISO 8601 support in setTimestamp()
Thu, May 23, 5:37 PM
Anomie committed R1985:138198e9dcdf: Honor timezones in input, and correct some odd accepted values (authored by Anomie).
Honor timezones in input, and correct some odd accepted values
Thu, May 23, 5:15 PM
Anomie added a project to T224202: TS_UNIX_MICRO gets things wrong for timestamps before the epoch: Core Platform Team Kanban (Waiting for Review).
Thu, May 23, 5:04 PM · Core Platform Team Kanban (Waiting for Review), Patch-For-Review, Timestamp
Anomie added a project to T224199: TS_RFC2822 doesn't properly implement RFC 2822: Core Platform Team Kanban (Waiting for Review).
Thu, May 23, 5:04 PM · Core Platform Team Kanban (Waiting for Review), Patch-For-Review, Timestamp
Anomie added a project to T224198: ConvertibleTimestamp accepts some weird, invalid-seeming time strings: Core Platform Team Kanban (Waiting for Review).
Thu, May 23, 5:04 PM · Core Platform Team Kanban (Waiting for Review), Patch-For-Review, Timestamp
Anomie added a project to T224197: ConvertibleTimestamp inconsistent timezone handling in accepted time strings: Core Platform Team Kanban (Waiting for Review).
Thu, May 23, 5:04 PM · Core Platform Team Kanban (Waiting for Review), Patch-For-Review, Timestamp
Anomie edited projects for T224017: Slow query ApiQueryRevisions on enwiki , added: Core Platform Team (Security, stability, performance and scalability (TEC1)); removed Core Platform Team.
Thu, May 23, 5:02 PM · Core Platform Team (Security, stability, performance and scalability (TEC1)), Core Platform Team Kanban (Waiting for Review), Patch-For-Review, DBA, MediaWiki-Database
Anomie added a project to T224017: Slow query ApiQueryRevisions on enwiki : Core Platform Team Kanban (Waiting for Review).
Thu, May 23, 5:00 PM · Core Platform Team (Security, stability, performance and scalability (TEC1)), Core Platform Team Kanban (Waiting for Review), Patch-For-Review, DBA, MediaWiki-Database
Anomie added a comment to T223737: Increase Memory Limit for Scribunto.

I have no opinion. I don't think the existing 50MB limit was chosen for any specific reason.

Thu, May 23, 4:31 PM · serviceops, Performance-Team (Radar), Performance, Patch-For-Review, Operations, Wikimedia-Site-requests
Anomie closed T223791: API Sandbox strips out some query parameters as Invalid.

Can't reproduce with Firefox 66 or Chromium 74.

Thu, May 23, 4:24 PM · MediaWiki-API
Anomie updated subscribers of T224224: [GrowthExperiments] Sessions are disabled for this entry point.

After digging through the stack trace, rMW855b1794b6b7: Unstub $wgLang for PageContentLanguage hook looks likely to have caused this. It's #12 in the first stack trace and #10 in the second.

Thu, May 23, 4:08 PM · Growth-Team (Current Sprint), Patch-For-Review, GrowthExperiments-Help panel, Wikimedia-production-error
Anomie added a comment to T187147: Port mediawiki/php/wmerrors to PHP7 and deploy.
  • To provide backtraces for catchable fatals. I don't know why this is hard to do. It's probably just some bug in MWExceptionHandler that stops this from happening.
Thu, May 23, 2:41 PM · Core Platform Team Kanban (Doing), wmerrors, Wikimedia-Logstash, MediaWiki-Logging, Operations, User-herron, MW-1.34-notes (1.34.0-wmf.5; 2019-05-14), Patch-For-Review, PHP 7.2 support, Core Platform Team (PHP7 (TEC4)), Performance-Team (Radar)
Anomie committed R1985:69c78952cb3b: Honor timezones in input, and correct some odd accepted values (authored by Anomie).
Honor timezones in input, and correct some odd accepted values
Thu, May 23, 3:01 AM
Anomie added a comment to T219279: Some pages will become completely unreachable after PHP7 update due to Unicode changes.

This now work as expected both via HHVM and PHP 7 (serves page ID 7074938).

Thu, May 23, 2:39 AM · Core Platform Team Kanban (Waiting for Review), MW-1.34-notes (1.34.0-wmf.4; 2019-05-07), Patch-For-Review, Core Platform Team (PHP7 (TEC4)), serviceops, Operations, PHP 7.2 support, MediaWiki-General-or-Unknown
Anomie committed R1985:7ce5fa7fb523: Honor timezones in input, and correct some odd accepted values (authored by Anomie).
Honor timezones in input, and correct some odd accepted values
Thu, May 23, 1:09 AM
Anomie created T224202: TS_UNIX_MICRO gets things wrong for timestamps before the epoch.
Thu, May 23, 1:06 AM · Core Platform Team Kanban (Waiting for Review), Patch-For-Review, Timestamp
Anomie committed R1985:1e2a87499259: Honor timezones in input, and correct some odd accepted values (authored by Anomie).
Honor timezones in input, and correct some odd accepted values
Thu, May 23, 1:01 AM

Yesterday

Anomie updated subscribers of T223239: REST API Parameter Validation.

Brainstorming a bit, please give feedback.

Wed, May 22, 11:29 PM · MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Core Platform Team Kanban (Doing)
Anomie created T224199: TS_RFC2822 doesn't properly implement RFC 2822.
Wed, May 22, 11:26 PM · Core Platform Team Kanban (Waiting for Review), Patch-For-Review, Timestamp
Anomie created T224198: ConvertibleTimestamp accepts some weird, invalid-seeming time strings.
Wed, May 22, 11:26 PM · Core Platform Team Kanban (Waiting for Review), Patch-For-Review, Timestamp
Anomie created T224197: ConvertibleTimestamp inconsistent timezone handling in accepted time strings.
Wed, May 22, 11:26 PM · Core Platform Team Kanban (Waiting for Review), Patch-For-Review, Timestamp
Anomie added a project to T144482: ISO date format not honored by Mediawiki API (arvbadtimestamp_arvstart): Timestamp.
Wed, May 22, 11:12 PM · Core Platform Team Kanban (Waiting for Review), Patch-For-Review, Timestamp, MediaWiki-API

Tue, May 21

Anomie committed rMLOF948605d0d2b5: Enhance to be able to replace most/all MediaWiki object instantiation (authored by Anomie).
Enhance to be able to replace most/all MediaWiki object instantiation
Tue, May 21, 6:49 PM

Mon, May 20

Anomie added a project to T223151: Review special replica partitioning of certain tables by `xx_user`: Performance.

@Marostegui moved this task from In progress to Blocked external/Not db team on the DBA board.

Mon, May 20, 8:49 PM · Performance, Core Platform Team Backlog (Watching / External), DBA
Anomie added a comment to T221177: REST route handler extension interface RFC.

I'm leaning towards a descriptive name for this library, either Rest or RestServer. The Gerrit repository would be mediawiki/libs/Rest, the Composer name would be wikimedia/rest, and the namespace would be Wikimedia\Rest.

Mon, May 20, 5:31 PM · TechCom-RFC, Patch-For-Review, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Core Platform Team Kanban (Doing)
Anomie closed T223267: mw.uri doesn't parse RFC 3986 IP-literal syntax as Resolved.
Mon, May 20, 3:49 PM · MW-1.34-notes (1.34.0-wmf.6; 2019-05-21), Patch-For-Review, Core Platform Team Kanban (Waiting for Review), MediaWiki-extensions-Scribunto
Anomie removed a project from T188327: Deploy refactored actor storage: Patch-For-Review.
Mon, May 20, 3:26 PM · MW-1.33-notes, MW-1.34-notes (1.34.0-wmf.4; 2019-05-07), Core Platform Team Kanban (Doing), MW-1.32-notes, Core Platform Team (Code Health (TEC13)), Epic

Fri, May 17

Krenair awarded T223406: Remove reference to fields replaced by the actor table from WMCS views a Evil Spooky Haunted Tree token.
Fri, May 17, 10:35 PM · Patch-For-Review, Data-Services, Core Platform Team Backlog (Watching / External)
Anomie added a comment to T221177: REST route handler extension interface RFC.
In T221177#5188930, @daniel wrote that @tstarling wrote:
  • Introduce and libraryize a new interface for BagOStuff
Fri, May 17, 4:36 PM · TechCom-RFC, Patch-For-Review, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Core Platform Team Kanban (Doing)
Anomie added a comment to T221339: Missing index on revision_userindex.rev_actor.

The coalesce is indeed causing it to not be able to use the index. In general, the planner can't know how the output of a function depends on the input columns in order to be able to use the input columns for indexing. For COALESCE() it probably could special-case it, but it doesn't look like it does.

Fri, May 17, 3:40 PM · Patch-For-Review, Data-Services
Anomie updated the task description for T161671: Compacting the revision table.
Fri, May 17, 3:36 PM · Core Platform Team (Code Health (TEC13)), Core Platform Team Backlog (Epic), Multi-Content-Revisions, Epic, Patch-For-Review, MediaWiki-Database, Schema-change
Anomie added a comment to T212972: Remove reference to text fields replaced by the comment table from WMCS views.

How long is "a while"?

Fri, May 17, 3:28 PM · Patch-For-Review, Data-Services, Core Platform Team Backlog (Watching / External)
Anomie updated subscribers of T220493: Xml stubs dumps are running 5 to 15x slower than previously.

The queries quoted in this task seem to be as optimized as they can be, and the needed indexes seem to already be in place. #2 is probably the answer: fetch a batch of revisions, then in PHP collect the revision IDs from the batch and do SELECT slot_revision_id,slot_content_id,slot_origin,slot_role_id,content_size,content_sha1,content_address,content_model FROM `slots` JOIN `content` ON ((slot_content_id = content_id)) WHERE slot_revision_id IN (...) to fetch the slot data all at once and merge that in somehow. Then probably collect the content addresses and use ExternalStore::batchFetchFromURLs() to fetch the actual contents for all those slots in a batch as well.

Fri, May 17, 2:35 PM · Core Platform Team (MCR), Core Platform Team Kanban (Doing), Patch-For-Review, MediaWiki-General-or-Unknown, Dumps-Generation

Wed, May 15

Anomie updated the task description for T188327: Deploy refactored actor storage.
Wed, May 15, 6:55 PM · MW-1.33-notes, MW-1.34-notes (1.34.0-wmf.4; 2019-05-07), Core Platform Team Kanban (Doing), MW-1.32-notes, Core Platform Team (Code Health (TEC13)), Epic
Anomie created T223406: Remove reference to fields replaced by the actor table from WMCS views.
Wed, May 15, 6:51 PM · Patch-For-Review, Data-Services, Core Platform Team Backlog (Watching / External)
Anomie added a comment to T222409: Standardize declarative object construction in MediaWiki.

The only minor annoyance I spotted is with this:
If 'use_di_container' is set, array_unshift( $args, $services )

Having access to the service container in a factory method (wiring code), injecting it into a constructor is bad (the constructor of ObjectFactoryService itself being a rare exception to that rule). Objects holding on to a reference to the ServiceContainer in a member field is worse (again, ObjectFactoryService being the notable exception). The documentation of use_di_container should make this very clear.

Wed, May 15, 2:18 PM · Patch-For-Review, Performance-Team (Radar), MediaWiki-General-or-Unknown, ObjectFactory
Anomie removed a project from T188327: Deploy refactored actor storage: Patch-For-Review.
Wed, May 15, 1:21 PM · MW-1.33-notes, MW-1.34-notes (1.34.0-wmf.4; 2019-05-07), Core Platform Team Kanban (Doing), MW-1.32-notes, Core Platform Team (Code Health (TEC13)), Epic

Tue, May 14

Anomie added a comment to T125050: [Task] Add Scribunto to extension-gate in CI.

Scribunto has a set of test to make sure it works fine with some LUA interpreters. That is really nice but takes a few minutes iirc. When one send a patch for another extension, we are 100% sure they are not going to affect how LUA runs.

Tue, May 14, 9:02 PM · Wikidata-Campsite (Wikidata-Campsite-Iteration-∞), Patch-For-Review, Continuous-Integration-Config, MediaWiki-extensions-Scribunto, Wikidata
Anomie added a comment to T222224: Normalizing *links tables.

Is imagelinks local?

Tue, May 14, 8:58 PM · MediaWiki-Database, TechCom-RFC
Anomie added a comment to T223195: Invalid IPv6 URL on page causes all non-autoconfirmed edits to trigger CAPTCHA.

Here's the series of events going on there:

  • The page is saved containing the bad link.
    • The Parser's output includes the bad link in the ParserOutput metadata.
    • The job for inserting the externallinks table rows for the page runs. For our bad link it gets 0 indexes from LinkFilter::makeIndexes(), so makes no insertion for this bad link.
      • The 0 index entries comes because wfParseUrl() returns false, which in turn is because PHP's built-in parse_url() returns false, which seems to be because it tries to interpret the ":0000" at the end as a port number and finds that invalid.
  • The subsequent edit is made, not modifying the bad link.
    • Again, the Parser's output includes the bad link in the ParserOutput metadata.
    • ConfirmEdit checks the externallinks table to find the existing links in the page. to detect whether any new links have been added in the edit being made. Since there's no externallinks entry for this bad link, it thinks it's new and so triggers a captcha.
Tue, May 14, 8:35 PM · ConfirmEdit (CAPTCHA extension)
Anomie created T223326: JS mediawiki-title library has wrong max length.
Tue, May 14, 7:56 PM · Core Platform Team (Security, stability, performance and scalability (TEC1)), Core Platform Team Kanban, Services (next)
Anomie added a comment to T221177: REST route handler extension interface RFC.

For modern API clients, would ETag be harder or less likely to be supported than Last-Modified?

Tue, May 14, 4:10 PM · TechCom-RFC, Patch-For-Review, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Core Platform Team Kanban (Doing)
Anomie added a comment to T221177: REST route handler extension interface RFC.

Question from @Krinkle from Gerrit: can getLastModified() be omitted? You can construct an ETag from a timestamp, so ETag is a more generic facility.

Tue, May 14, 2:14 PM · TechCom-RFC, Patch-For-Review, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Core Platform Team Kanban (Doing)
Anomie created T223267: mw.uri doesn't parse RFC 3986 IP-literal syntax.
Tue, May 14, 12:52 PM · MW-1.34-notes (1.34.0-wmf.6; 2019-05-21), Patch-For-Review, Core Platform Team Kanban (Waiting for Review), MediaWiki-extensions-Scribunto

Mon, May 13

Anomie created T223151: Review special replica partitioning of certain tables by `xx_user`.
Mon, May 13, 5:50 PM · Performance, Core Platform Team Backlog (Watching / External), DBA
Anomie added a comment to T221177: REST route handler extension interface RFC.
  • How should MediaWiki policies like cookie name prefixes be handled? Should RequestInterface and ResponseInterface be extended as necessary? Should they wrap $wgRequest?
Mon, May 13, 4:50 PM · TechCom-RFC, Patch-For-Review, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Core Platform Team Kanban (Doing)

Wed, May 8

Anomie added a comment to T210792: Remove uses of mcrypt from MediaWiki.

@Anomie Is there something here that should prevent WMF from rolling out PHP 7.2 to all users/servers given the current state of MW core, WMF config, and WMF's PHP settings/extensions?

Wed, May 8, 3:51 PM · Technical-Debt, MW-1.34-release, Security, MediaWiki-General-or-Unknown
Anomie added a comment to T222402: Bulk API undeletion results in database query error.

Err, yeah, I meant "action=undelete requests".

Wed, May 8, 3:31 PM · Wikimedia-production-error, MediaWiki-Page-deletion, MediaWiki-API
Anomie added a comment to T212284: Fatal db error "Could not select database 'centralauth'" (sometimes also 'metawiki').

If the last query was fine, but the connection has silently been dropped since then (due to not being used for a while), then it seems like the selection logic either needs to use query() or cherry-pick its reconnect logic on top of its use of doQuery().

Wed, May 8, 3:16 PM · Patch-For-Review, Core Platform Team Kanban, Core Platform Team (Security, stability, performance and scalability (TEC1)), Performance-Team (Radar), Services (next), MediaWiki-Database, MediaWiki-extensions-CentralAuth, Wikimedia-production-error
Anomie moved T222678: Add image-rendering to cssImage3 set from Unsorted to Needs code on the css-sanitizer board.

image-rendering is a CSS Image 3 property

Wed, May 8, 3:15 PM · css-sanitizer
Anomie moved T222388: Create a mechanism for SpecialPages and API modules to have dependencies injected into them from Unsorted to Blocked on the MediaWiki-API board.

I think it would likely be best to block this on T222409: Standardize declarative object construction in MediaWiki, at which point we'll likely find that this has already been resolved.

Wed, May 8, 3:11 PM · Core Platform Team (Code Health (TEC13)), Core Platform Team Backlog (Later), MediaWiki-ServiceContainer, MediaWiki-API, MediaWiki-Special-pages, TechCom, Technical-Debt
Anomie added a comment to T219279: Some pages will become completely unreachable after PHP7 update due to Unicode changes.

The long-term plan, as I understand it, is that we'll run maintenance scripts to rename pages (see gerrit:507596) and users (see rEWMA9122f6c) that are affected by the change, then reverse rOMWC713a20a0f2dd: Add Language::ucfirst overrides for php 7.2 to have HHVM use PHP 7.2's uppercasing table. Note we may have to follow the same process in the future whenever we upgrade to a new version of PHP, as it seems upstream is intending to do a better job of tracking new versions of Unicode.

Wed, May 8, 3:04 PM · Core Platform Team Kanban (Waiting for Review), MW-1.34-notes (1.34.0-wmf.4; 2019-05-07), Patch-For-Review, Core Platform Team (PHP7 (TEC4)), serviceops, Operations, PHP 7.2 support, MediaWiki-General-or-Unknown

Tue, May 7

Anomie closed T215444: mw.ext.data.get from JsonConfig doesn't work with PHP 7 as Resolved.

Should be resolved.

Tue, May 7, 6:50 PM · MW-1.33-notes (1.33.0-wmf.17; 2019-02-12), Patch-For-Review, PHP 7.2 support, Commons-Datasets, MediaWiki-extensions-JsonConfig
Anomie added a comment to T222742: MigrationBagOStuff.
  • MultiWriteBagOStuff: similar, but without the read fallback
Tue, May 7, 5:56 PM · User-Clarakosi, Core Platform Team Backlog (Next), Core Platform Team (Session Management Service (CDP2)), User-Eevans

Mon, May 6

Anomie added a comment to T221177: REST route handler extension interface RFC.

AIUI we want to do that by discouraging people from using MediaWikiServices::getInstance(), and eventually deprecating it (there's no reason for a DI container to be a singleton).

Mon, May 6, 6:35 PM · TechCom-RFC, Patch-For-Review, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Core Platform Team Kanban (Doing)
Anomie added a comment to T221177: REST route handler extension interface RFC.

and a sufficiently motivated developer can always invoke code that's in a class (it's done with the action API, despite not being available as a service).

Mon, May 6, 4:26 PM · TechCom-RFC, Patch-For-Review, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Core Platform Team Kanban (Doing)
Anomie renamed T68051: Implement Lua alternative to {{int:Lang}} / wgUserLanguage from Central modules need the user language to display errors and category names to Implement Lua alternative to {{int:Lang}} / wgUserLanguage.
Mon, May 6, 1:34 PM · MediaWiki-Internationalization, Wikidata, MediaWiki-extensions-Scribunto
Anomie merged T173207: Implement Lua alternative to {{int:Lang}} / wgUserLanguage into T68051: Implement Lua alternative to {{int:Lang}} / wgUserLanguage.
Mon, May 6, 1:34 PM · MediaWiki-Internationalization, Wikidata, MediaWiki-extensions-Scribunto
Anomie merged task T173207: Implement Lua alternative to {{int:Lang}} / wgUserLanguage into T68051: Implement Lua alternative to {{int:Lang}} / wgUserLanguage.
Mon, May 6, 1:34 PM · MediaWiki-extensions-Scribunto, I18n, Commons

Fri, May 3

Anomie added a comment to T217867: Port domino (or another spec-compliant DOM library) to PHP.

property() can't consistently detect which branch ('get' or 'set') is intended due to edge cases in default argument values, etc.

Fri, May 3, 8:34 PM · Core Platform Team Backlog (Attic), Parsoid-PHP
Anomie added a comment to T193951: Hook handler functions should not require pass-by-reference unless documented in the hook signature.

HHVM raises a warning about it, though, so we'd have to wait until after we drop HHVM support before using it.

Fri, May 3, 8:21 PM · MediaWiki-General-or-Unknown, Core Platform Team Backlog (Watching / External), Patch-For-Review, User-thiemowmde, User-Daniel
Anomie added a comment to T222409: Standardize declarative object construction in MediaWiki.

Collecting the various different mechanisms into a more usable list:

Fri, May 3, 8:00 PM · Patch-For-Review, Performance-Team (Radar), MediaWiki-General-or-Unknown, ObjectFactory
Anomie added a comment to T222410: ObjectFactory should allow using services.

I doubt the cases where anything else is wanting to use ObjectFactory would really be suited to just pulling "a service" out of the container, as such code could as well just get the service directly from the DI container. And I think the type of "factory_service" that would be usable by ObjectFactory uses cases is very likely to be exactly the code that's trying to use ObjectFactory in the first place.

Fri, May 3, 5:42 PM · MediaWiki-ServiceContainer, ObjectFactory
Anomie added a comment to T217867: Port domino (or another spec-compliant DOM library) to PHP.
  • how to handle readonly properties, accessors, etc. (__get()/__set()? {get,set}Property()? property()?)
Fri, May 3, 5:22 PM · Core Platform Team Backlog (Attic), Parsoid-PHP
Anomie added a project to T222402: Bulk API undeletion results in database query error: MediaWiki-Page-deletion.

I don't think this is likely to be an issue in the API itself, but instead in the deletion code used by the API (and the normal web deletion action as well). Although my best guess is that it's going to get into tricky details of MySQL/MariaDB gap locking, which I can't say I'm very familiar with.

Fri, May 3, 4:44 PM · Wikimedia-production-error, MediaWiki-Page-deletion, MediaWiki-API
Anomie updated subscribers of T222413: PageContentSave does not allow modification of parameters.

Doing some archaeology,

Fri, May 3, 4:37 PM · Multi-Content-Revisions, MediaWiki-Documentation, MediaWiki-Revision-backend, MediaWiki-Page-editing
Anomie added a comment to T221177: REST route handler extension interface RFC.

By the way, it would be possible to have Handler::setRequest() and Handler::setResponse() instead of passing these objects in separately to every entry point (execute, getLastModified, etc.). At least then the stateful nature of Handler would be consistent, instead of becoming more stateful in SimpleHandler. Handler::getRequest() would throw an exception if Handler::setRequest() has not been called, and similarly for getConfig() and getResponse().

Fri, May 3, 2:40 PM · TechCom-RFC, Patch-For-Review, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Core Platform Team Kanban (Doing)

Thu, May 2

Anomie added a comment to T221177: REST route handler extension interface RFC.

Re: pagination, for Wikimedia scale it tends to be surprisingly involved; we definitely want to avoid doing it separately for API and web. The current Pager classes mix DB and presentation logic, and tend to use the horrible pattern of being constructed around a SpecialPage object, but the DB aspect of those classes is probably something we want to keep in the long term, at which point all an API pagination helper can do is read/write continuation data in a standard format, like ApiBase does. Something like that will probably be useful for REST APIs as well.

Thu, May 2, 6:01 PM · TechCom-RFC, Patch-For-Review, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Core Platform Team Kanban (Doing)
Anomie added a comment to T222324: Unable to perform revision deletion on Commons.

Given that this task is "principal remedy against common attack vector doesn't work right now", I worry about making this task public before it's fixed in production.

Thu, May 2, 4:56 PM · MW-1.34-notes (1.34.0-wmf.4; 2019-05-07), Performance, MediaWiki-Revision-deletion, Security
Anomie added a comment to T222324: Unable to perform revision deletion on Commons.

It's caused by the fix for T221458: Special:Log on commons -- entire web request took longer than 60 seconds and timed out forcing MariaDB to use a bad query plan for the query here. Nothing to do with T222036 or T222038. I have a patch ready to upload for review as soon as we make this non-private.

Thu, May 2, 4:51 PM · MW-1.34-notes (1.34.0-wmf.4; 2019-05-07), Performance, MediaWiki-Revision-deletion, Security
Anomie added a comment to T212284: Fatal db error "Could not select database 'centralauth'" (sometimes also 'metawiki').

The new errors in T212284#5125669 seem to be related to the database connection having been closed or dropped (e.g. it's reusing a connection that was dropped due to a timeout). Since it's using ->doQuery() to try to change the database, it doesn't have automatic reconnection logic that ->query() has.

Thu, May 2, 4:33 PM · Patch-For-Review, Core Platform Team Kanban, Core Platform Team (Security, stability, performance and scalability (TEC1)), Performance-Team (Radar), Services (next), MediaWiki-Database, MediaWiki-extensions-CentralAuth, Wikimedia-production-error

Wed, May 1

Anomie added a comment to T221177: REST route handler extension interface RFC.
  1. Route definitions
    • can contain input variables (non typed, named only)
    • name path variable can have 'constraints' (regex). Route::get('user/{name}')->where('name', '[A-Za-z]+');
Wed, May 1, 4:45 PM · TechCom-RFC, Patch-For-Review, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Core Platform Team Kanban (Doing)
Anomie added a comment to T221449: Redesign querycache* tables.

Yeah, maybe we can come up with some design that accommodate other usecases too. Do you have some examples?

Wed, May 1, 4:33 PM · MediaWiki-Database
Anomie added a comment to T222224: Normalizing *links tables.

@jcrespo and I have been discussing this same sort of idea, in a "we should do that someday once all the revision schema changing is over" sort of way. We don't seem to have ever gotten around to filing a Phab task for it though. Thanks for filing one!

Wed, May 1, 4:20 PM · MediaWiki-Database, TechCom-RFC
Anomie added a comment to T221177: REST route handler extension interface RFC.

(The benefit of having an OpenAPI spec, even if your routing system does not use it, is that it can also be used for generating clients; and given the huge variety of languages, frameworks, coding styles etc. that's not something where we could roll our own tool.

Wed, May 1, 2:06 PM · TechCom-RFC, Patch-For-Review, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Core Platform Team Kanban (Doing)
Anomie added a comment to T221988: Spec a PHP interface that will serve as an entry point into the Parsoid-PHP composer lib.

probably review the phab task for dependency injection. the constructor or entry point should probably take an abstract object for Env, I think that's the point at which all our "dependencies are injected"

Wed, May 1, 1:51 AM · Patch-For-Review, Parsoid-PHP

Tue, Apr 30

Anomie added a comment to T222212: RevisionStore must not expose user IDs from a foreign wiki.

Perhaps we should take another step back and ask what use case RevisionStore being able to load from other wikis is actually supposed to support. The only places outside of tests I see ->getRevisionStore( $wiki ) being passed a value for $wiki are two calls in Wikibase (but I can't tell with the the chained DI there whether $wiki is ever actually non-local) and the implementation of the deprecated Revision::getRevisionText() (for which I see no non-test callers passing a value for $wiki).

Tue, Apr 30, 6:29 PM · Multi-Content-Revisions (Reactive)
Anomie added a comment to T221177: REST route handler extension interface RFC.

Should ambiguous templates be allowed? For example, if you have /foo/{var} and /foo/bar should that throw an exception at extension registration?

Tue, Apr 30, 2:51 PM · TechCom-RFC, Patch-For-Review, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Core Platform Team Kanban (Doing)
Anomie added a comment to T221177: REST route handler extension interface RFC.

I didn't see this post earlier, I went straight to the latest one. :(

Tue, Apr 30, 2:47 PM · TechCom-RFC, Patch-For-Review, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Core Platform Team Kanban (Doing)
Anomie moved T221543: Travis test fails for wikidata:wikidata site from Unsorted to Non-core-API stuff on the MediaWiki-API board.
Tue, Apr 30, 1:02 PM · Patch-For-Review, MediaWiki-API, Pywikibot-Wikidata, Wikidata, Upstream, Pywikibot-tests, Pywikibot

Mon, Apr 29

Anomie added a comment to T221449: Redesign querycache* tables.

I have been looking at design of the three tables querycache, querycachetwo (!), and qeurycache_info.

Mon, Apr 29, 4:23 PM · MediaWiki-Database
Anomie added a comment to T221722: ApiQueryBlocks should not be aware of the container.

I don't really like the fact that we have part of the array statically defined and another part included inside the constructor, it makes it even harder for people to find where the definition of a module lives. What would you say to moving the closures to static factory methods of their classes, so the "wiring" for these modules could still be in the self::$Modules initializer?

Mon, Apr 29, 3:51 PM · Technical-Debt, MediaWiki-User-management, MediaWiki-API
Anomie added a comment to T221177: REST route handler extension interface RFC.

There's no single accepted definition of a REST API. Is this a fair summary of what we are building here?

  • Resources identified using a path hierarchy.
  • Creative use of HTTP methods and HTTP status codes.
Mon, Apr 29, 2:29 PM · TechCom-RFC, Patch-For-Review, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Core Platform Team Kanban (Doing)

Fri, Apr 26

Anomie created T221989: Should Parsoid\Wt2Html\PP\Processors\Linter::getNextMatchingNode() be testing nextNonSepSibling() rather than nextSibling?.
Fri, Apr 26, 7:24 PM · Parsoid-Linter
Anomie added a comment to T219576: Wikimedia Commons JSON API does not sort by timestamp correctly when requesting media in category.

JSON formatting does mean that the output isn't intended to be conceptually sorted, although you have a point that with formatversion=2 we output an array instead.

Fri, Apr 26, 7:16 PM · MediaWiki-API, Commons
Anomie triaged T221671: Retrieve history information in Scribunto API as Lowest priority.

I'm skeptical that access to the history of pages is really something we want to provide for use during the parsing of the page. I'm not going to decline this just yet in case you want to make a counterargument, but in my opinion we should probably decline this request.

Fri, Apr 26, 7:09 PM · MediaWiki-extensions-Scribunto
Anomie moved T220999: Slow query "ApiQueryLogEvents::execute" after actor rollout from Done to Pending deploy on the MediaWiki-API board.
Fri, Apr 26, 6:40 PM · Patch-For-Review, MediaWiki-API, DBA
Anomie moved T221550: Not possible to set API-reported Wiki ID to anything other than database name from Unsorted to Blocked on the MediaWiki-API board.

As far as MediaWiki-API is concerned, this is blocked on someone moving this "global ID" concept into core and probably having wfWikiID() itself return that ID. If that were done, the API would follow naturally.

Fri, Apr 26, 6:38 PM · Wikidata, MediaWiki-API
Anomie moved T221974: apierror-unknownerror/qqq is out of date from Unsorted to Non-Code on the MediaWiki-API board.
Fri, Apr 26, 6:35 PM · User-Zoranzoki21, Africa-Wikimedia-Developers, good first bug, I18n, MediaWiki-Documentation, MediaWiki-API
Anomie moved T220999: Slow query "ApiQueryLogEvents::execute" after actor rollout from Needs details or plan to Done on the MediaWiki-API board.
Fri, Apr 26, 6:33 PM · Patch-For-Review, MediaWiki-API, DBA
Anomie added a comment to T221543: Travis test fails for wikidata:wikidata site.

From the MediaWiki perspective, this is a duplicate of T220999: Slow query "ApiQueryLogEvents::execute" after actor rollout, which should roll out with the train next week unless someone backports it on Monday.

Fri, Apr 26, 6:32 PM · Patch-For-Review, MediaWiki-API, Pywikibot-Wikidata, Wikidata, Upstream, Pywikibot-tests, Pywikibot
Anomie merged T221543: Travis test fails for wikidata:wikidata site into T220999: Slow query "ApiQueryLogEvents::execute" after actor rollout.
Fri, Apr 26, 6:32 PM · Patch-For-Review, MediaWiki-API, DBA
Anomie merged task T221543: Travis test fails for wikidata:wikidata site into T220999: Slow query "ApiQueryLogEvents::execute" after actor rollout.
Fri, Apr 26, 6:32 PM · Patch-For-Review, MediaWiki-API, Pywikibot-Wikidata, Wikidata, Upstream, Pywikibot-tests, Pywikibot

Thu, Apr 25

Anomie moved T221381: Allow for multiple `leaction`s for `action=query&list=logevents` from Unsorted to Needs details or plan on the MediaWiki-API board.

The trick would be in making sure the resulting SQL queries still can use indexes efficiently.

Thu, Apr 25, 7:49 PM · MediaWiki-API
Anomie moved T221595: MovePage::move contention on cebwiki from To triage to Move/Merge on the MediaWiki-Special-pages board.
Thu, Apr 25, 7:48 PM · MediaWiki-Special-pages, Wikimedia-production-error, MediaWiki-API, Contributors-Team, Editing-team
Anomie moved T221595: MovePage::move contention on cebwiki from Unsorted to Non-core-API stuff on the MediaWiki-API board.

I don't see anything in the API that seems like it would result in deadlocks here, so I'm going to move it to "non-core-API stuff" for now add MediaWiki-Special-pages to investigate it from that angle. The API module is pretty simple and just calls MovePage to do most of the work.

Thu, Apr 25, 7:47 PM · MediaWiki-Special-pages, Wikimedia-production-error, MediaWiki-API, Contributors-Team, Editing-team