-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mediawiki: prevent mwdeploy from upgrading extensions configured to checkout a specific commit #3876
Conversation
…ured to checkout a specific commit
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
I think using git to check if a commit is checked out would be better than a file? Also we should also add tests here. |
Check commit and GitHub actions for more details
Puppet won't touch the extension if the commit parameter is removed in mediawiki-repos as long as the extension exists. So I think there's no way to differentiate then between an extension configured to checkout a specific commit to one that used to be, but is no longer configured to do so without doing this. I'm probably wrong tho I'll work on the tests |
I don't know what you mean? If you use git to check it doesn't rely on puppet it uses the current value and check for something like a "Detached HEAD" state. |
IE use something like the command |
https://github.com/miraheze/mediawiki-repos supports configuring an extension to checkout a specific commit. However, if the extension is upgraded by mwdeploy, such as during
--upgrade-world
, then it will just pull the latest commit from the configured branch, which is not desired behavior. Puppet will restore the extension to the commit configured in mediawiki-repos, but by then the rsync has already happened.This pull request aims to fix that by creating a file with the name of the extension on
/var/local/mwdeploy
, which if mwdeploy sees while upgrading an extension, will tell the script to not attempt to upgrade. This file is created automatically by Puppet, and removed automatically when thecommit
parameter for that extension is removed from mediawiki-repos