Page MenuHomePhabricator
Feed Advanced Search

Jun 16 2019

Tgr added a comment to T225506: OAuth authentication request returns 500.

Unless something is seriously broken the error log channel should contain the full stack trace for the WebResponse call (something is tyring to set a cookie after the JWT has been output, but without a stack trace it will be hard to figure out what - although you could try adding cookie to the log channels and check what cookie is being set).

Jun 16 2019, 4:50 PM · MediaWiki-extensions-OAuth, Wikidata, Wikibase-Containers
Restricted Application added a project to T225887: Cross-wiki upload dialog should not duplicate file extension: Commons.
Jun 16 2019, 3:37 PM · MediaWiki-Uploading, MediaWiki-File-management, Multimedia, Commons
Tgr added a comment to T221732: Visually indicate to users that they can't add/edit captions/structured data to protected files.

This is actually a regression, the tab at the top of the page should say "View source", not "Edit". (Granted that still wouldn't meet "obvious and understandable".) Probably related to MCR and/or how Wikibase customizes the "edit" action.

Jun 16 2019, 2:13 PM · MW-1.34-notes (1.34.0-wmf.21; 2019-09-03), Structured-Data-Backlog (Current Work), Structured-Data-Design, Structured Data Engineering, SDC Design

Jun 14 2019

Tgr committed rMLOFcf936cd52faa: Add history file, prepare for 2.0 release (authored by Tgr).
Add history file, prepare for 2.0 release
Jun 14 2019, 8:19 PM
Tgr closed T223240: REST API ResponseFactory as Resolved.
Jun 14 2019, 8:17 PM · Core Platform Team Workboards (Done with CPT), MW-1.34-notes (1.34.0-wmf.10; 2019-06-18), MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2))
Tgr closed T223240: REST API ResponseFactory, a subtask of T219959: REST API Router, as Resolved.
Jun 14 2019, 8:17 PM · CPT Initiatives (Parsoid REST API in PHP (CDP2)), MediaWiki-REST-API
Tgr added a comment to T220779: Add test to check existence of action- messages.

or it is possible to merge the patch sets to unbreak the build of the extension?

Jun 14 2019, 8:02 PM · I18n, MW-1.34-notes (1.34.0-wmf.1; 2019-04-16), MediaWiki-Core-Testing
Tgr added a comment to T210771: Fix passport-mediawiki-oauth.

The GitHub audit log only goes back 90 days.

Jun 14 2019, 8:51 AM · JavaScript, MediaWiki-extensions-OAuth, GitHub-Mirrors

Jun 13 2019

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

Is https://phabricator.wikimedia.org/T221177#5219503 considered valid for the final version of the RfC? i.e. will the base path for the REST routes be configurable / respect existing $wgScriptPath values?

Jun 13 2019, 10:26 PM · Core Platform Team Workboards (Team 1), TechCom-RFC (TechCom-Approved), Patch-For-Review, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2))
Tgr added a comment to T219960: REST API Handler Interface.

Resolved now, I suppose?

Jun 13 2019, 10:24 PM · Core Platform Team Workboards (Team 1), MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2))
Tgr closed T219961: Sample REST API Handler as Resolved.

This has been merged.

Jun 13 2019, 10:23 PM · Core Platform Team Workboards (Done with CPT), MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2))
Tgr closed T219961: Sample REST API Handler, a subtask of T219960: REST API Handler Interface, as Resolved.
Jun 13 2019, 10:23 PM · Core Platform Team Workboards (Team 1), MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2))
Tgr created T225762: Librarize the MediaWiki REST API framework.
Jun 13 2019, 10:21 PM · Librarization, MediaWiki-REST-API
Tgr added a subtask for T221737: REST API Infrastructure in MediaWiki: T225761: Document the REST API on mediawiki.org.
Jun 13 2019, 10:18 PM · CPT Initiatives (Parsoid REST API in PHP (CDP2)), MediaWiki-REST-API, Services (watching)
Tgr added a parent task for T225761: Document the REST API on mediawiki.org: T221737: REST API Infrastructure in MediaWiki.
Jun 13 2019, 10:18 PM · MediaWiki-REST-API, MediaWiki-Documentation, Documentation
Tgr created T225761: Document the REST API on mediawiki.org.
Jun 13 2019, 10:17 PM · MediaWiki-REST-API, MediaWiki-Documentation, Documentation
Tgr added a comment to T223239: REST API Parameter Validation.

