Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions docs/build-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ graph TD
B-->|pacman|C[dist folder with things in it]
```

### Checklist for updating mediawiki
- `wikiman.yaml`
- Check `mediawikiVersion` is still set to the version we want to target e.g. 1.39
- Check if `mediawikiRepoRef` is set to a specific value for a reason that still makes sense
- If not remove it
- Review `patchUrls`
- Open each patch and determine if it has now been merged into the updated version you are targeting
- If so: remove it
- If not determine if we should:
- Apply it as is
- Edit it so that is correctly applies to the newly updated code
- Remove it since it's no longer needed
- Run `./sync/wikiman/wikiman .`
- Run `./sync.sh`

### sync.sh

This script will resync the `dist` directory.
Expand Down Expand Up @@ -39,13 +54,11 @@ This needs to be run by developers when updating component versions in `wikiman.
This is run as a step in `sync.sh`

#### Syncing patches
To apply additional gerrit patches, you can specify patch URLs in the corresponding codebase part of `pacman.yaml`
To apply additional gerrit patches, you can specify patch URLs in the corresponding codebase part of `wikiman.yaml`.

Example:
```
- name: Wikibase
patchUrls:
- https://gerrit.wikimedia.org/r/changes/mediawiki%2Fextensions%2FWikibase~833742/revisions/15/patch?download
```

**please note**: currently these will get overridden if `wikiman` is used to generate the file!
13 changes: 13 additions & 0 deletions sync/wikiman/wikiman-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
},
"remove": {
"$ref": "#/$defs/RemoveList"
},
"patchUrls": {
"$ref": "#/$defs/PatchUrlList"
}
},
"additionalProperties": false,
Expand All @@ -88,6 +91,9 @@
},
"remove": {
"$ref": "#/$defs/RemoveList"
},
"patchUrls": {
"$ref": "#/$defs/PatchUrlList"
}
},
"additionalProperties": false,
Expand All @@ -102,6 +108,13 @@
"items": {
"type": "string"
}
},
"PatchUrlList": {
"description": "A list of gerrit URLs pointing to a base64 encoded git patch",
"type": "array",
"items": {
"type": "string"
}
}
}
}
6 changes: 6 additions & 0 deletions sync/wikiman/wikiman.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ def make_artifact_entry(details: Dict[str, str], extra_remove: List[str]) -> Dic
'destination': details['destination'],
'remove' : extra_remove + details.get('remove', []),
}

if "patchUrls" in details.keys():
entry['patchUrls'] = []
for patch_url in details['patchUrls']:
entry['patchUrls'].append(patch_url)

return entry

# pylint: disable=too-many-ancestors
Expand Down
28 changes: 28 additions & 0 deletions wikiman.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,19 @@ extensions:
repoName: wikimedia/mediawiki-extensions-CirrusSearch
- name: WikibaseCirrusSearch
repoName: wikimedia/mediawiki-extensions-WikibaseCirrusSearch
patchUrls:
# https://phabricator.wikimedia.org/T334191 - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikibaseCirrusSearch/+/908801
- https://gerrit.wikimedia.org/r/changes/mediawiki%2Fextensions%2FWikibaseCirrusSearch~908801/revisions/2/patch?download

# https://phabricator.wikimedia.org/T335105 - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikibaseCirrusSearch/+/951473
- https://gerrit.wikimedia.org/r/changes/mediawiki%2Fextensions%2FWikibaseCirrusSearch~951473/revisions/1/patch?download

- name: WikibaseLexemeCirrusSearch
repoName: wikimedia/mediawiki-extensions-WikibaseLexemeCirrusSearch
patchUrls:
# https://phabricator.wikimedia.org/T334191 - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikibaseLexemeCirrusSearch/+/908803
- https://gerrit.wikimedia.org/r/changes/mediawiki%2Fextensions%2FWikibaseLexemeCirrusSearch~908803/revisions/1/patch?download

- name: UniversalLanguageSelector
repoName: wikimedia/mediawiki-extensions-UniversalLanguageSelector
- name: cldr
Expand Down Expand Up @@ -120,6 +131,10 @@ extensions:
repoName: wikimedia/mediawiki-extensions-TextExtracts
- name: EntitySchema
repoName: wikimedia/mediawiki-extensions-EntitySchema
patchUrls:
# https://phabricator.wikimedia.org/T342001 - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/EntitySchema/+/942447
- https://gerrit.wikimedia.org/r/changes/mediawiki%2Fextensions%2FEntitySchema~942447/revisions/2/patch?download

- name: DismissableSiteNotice
repoName: wikimedia/mediawiki-extensions-DismissableSiteNotice
## These extensions should not currently use the mediawikiVersion
Expand Down Expand Up @@ -163,6 +178,19 @@ extensions:
- lib/.phan
- lib/.storybook
- lib/.vscode
patchUrls:
# https://phabricator.wikimedia.org/T312256 - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/833742
- https://gerrit.wikimedia.org/r/changes/mediawiki%2Fextensions%2FWikibase~833742/revisions/19/patch?download

# https://phabricator.wikimedia.org/T342000 - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/940955
- https://gerrit.wikimedia.org/r/changes/mediawiki%2Fextensions%2FWikibase~940955/revisions/1/patch?download

# https://phabricator.wikimedia.org/T342001 - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/943530
- https://gerrit.wikimedia.org/r/changes/mediawiki%2Fextensions%2FWikibase~943530/revisions/2/patch?download

# https://phabricator.wikimedia.org/T335105 - https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/951472
- https://gerrit.wikimedia.org/r/changes/mediawiki%2Fextensions%2FWikibase~951472/revisions/1/patch?download

# It looks like StopForumSpam inadvertently introduced a dependency on AbuseFilter in REL1_39 (https://github.com/wikimedia/mediawiki-extensions-StopForumSpam/commit/3639e0120d53bf5643de57dc6e94293f69680e9f)
# AFAIK it should be possible to run StopForumSpam without AbuseFilter installed (https://www.mediawiki.org/wiki/Extension:StopForumSpam#AbuseFilter_integration)
# A subsequent patch, only available in REL1_40, appears to removes this dependency again (https://github.com/wikimedia/mediawiki-extensions-StopForumSpam/commit/5e3aab6e8be0e8effa97f9b454020230b6a70e3d)
Expand Down
Loading