feat: add backend endpoint to set wiki DB version#1012
Merged
Conversation
1 task
tarrow
requested changes
Nov 25, 2025
Contributor
tarrow
left a comment
There was a problem hiding this comment.
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']); |
Contributor
There was a problem hiding this comment.
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', |
Contributor
There was a problem hiding this comment.
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.
tarrow
approved these changes
Nov 25, 2025
deer-wmde
added a commit
that referenced
this pull request
Dec 15, 2025
successor of #1010 Adds the backend endpoint `/backend/setWikiDbVersion` as defined in https://phabricator.wikimedia.org/T410394
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
successor of #1010
Adds the backend endpoint
/backend/setWikiDbVersionas defined in https://phabricator.wikimedia.org/T410394