Skip to content

Introduce MediaWikiHostResolver#989

Merged
tarrow merged 11 commits into
mainfrom
MediaWikiHostResolver
Nov 5, 2025
Merged

Introduce MediaWikiHostResolver#989
tarrow merged 11 commits into
mainfrom
MediaWikiHostResolver

Conversation

@tarrow
Copy link
Copy Markdown
Contributor

@tarrow tarrow commented Nov 4, 2025

Introduces a new Service that currently takes no configuration following the
Laravel service container pattern[1]. In the future we probably want to make this configurable
and in production pass in this configuration with a ConfigMap.

The intention is to use this for resolution of the correct backend host for MediaWiki
depending on the DB schema for that Wiki.

The idea was extracted from the POC at #987

[1] https://laravel.com/docs/10.x/container

Bug: T409085
Bug: T408624

@tarrow tarrow marked this pull request as draft November 4, 2025 17:33
outdooracorn and others added 4 commits November 5, 2025 10:12
@tarrow tarrow force-pushed the MediaWikiHostResolver branch from 667287c to cf6f384 Compare November 5, 2025 10:23
@tarrow tarrow marked this pull request as ready for review November 5, 2025 10:29
@tarrow tarrow requested review from dati18 and rosalieper November 5, 2025 10:29
Comment thread app/Services/MediaWikiHostResolver.php Outdated
Comment thread app/Services/MediaWikiHostResolver.php Outdated
Comment thread app/Services/MediaWikiHostResolver.php Outdated
Comment thread app/Services/MediaWikiHostResolver.php Outdated
tarrow and others added 3 commits November 5, 2025 10:52
Co-authored-by: Dat WMDE <dat.nguyen@wikimedia.de>
Co-authored-by: Dat WMDE <dat.nguyen@wikimedia.de>
@tarrow tarrow requested a review from dati18 November 5, 2025 11:13
Comment thread app/Services/MediaWikiHostResolver.php Outdated
Comment thread app/Services/MediaWikiHostResolver.php Outdated
Comment thread app/Services/MediaWikiHostResolver.php Outdated
tarrow and others added 3 commits November 5, 2025 14:03
Co-authored-by: Dat WMDE <dat.nguyen@wikimedia.de>
Co-authored-by: Dat WMDE <dat.nguyen@wikimedia.de>
@dati18
Copy link
Copy Markdown
Contributor

dati18 commented Nov 5, 2025

LGTM now!

@tarrow tarrow merged commit 216b16d into main Nov 5, 2025
5 checks passed
@tarrow tarrow deleted the MediaWikiHostResolver branch November 5, 2025 14:23
deer-wmde pushed a commit that referenced this pull request Dec 15, 2025
* Introduce MediaWikiHostResolver

Co-authored-by: Ollie <oliver.hyde@wikimedia.de>
Bug: T409085
Bug: T408624

* run pint

* revert Wiki.php changes

* throw if DB version isn't known

* Update app/Services/MediaWikiHostResolver.php

Co-authored-by: Dat WMDE <dat.nguyen@wikimedia.de>

* Update app/Services/MediaWikiHostResolver.php

Co-authored-by: Dat WMDE <dat.nguyen@wikimedia.de>

* use relations and accessors

* fix indent

* Update app/Services/MediaWikiHostResolver.php

Co-authored-by: Dat WMDE <dat.nguyen@wikimedia.de>

* Update app/Services/MediaWikiHostResolver.php

Co-authored-by: Dat WMDE <dat.nguyen@wikimedia.de>

* move exception above class

---------

Co-authored-by: Ollie <oliver.hyde@wikimedia.de>
Co-authored-by: Dat WMDE <dat.nguyen@wikimedia.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants