Skip to content

[#151] Clone moodle before apply core patches#153

Merged
rhell4 merged 1 commit intomainfrom
151-fix-patch-ordering
Dec 12, 2025
Merged

[#151] Clone moodle before apply core patches#153
rhell4 merged 1 commit intomainfrom
151-fix-patch-ordering

Conversation

@matthewhilton
Copy link
Contributor

@matthewhilton matthewhilton commented Dec 11, 2025

Closes #151

Issue

Core patches need to be in the codebase before moodle install occurs.

There is a bit of a chicken and egg problem here since moodle plugin ci installs both moodle and the plugin at the same time, leaving no option for changes or core patches.

moodle-plugin-ci also only accepts git clone and not a local folder.

Fix

I've updated it clones to a temporary directory and applies patches ontop of that.

Then it uses a little known feature of git - file cloning, i.e. git clone /my/local/repo moodle is perfectly valid.

The only issue is this is currently broken as Moodle plugin ci (incorrectly) rejects file repo urls moodlehq/moodle-plugin-ci#306

So I have temporarily disabled this validation. At the end of the day its just validation, so I don't see much issue with turning it off in our specific case :)

It's definitely a hack but considering this issue has been open in upstream ci for 1.5 yrs now I don't want to wait on them.

Testing

I tested this using catalyst/moodle-tool_emailutils#104 which is temporarily pointing to this branch. Once this is merged, i'll switch it back to the main branch

image

@rhell4
Copy link
Contributor

rhell4 commented Dec 12, 2025

Thanks Matt, LGTM, it's a shame we need to disable the repo validation but that's all we can do until HQ changes it.

@rhell4 rhell4 merged commit 05b0151 into main Dec 12, 2025
@rhell4 rhell4 deleted the 151-fix-patch-ordering branch December 12, 2025 00:53
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.

Core patches should be applied before plugin install

2 participants