feat: added new setting CUSTOM_RESOURCE_TEMPLATES_DIRECTORY - #30759
feat: added new setting CUSTOM_RESOURCE_TEMPLATES_DIRECTORY#30759keithgg wants to merge 1 commit into
Conversation
|
Thanks for the pull request, @keithgg! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
5b47f36 to
b96da20
Compare
|
@natabene can you assist with the test failures I'm getting here? I'm getting the below error from the CI: But that code isn't part of Maple. It was only added two months ago. |
|
@keithgg Thank you for the contribution. Sorry, I don't know how to help here. Let's see if reviewers can help out. |
I came across this PR accidentally. It seems the issue here is that pip dependencies are being cached and restored, however the process for installing dependencies doesn't remove existing dependencies. So what's happening here is that newer CI builds are installing new dependencies, which includes I think the quick solution here would be to include the target branch name in cache key, and only restore the cache for the same branch. |
|
I don't know that we usually take non-critical backports to older releases, but the diff is basically identical and so from that perspective I'd be happy to give an approval -- as long as tests could be made to pass. The CI issue is weird, though. The workflow that's actually running is unit-tests.yml, which doesn't even use |
|
I'm going to see if I can work around the caching issue on master, and if that works, maybe you can backport to Maple in a separate PR to unblock this one. |
|
@timmc-edx apologies for the late reply here. Thank you for looking into this. I see that the caching task has been merged. I'll do another PR and close this one if the tests pass. |
|
Oh sorry, I don't mean another PR for this work -- you can keep this one. I just meant that the change to using pip-sync would also needed to be backported to Maple first, to avoid the stale cache issue. |
|
@keithgg @timmc-edx Hi there! Just checking on this to see if this has become unblocked? Looks like tests will need to be re-run prior to review. Thanks! |
|
I think the status is still that fixes to the CI tests would still need to be backported. |
This setting allows loading of Resource Templates from outside the edx-platform codebase. Operators will be able to add their own custom resource templates without needing to fork the codebase. (cherry picked from commit ed81774)
b96da20 to
219da77
Compare
|
@timmc-edx that looks like the case. Although the error now is with installing the requirements and no longer in the test suite itself. |
|
Hi @keithgg and @timmc-edx - is this PR still being pursued? If so, we'll need to have a product review of it as well. Please let me know. Thanks! |
|
@mphilbrick211 we've since migrated away from maple so this isn't important anymore. I'm happy to close it. @timmc-edx thanks for the help so far, are you happy to close this? |
|
I'm fine either way -- I'll go ahead and close it since it sounds like that's where things are at right now, but if anyone wants to reopen I'm happy to help out with anything that needs review or repo-owner permissions. |
|
@keithgg Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future. |
This PR backports the changes #30108 to maple.master. Re-using the description below.
Description
At Opencraft, we have clients that want to be able to add custom HTML templates that show up while creating course components in Studio.
Currently, there's no way to achieve this besides forking
edx-platformand adding theyamlfiles tocommon/lib/xmodule/xmodule/templates/This PR allows operators to set a custom directory where templates can be additionally loaded from.
settings.CUSTOM_RESOURCE_TEMPLATES_DIRECTORYexists.yamlfiles with the same logic as in thexmodule/templatesdirectory.Supporting information
Testing instructions
settings.CUSTOM_RESOURCE_TEMPLATES_DIRECTORYto a valid path.htmldirectory.common/lib/xmodule/xmodule/templates/htmlto the above directory with a different filename.Deadline
"None"
Other
Settings