What is 'that' in this case? The lowercase underscore notation or the smashed together words? :)

Jun 13 2019, 8:46 AM · MW-1.34-notes (1.34.0-wmf.22; 2019-09-10), Core Platform Team Workboards (Green), CPT Initiatives (Parsoid REST API in PHP (CDP2)), Patch-For-Review, MediaWiki-REST-API

Jun 12 2019

Tgr added a comment to T225366: "Fatal exception: MediaWiki\Revision\InvalidArgumentException" when trying to move user JS page on en.wp.

I wonder what exactly triggers the error... I can't reproduce it on beta enwiki, which does have replicas. Also, there seem to be plenty of JS subpage moves on enwiki (although they all change the username, not the filename, so probably rename-related; and maybe that skips some permission checks?)

Jun 12 2019, 8:02 PM · Core Platform Team Workboards (Clinic Duty Team), MW-1.34-notes (1.34.0-wmf.10; 2019-06-18), MediaWiki-Revision-backend, Wikimedia-production-error
Tgr added a comment to T225506: OAuth authentication request returns 500.

That sounds like a secondary error, there should be another error in the logs that caused it.

Jun 12 2019, 7:03 PM · MediaWiki-extensions-OAuth, Wikidata, Wikibase-Containers
Tgr added a comment to T225506: OAuth authentication request returns 500.

