A few days ago, this question was raised during an OSPR review, which started a discussion in the BTR wg slack channel:
What are your thoughts on this? I’m eager to know!
A few days ago, this question was raised during an OSPR review, which started a discussion in the BTR wg slack channel:
What are your thoughts on this? I’m eager to know!
Thanks for moving the conversation to the forum @mgmdi The question originated from this GitHub comment: fix: if pages and resources view is disabled, show all pages in studi… by navinkarkera · Pull Request #31892 · openedx/edx-platform · GitHub
In a nutshell, the question is about how to apply patches to edx-platform, specifically in the context of older releases.
As a reminder, we do not backport bug fixes to Open edX releases other than the current one. There is just one exception to this rule in the context of Tutor, which is that users should (as much as possible) be able to download or rebuild Docker images. This is what happened in this specific instance, as I commented here: fix: if pages and resources view is disabled, show all pages in studi… by navinkarkera · Pull Request #31892 · openedx/edx-platform · GitHub
Still, the question remains: if a user needs to apply a particular fix or feature to an older release of edx-platform, what’s the recommend approach?
In my opinion, the most simple and sustainable solution is to build a Tutor plugin that will apply a patch to edx-platform. Then rebuild the “openedx” Docker image and restart your platform to start using it. This is how it goes:
from tutor import hooks
# replace <MYFORK> and <GITSHA1> adequately
hooks.Filters.ENV_PATCHES.add_item(
(
"openedx-dockerfile-post-git-checkout",
"RUN curl -fsSL https://github.com/<MYFORK>/edx-platform/commit/<GITSHA1> | git am"
)
)
tutor plugins enable myplugin
tutor config save
Build the new “openedx” Docker image:
tutor images build openedx
Start using it:
tutor local launch -I
# or just run "tutor local start -d" if your changes do not include any new migration
It feels weird to not backport bug fixes to supported versions of edX. I am sure there is a good reason for it but I was unaware of this rule, is there a link to somewhere explaining the reasoning behind this decision?
Well, that’s the thing, you see: the only supported version of Open edX is always the current one. Backports to older releases are not supported – not just by Tutor, but by Open edX in general. This is common knowledge for those who have been around for a long time, but it’s a piece of information that’s kind of buried in the docs: Open edX Named Release Branches and Tags — Latest documentation
Got it, thanks for link!