Skip to content

Conversation

@deer-wmde
Copy link
Contributor

@deer-wmde deer-wmde commented Nov 24, 2025

successor of #1010

Adds the backend endpoint /backend/setWikiDbVersion as defined in https://phabricator.wikimedia.org/T410394

Copy link
Contributor

@tarrow tarrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks very good; easy to review. I think there's probably one important bit of test missing though.

$router->get('getWikiHostsForDomain', ['uses' => 'MediaWikiHostsController@getWikiHostsForDomain']);

// PUT
$router->put('setWikiDbVersion', ['uses' => 'WikiDbVersionController@updateWikiDbVersion']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's good this isn't in wiki on second thoughts because it's actually about changing WikiDbs not Wikis


public function updateWikiDbVersion(Request $request): \Illuminate\Http\JsonResponse {
$validated = $request->validate([
'domain' => 'required|string',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this light validation; I think we don't want to reuse the domain validation logic from Wiki creation because overtime it may become stricter and then requests here might start failing.

@deer-wmde deer-wmde merged commit 99d2200 into main Nov 25, 2025
5 checks passed
@deer-wmde deer-wmde deleted the de/T410394B branch November 25, 2025 09:46
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