You need to install dependencies of the extension via Composer. (We have some documentation on it but it's not great.)

Jun 12 2019, 12:58 PM · MediaWiki-extensions-OAuth, Wikidata, Wikibase-Containers
Tgr added a comment to T225366: "Fatal exception: MediaWiki\Revision\InvalidArgumentException" when trying to move user JS page on en.wp.

One quick fix would be to simply check the right to move the subpages before moving the page itself. I see no need to do this after the move.

Jun 12 2019, 11:25 AM · Core Platform Team Workboards (Clinic Duty Team), MW-1.34-notes (1.34.0-wmf.10; 2019-06-18), MediaWiki-Revision-backend, Wikimedia-production-error
Tgr added a comment to T225366: "Fatal exception: MediaWiki\Revision\InvalidArgumentException" when trying to move user JS page on en.wp.

move-subpages is just a right like any other; I don't see any special-casing that would actually try to check anything about the subpages. User:PerfektesChaos/js/WikiSyntaxTextMod/rO.js does not have subpages, anyway. So if there is a replag issue, that can only affect the Title object of the base page.

Jun 12 2019, 11:02 AM · Core Platform Team Workboards (Clinic Duty Team), MW-1.34-notes (1.34.0-wmf.10; 2019-06-18), MediaWiki-Revision-backend, Wikimedia-production-error
Tgr added a comment to T225506: OAuth authentication request returns 500.

You could set something like

Jun 12 2019, 8:42 AM · MediaWiki-extensions-OAuth, Wikidata, Wikibase-Containers
Tgr renamed T225586: PNG image served with image/svg+xml content type from PNG image doesn't display in MediaViewer because its content-type is set to image/svg+xml to PNG image served with image/svg+xml content type.
Jun 12 2019, 8:00 AM · media-storage, MediaWiki-File-management, Commons, Multimedia
Tgr added a comment to T225506: OAuth authentication request returns 500.

Check your exception logs.

Jun 12 2019, 12:14 AM · MediaWiki-extensions-OAuth, Wikidata, Wikibase-Containers

Jun 11 2019

Tgr claimed T221170: POST /:domain/v3/transform/wikitext/to/:format/:title?/:revision?.
Jun 11 2019, 3:35 PM · MediaWiki-REST-API
Tgr claimed T221172: POST /:domain/v3/transform/:from/to/wikitext/:title?/:revision?.
Jun 11 2019, 3:34 PM · MediaWiki-REST-API
Tgr claimed T221169: GET /:domain/v3/page/:format/:title/:revision?.
Jun 11 2019, 3:34 PM · MediaWiki-REST-API
Tgr moved T221169: GET /:domain/v3/page/:format/:title/:revision? from To Do to Doing on the Product-Infrastructure-Team-Backlog (Kanban) board.
Jun 11 2019, 3:20 PM · MediaWiki-REST-API
Tgr added a project to T221169: GET /:domain/v3/page/:format/:title/:revision?: Product-Infrastructure-Team-Backlog (Kanban).
Jun 11 2019, 3:20 PM · MediaWiki-REST-API
Tgr moved T221172: POST /:domain/v3/transform/:from/to/wikitext/:title?/:revision? from To Do to Doing on the Product-Infrastructure-Team-Backlog (Kanban) board.
Jun 11 2019, 3:20 PM · MediaWiki-REST-API
Tgr added a project to T221172: POST /:domain/v3/transform/:from/to/wikitext/:title?/:revision?: Product-Infrastructure-Team-Backlog (Kanban).
Jun 11 2019, 3:20 PM · MediaWiki-REST-API
Tgr moved T221170: POST /:domain/v3/transform/wikitext/to/:format/:title?/:revision? from To Do to Doing on the Product-Infrastructure-Team-Backlog (Kanban) board.
Jun 11 2019, 3:19 PM · MediaWiki-REST-API
Tgr added a project to T221170: POST /:domain/v3/transform/wikitext/to/:format/:title?/:revision?: Product-Infrastructure-Team-Backlog (Kanban).
Jun 11 2019, 3:19 PM · MediaWiki-REST-API
Tgr added a project to T223247: Unit or integration test for Sample REST API Handler: Product-Infrastructure-Team-Backlog (Kanban).
Jun 11 2019, 3:03 PM · CPT Initiatives (Parsoid REST API in PHP (CDP2)), Core Platform Team Workboards (Team 1), Patch-For-Review, MediaWiki-REST-API
Tgr added a project to T224375: JSON validation in REST API: Product-Infrastructure-Team-Backlog (Kanban).
Jun 11 2019, 3:02 PM · CPT Initiatives (Parsoid REST API in PHP (CDP2)), MediaWiki-REST-API
Tgr added a comment to T223239: REST API Parameter Validation.

That also goes for "flat" POST bodies (form-data etc). For JSON bodies, see T224375: JSON validation in REST API - I imagine there won't be much point in having a convention there as part of the JSON schema will usually come from some domain logic.

Jun 11 2019, 2:09 PM · MW-1.34-notes (1.34.0-wmf.22; 2019-09-10), Core Platform Team Workboards (Green), CPT Initiatives (Parsoid REST API in PHP (CDP2)), Patch-For-Review, MediaWiki-REST-API
Tgr added a comment to T223239: REST API Parameter Validation.

RESTBase uses lowercase underscore notation, and the action API is also lowercase (except it smashes words together without any delimiter, which is a bit ugly) so I imagine we'll go with that as a naming guideline, whether or not it gets enforced by the software (I'd rather not).

Jun 11 2019, 2:07 PM · MW-1.34-notes (1.34.0-wmf.22; 2019-09-10), Core Platform Team Workboards (Green), CPT Initiatives (Parsoid REST API in PHP (CDP2)), Patch-For-Review, MediaWiki-REST-API
Tgr closed T224979: Parsoid REST Routes Extension as Resolved.
Jun 11 2019, 10:07 AM · MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Parsoid-PHP
Tgr closed T224979: Parsoid REST Routes Extension, a subtask of T221738: Parsoid REST API routes in MediaWiki, as Resolved.
Jun 11 2019, 10:07 AM · CPT Initiatives (Parsoid REST API in PHP (CDP2)), StructuredDiscussions, Growth-Team, MediaWiki-REST-API, Parsoid-PHP, Services (watching), MediaWiki-Parser

Jun 10 2019

Tgr added a comment to T224919: Code Stewardship Review: OAuth extension.

I have been thinking about filing something like this for a while. Given the importance of OAuth (the majority of external tools rely on it, and it's a big part of power user workflows) it seems somewhat surprising how little support it has. Although the same could probably be said about the entire auth stack. And as Anomie says it's reasonably stable, what's missing is someone working on improving it. It has poor test coverage, poor mobile support for the authorization flow, the workflow for developing an OAuth app is terrible, there are a few parts that should be hardened as layered defense...

Jun 10 2019, 10:05 PM · Release-Engineering-Team (Code Health), Release-Engineering-Team-TODO, Code-Stewardship-Reviews
Tgr added a comment to T159889: Per-consumer XFF trust settings.

Note that the OAuth app would have to be thoroughly trusted for this; a malicious app could use fake XSS headers to e.g. test which IP address triggers an autoblock and thus guess the IP of the blocked user. (In the case of Toolforge, the encrypted XFF approach would prevent this.)

Jun 10 2019, 8:02 PM · Security, Security-Extensions, MediaWiki-extensions-OAuth
Tgr moved T225430: Enable templatestyles in Modern for "document" rules from Up next to External on the TemplateStyles board.
Jun 10 2019, 5:49 PM · TemplateStyles, Modern
Tgr changed the status of T68599: Browser window gets black without exit button when the browser is offline from Open to Stalled.

This is basically a tracking bug for T68598: mw.loader state of module stuck at "loading" if request was aborted.

Jun 10 2019, 10:15 AM · Multimedia, MediaViewer
Tgr closed T71893: MMV: Page is completely blacked out when accessing an invalid file name as Resolved.

The way the error is communicated could be improved, but that would be a separate task.

Jun 10 2019, 9:17 AM · Multimedia, MediaViewer
Tgr added a comment to T225401: MultimediaViewer loads/preloads 3×2 images.

Double-loading is probably a regression from T77211: Check which browsers behave sanely with AJAX preloading.
No idea how preloading the next-next image would happen.

Jun 10 2019, 8:01 AM · Patch-For-Review, Multimedia, MediaViewer
Tgr updated the task description for T77211: Check which browsers behave sanely with AJAX preloading.
Jun 10 2019, 7:58 AM · MediaViewer, Multimedia

Jun 9 2019

Tgr added a comment to T225366: "Fatal exception: MediaWiki\Revision\InvalidArgumentException" when trying to move user JS page on en.wp.

DB lag or some uninvalidated cache, presumably. Note that the permission check is triggered from a security patch that's more or less the equivalent of gerrit 502667 (would be nice to get that merged or dropped) so that will be needed to reproduce it. (I tried but worked fine for me locally. Which is not surprising if it is indeed DB lag.)

Jun 9 2019, 3:36 PM · Core Platform Team Workboards (Clinic Duty Team), MW-1.34-notes (1.34.0-wmf.10; 2019-06-18), MediaWiki-Revision-backend, Wikimedia-production-error
Tgr updated the task description for T223835: Configure wikimedia.org to enable *:wikimedia.org Matrix user IDs.
Jun 9 2019, 2:40 PM · serviceops, Patch-For-Review, Traffic, DNS, Operations, Wikimedia-Apache-configuration, Matrix

Jun 8 2019

Tgr updated the task description for T222458: Evaluate Riot as recommended IRC client.
Jun 8 2019, 9:41 PM · User-Tgr, Matrix
Tgr committed R1985:620bde4bf3b1: Add history file, prepare for 3.0.0 release (authored by Tgr).
Add history file, prepare for 3.0.0 release
Jun 8 2019, 2:21 PM
Tgr added a comment to T223646: Create a policy on importing global classes.

I personally prefer importing, but I'd be somewhat wary of enforcing style rules which make writing a simple patch more inconvenient without a highly specialized IDE.

Jun 8 2019, 11:17 AM · MediaWiki-Codesniffer, Code-Health

Jun 7 2019

Tgr added a comment to Blog Post: Performance perception: how satisfied are Wikipedia users?.

Cool research!

Jun 7 2019, 7:47 PM · Performance-Team
Tgr added a project to T214542: Unable to keep unsaved changes going from source to VisualEditor mode on a private/non-RESTbase wiki: Sysadmin-notice.
Jun 7 2019, 4:23 PM · Skipped QA, Sysadmin-notice, VisualEditor (Current work)

Jun 6 2019

Xinbenlv awarded T223247: Unit or integration test for Sample REST API Handler a Like token.
Jun 6 2019, 8:13 PM · CPT Initiatives (Parsoid REST API in PHP (CDP2)), Core Platform Team Workboards (Team 1), Patch-For-Review, MediaWiki-REST-API
Xinbenlv awarded T223247: Unit or integration test for Sample REST API Handler a Like token.
Jun 6 2019, 8:13 PM · CPT Initiatives (Parsoid REST API in PHP (CDP2)), Core Platform Team Workboards (Team 1), Patch-For-Review, MediaWiki-REST-API
Tgr updated the task description for T223835: Configure wikimedia.org to enable *:wikimedia.org Matrix user IDs.
Jun 6 2019, 2:38 PM · serviceops, Patch-For-Review, Traffic, DNS, Operations, Wikimedia-Apache-configuration, Matrix
Tgr added a comment to T223835: Configure wikimedia.org to enable *:wikimedia.org Matrix user IDs.

@fsero this was feedback from modular.im support (and the modular.im config panel indeed checks for the .well-known files, I didn't find the right place initially) - they said Matrix is moving away from the SRV method. (Also the spec says .well-known is tried first and SRV only in case of failure, so it's probably slightly better for performance as well.)

Jun 6 2019, 2:37 PM · serviceops, Patch-For-Review, Traffic, DNS, Operations, Wikimedia-Apache-configuration, Matrix
Tgr added a comment to T225197: PHP Warning from /w/thumb.php: "Cannot modify header information - headers already sent".

Possibly T224491: PHP 7 corruption during deployment (was: PHP 7 fatals on mw1262) related?

Jun 6 2019, 1:24 PM · Core Platform Team Workboards (Clinic Duty Team), MW-1.34-notes (1.34.0-wmf.8; 2019-06-04), Commons, MediaWiki-File-management, Multimedia, Wikimedia-production-error
Tgr added a comment to T225197: PHP Warning from /w/thumb.php: "Cannot modify header information - headers already sent".

We should probably use WebResponse which can log where the headers were sent.

Jun 6 2019, 1:10 PM · Core Platform Team Workboards (Clinic Duty Team), MW-1.34-notes (1.34.0-wmf.8; 2019-06-04), Commons, MediaWiki-File-management, Multimedia, Wikimedia-production-error
Tgr added a comment to T142542: LoggedOut cookie not set anymore.

I suspect that now, when you view article X, and are logged in, and then log out, and view the same pages you have viewed before, it will appear as if you are logged in

Jun 6 2019, 11:06 AM · Core Platform Team Legacy (Watching / External), Performance-Team, Regression, MediaWiki-User-login-and-signup
Tgr added a project to T224762: Add phan to ReadingLists extension: Upstream.

Upstream issue for for supporting traits that rely on a base class is #1067.

Jun 6 2019, 8:26 AM · Upstream, Patch-For-Review, Product-Infrastructure-Team-Backlog, Reading List Service, phan

Jun 5 2019

Tgr changed the status of T224762: Add phan to ReadingLists extension from Open to Stalled.
Jun 5 2019, 4:16 PM · Upstream, Patch-For-Review, Product-Infrastructure-Team-Backlog, Reading List Service, phan
Tgr changed the status of T224762: Add phan to ReadingLists extension, a subtask of T224783: Enable mediawiki/mediawiki-phan-config on all Wikimedia-deployed repositories, from Open to Stalled.
Jun 5 2019, 4:16 PM · Google-Code-in-2019, Release-Engineering-Team (Unit & Int & System Tooling), Release-Engineering-Team-TODO, Epic, Wikimedia-General-or-Unknown, phan
Tgr added a comment to T224920: Evaluate whether to create a RESTBase-backed JSON endpoint for image metadata.

Extmetadata will probably be killed after the SDC migration, which probably will have a different (and more complex) structure. I wouldn't put much effort in this.

Jun 5 2019, 4:15 PM · Core Platform Team Legacy (Designing), Services (designing), Page Content Service, Product-Infrastructure-Team-Backlog
Tgr added a comment to T217286: Homepage: allow including yesterday's data when querying pageviews with WikimediaPageViewService.

Sounds like a product owner decision more than a maintainer one, except no one owns it. I certainly don't see any technical problems with the change.
I'm not aware of anyone using the API, and I doubt the graphs in action=pageinfo get viewed much by editors, so as far as I'm concerned feel free to change it.

Jun 5 2019, 2:25 PM · MW-1.34-notes (1.34.0-wmf.10; 2019-06-18), Patch-For-Review, Growth-Team (Current Sprint), PageViewInfo
Tgr added a comment to T219139: Avoid use of isset( ..., ..., [...] ) function construct / syntax.

Having to look at the documentation to interpret something meets the definition of "not obvious".

Jun 5 2019, 10:14 AM · MediaWiki-Codesniffer
Tgr added a comment to T219139: Avoid use of isset( ..., ..., [...] ) function construct / syntax.

Multi-parameter unset() seems harmless to me, and probably more readable than separate unset commands. Unlike isset() (where it is not obvious whether isset( $x, $y ) unpacks to isset( $x ) && isset( $y ) or isset( $x ) || isset( $y )) there is no way to misread it.

Jun 5 2019, 8:51 AM · MediaWiki-Codesniffer

Jun 4 2019

Tgr added a comment to T224917: Machine vision image metadata service.

We'd still need to interface with the third-party machine vision providers, at a minimum.

Jun 4 2019, 5:45 PM · Release Pipeline, serviceops, Services (watching), Operations, Product-Infrastructure-Team-Backlog, Service-deployment-requests
Tgr added a comment to T224917: Machine vision image metadata service.

it looks like JADE is focused specifically on revisions, and I wouldn't expect the machine vision-derived labels to be specific to a revision.

Jun 4 2019, 5:43 PM · Release Pipeline, serviceops, Services (watching), Operations, Product-Infrastructure-Team-Backlog, Service-deployment-requests
Tgr added a comment to T224917: Machine vision image metadata service.

Doesn't that sort of duplicate Jade?

Jun 4 2019, 3:48 PM · Release Pipeline, serviceops, Services (watching), Operations, Product-Infrastructure-Team-Backlog, Service-deployment-requests
Tgr added a parent task for T219925: Move proton logging to new logging pipeline: T224602: Fix logging umbrella task.
Jun 4 2019, 3:45 PM · observability, Proton, Product-Infrastructure-Team-Backlog, Core Platform Team Legacy (Watching / External), Services (watching), service-runner, Wikimedia-Logstash, Operations
Tgr added a subtask for T224602: Fix logging umbrella task: T219925: Move proton logging to new logging pipeline.
Jun 4 2019, 3:45 PM · Better Use Of Data, Epic, Product-Infrastructure-Team-Backlog
Tgr added a comment to T222409: Standardize declarative object construction in MediaWiki.

Impossible when you consider extensions, they can't edit core's ServiceWiring.php.

Jun 4 2019, 12:42 PM · MW-1.34-notes (1.34.0-wmf.20; 2019-08-27), Performance-Team (Radar), MediaWiki-General, ObjectFactory
Tgr closed T224471: Development strategy for collaborating on Parsoid REST API routes as Parsoid-PHP is being developed as Resolved.

I guess this is done since we agreed on T224471#5218407 option #5 for T224979: Parsoid REST Routes Extension.

Jun 4 2019, 12:00 PM · StructuredDiscussions, Growth-Team, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Parsoid-PHP, Services (watching), MediaWiki-Parser
Tgr closed T224471: Development strategy for collaborating on Parsoid REST API routes as Parsoid-PHP is being developed, a subtask of T221738: Parsoid REST API routes in MediaWiki, as Resolved.
Jun 4 2019, 12:00 PM · CPT Initiatives (Parsoid REST API in PHP (CDP2)), StructuredDiscussions, Growth-Team, MediaWiki-REST-API, Parsoid-PHP, Services (watching), MediaWiki-Parser
Tgr removed projects from T224979: Parsoid REST Routes Extension: StructuredDiscussions, Growth-Team, Services (watching), MediaWiki-Parser.
Jun 4 2019, 11:58 AM · MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Parsoid-PHP
Tgr added a comment to T222409: Standardize declarative object construction in MediaWiki.

The standardization part seems very reasonable (I don't really like that spec_is_arg switches between two fundamentally different behaviors, and overlapping ObjectFactory parameters with constructor/factory parameters seems like a problem waiting to happen, but I don't see how we could avoid it for now, given that both patterns are widely used). IMO use_di_container is the wrong way around. Anything that receives a service container and uses it to fetch dependencies should be in the wiring. (ObjectFactory itself holding the container is fine, as it only forwards it; it can be thought of as being in the same "package" as MediaWikiServices, even if the librarization makes it a bit awkward.) There are two fundamental goals with the wiring:

  • all service dependencies should be in a single place and easy to review;
  • fetching service dependencies should be handled by MediaWikiServices so it can handle "meta-dependencies" in the future (such as creating different service instances for foreign wikis).

If you pass in the service container to (say) MyApiModule::factory, and then that method pulls services out of it, the first goal is hampered as dependencies will now be all over the place in factories and constructors; and the second might be hampered depending on how ObjectFactory would obtain the service container (if ApiModuleManager is turned into a service, and that service gets an ObjectFactory instance injected on creation, that should work fine).

Jun 4 2019, 10:35 AM · MW-1.34-notes (1.34.0-wmf.20; 2019-08-27), Performance-Team (Radar), MediaWiki-General, ObjectFactory
Tgr added a comment to T222410: ObjectFactory should allow using services.

Agreed, this would not be super useful to third parties. TBH I don't know if ObjectFactory is useful to third parties in the first place, especially now that PHP has the spread operator. So I'm not sure if that's something to be concerned about.

Jun 4 2019, 10:18 AM · MW-1.34-notes (1.34.0-wmf.10; 2019-06-18), MediaWiki-ServiceContainer, ObjectFactory
Tgr added a project to T210651: Switch all PDF render traffic to new Proton service: User-notice.

User-notice: Single-page PDF rendering (ie. "Download as PDF", not "Create a book") is now handled by a different service (Proton, instead of Electron). Both use the Chromium browser to render the page; there should be no user-visible differences.

Jun 4 2019, 9:06 AM · Core Platform Team Workboards (Done with CPT), Services (done), User-notice, Product-Infrastructure-Team-Backlog, Readers-Web-Backlog (Tracking), Proton

Jun 3 2019

Tgr added a comment to T224762: Add phan to ReadingLists extension.

Phan doesn't seem usable for code which makes use of traits, where the trait is always applied to classes with a given interface or base class, and makes use of the available methods (the kind of trait that would have a require in Hack). I think the most we can do here is to make sure that the appropriate upstream feature requests exist.

Jun 3 2019, 7:10 PM · Upstream, Patch-For-Review, Product-Infrastructure-Team-Backlog, Reading List Service, phan
Tgr closed T224750: Show my OAuth edits as Resolved.
Jun 3 2019, 5:48 PM · MW-1.34-notes (1.34.0-wmf.8; 2019-06-04), Patch-For-Review, MediaWiki-extensions-OAuth
Tgr committed rERLS8a982cd0f08c: Add phan (authored by Tgr).
Add phan
Jun 3 2019, 4:26 PM
Tgr created T224897: Popular OAuth consumers should have IP restrictions.
Jun 3 2019, 3:36 PM · Security, MediaWiki-extensions-OAuth
Tgr reopened T223835: Configure wikimedia.org to enable *:wikimedia.org Matrix user IDs as "Open".

It seems the documentation is outdated and only the .well-known method works with Modular, and there need to be two URLs: https://wikimedia.org/.well-known/matrix/server with

{
    "m.server": "wikimedia.modular.im:443"
}

and https://wikimedia.org/.well-known/matrix/client with

{
    "m.homeserver": {
        "base_url": "https://wikimedia.modular.im"
    },
    "m.identity_server": {
        "base_url": "https://vector.im"
    }
}

and the SRV record is not needed. Sorry for the confusion.

Jun 3 2019, 1:23 PM · serviceops, Patch-For-Review, Traffic, DNS, Operations, Wikimedia-Apache-configuration, Matrix
Tgr reopened T223835: Configure wikimedia.org to enable *:wikimedia.org Matrix user IDs, a subtask of T215042: Set up a hosted Matrix.org / Riot instance on modular.im, as Open.
Jun 3 2019, 1:23 PM · Matrix, User-Tgr

Jun 1 2019

Tgr added a comment to T224761: Add phan to OAuth extension.

See also T217515: Replace OAuth.php with something we can bring in via composer.

Jun 1 2019, 10:44 PM · MW-1.34-notes (1.34.0-wmf.24; 2019-09-24), MediaWiki-extensions-OAuth, phan
Tgr added a comment to T223225: CI failing in CirrusSearch tests with “Undefined index: REQUEST_TIME_FLOAT”.

The nice solution would be T217515: Replace OAuth.php with something we can bring in via composer.

Jun 1 2019, 10:43 PM · MW-1.34-notes (1.34.0-wmf.8; 2019-06-04), Patch-For-Review, MediaWiki-extensions-OAuth

May 31 2019

Restricted Application added a project to T224791: MediaWiki-Vagrant: ES_PATH_CONF must be set to the configuration path: Discovery-Search.
May 31 2019, 11:20 PM · Discovery-Search (Current work), Elasticsearch, MediaWiki-Vagrant
Tgr created T224750: Show my OAuth edits.
May 31 2019, 6:56 PM · MW-1.34-notes (1.34.0-wmf.8; 2019-06-04), Patch-For-Review, MediaWiki-extensions-OAuth
Tgr created T224749: OAuth consumer id should be exposed.
May 31 2019, 6:54 PM · MediaWiki-extensions-OAuth
Tgr closed T57718: Provide log of OAuth-related actions as Resolved.

This was done in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/OAuth/+/479038.

May 31 2019, 6:46 PM · good first bug, MediaWiki-extensions-OAuth
Tgr closed T57718: Provide log of OAuth-related actions, a subtask of T98880: Improve OAuth management interface, as Resolved.
May 31 2019, 6:46 PM · Product-Infrastructure-Team-Backlog, Epic, MediaWiki-extensions-OAuth

May 30 2019

Tgr added a comment to T223408: Page gets redirected randomly to former blackout page.

Can you even trigger a 301 from Javascript? I don't think it's possible.

May 30 2019, 1:35 PM · Readers-Web-Backlog (Tracking), Performance-Team (Radar), Wikimedia-Incident

May 29 2019

Tgr added a comment to T224365: REST API URL canonization.

I'd at least make URLs with unrecognized parameters use a short cache expiry. The problem with continuation is that you can't really tell whether the parameter is canonical without using some sort of cryptographic proof.

May 29 2019, 8:11 PM · MediaWiki-REST-API
Tgr added a comment to T224365: REST API URL canonization.

Shooting yourself in the foot is fine, but as soon as caching is involved you'll shoot traffic ops in the foot as well, so IMO it's worth making continuation untamperable here.

May 29 2019, 2:49 PM · MediaWiki-REST-API
Tgr added a comment to T166010: The Great Namespaceization and Reorg.

Probably could be handled with a custom tab completer in PsySH, I'd like to look into that at some point (tab completion is frustratingly random currently - it probably doesn't help that PHP is using a crippled cléone of readline by default).

