Skip to content

Add patches to wikiman - #546

Open
outdooracorn wants to merge 5 commits into
mainfrom
add-patches-to-wikiman
Open

outdooracorn wants to merge 5 commits into
mainfrom
add-patches-to-wikiman

Conversation

@outdooracorn

Copy link
Copy Markdown
Member

Allow components (mediawiki, extensions, skins) in wikiman.yaml to define patches via a patches array. Patches are now preserved when wikiman regenerates pacman.yaml, removing the need to manually re-add them. This also makes it easier to add comments explaining what each patch does.

patches is an array of objects so that it can support managing patches via different means in the future. E.g. the Patch object could contain a Gerrit Change Number or a Commit Hash instead of the URL.

Bug: T431152

@outdooracorn

Copy link
Copy Markdown
Member Author

In #546, @tarrow provided some useful context on this topic. I also like the doc changes that @deer-wmde has made in that PR. Especially the changes that fix or remove the information that is outdated by this PR.

@outdooracorn
outdooracorn force-pushed the add-patches-to-wikiman branch from 795a5c8 to 9ca7f40 Compare July 9, 2026 14:14
@deer-wmde

Copy link
Copy Markdown
Contributor

@outdooracorn feel free to include those doc changes here, as the other PR won't get merged

Allow components (mediawiki, extensions, skins) in `wikiman.yaml` to define patches via a `patches` array. Patches are now preserved when wikiman regenerates `pacman.yaml`, removing the need to manually re-add them. This also makes it easier to add comments explaining what each patch does.

`patches` is an array of objects so that it can support managing patches via different means in the future. E.g. the Patch object could contain a Gerrit Change Number or a Commit Hash instead of the URL.

Bug: T431152
Includes an optional `--patches prompt|keep|drop` cli argument to configure this feature. Useful for automated workflows such as CI. Defaults to `prompt`.

Bug: T431152
@outdooracorn
outdooracorn force-pushed the add-patches-to-wikiman branch from 9ca7f40 to 07dfb5b Compare October 21, 2026 11:09
@outdooracorn

Copy link
Copy Markdown
Member Author

I guess CI is failing due to not being able to reach gerrit to download patches due to it being offline while the WMF update PHP due to the two critical security issues.
image
Re-run CI once all sorted and gerrit is back up.

Comment thread sync/wikiman/wikiman.py
answer = input("Keep this patch? [y/n]: ").strip().lower()
if answer in ('y', 'n'):
return answer == 'y'
print("Please answer 'y' or 'n'.")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

From dev chat: If the answer is no, should we exit the script early or inform the user that they need to manually remove this from wikiman.yaml?

I think that I prefer informing the user rather than exiting early. Could also list all the components and/or patches that need to be removed from wikiman.yaml at the end of the script running.

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.

2 participants