May 29 2019, 2:01 PM · Wikimania-Hackathon-2019, TechCom-RFC (TechCom-Approved), TechCom, Core Platform Team (Needs Cleaning - Code Health (TEC13)), Epic
Tgr added a comment to T224471: Development strategy for collaborating on Parsoid REST API routes as Parsoid-PHP is being developed.

Btw, is the plan to initially write the handlers using the stubs that are in T221988: Spec a PHP interface that will serve as an entry point into the Parsoid-PHP composer lib? Or does that task cover adding the fully functional entry points as well?

May 29 2019, 1:51 PM · StructuredDiscussions, Growth-Team, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Parsoid-PHP, Services (watching), MediaWiki-Parser
Tgr added a comment to T147137: Decide on JSON validation library.

Note that we are probably going to revisit some aspects of this soon for T224375: JSON validation in REST API.

May 29 2019, 12:02 PM · MediaWiki-extensions-CollaborationKit, Multimedia

May 28 2019

Tgr added a comment to T224471: Development strategy for collaborating on Parsoid REST API routes as Parsoid-PHP is being developed.

I think the original misunderstanding was around merging API stuff (ie. having it available on Beta or production) while Parsoid is not in a mergeable (to /vendor) state. If the goal is making it possible to manually set something up in a development environment, Gerrit patch trees are fine. (And IMO preferrable to feature branches as the patches remain editable. If we need the Parsoid endpoints well before the API becomes stable, that's probably helpful.)

May 28 2019, 10:40 PM · StructuredDiscussions, Growth-Team, MediaWiki-REST-API, Core Platform Team (Parsoid REST API in PHP (CDP2)), Parsoid-PHP, Services (watching), MediaWiki-Parser