Set the MEDIA_ROOT and MEDIA_URL settings in the cms.envs.aws module - #15360
Conversation
|
Thanks for the pull request, @replaceafill! It looks like you're a member of a company that does contract work for edX. If you're doing this work as part of a paid contract with edX, you should talk to edX about who will review this pull request. If this work is not part of a paid contract with edX, then you should ensure that there is an OSPR issue to track this work in JIRA, so that we don't lose track of your pull request. |
|
@estute I created this PR to fix the failing bokchoy tests of https://github.com/edx/edx-platform/pull/15296. I can see the same failures here too. However, I haven't been able to reproduce them in my devstack. I first tried running the tests just for the edxapp@vagrant:~/edx-platform$ paver test_bokchoy -t studio/test_import_export.pywhich produced no failures: https://pastebin.com/9Sa8qs15 And then, after inspecting the Jenkins logs, using shards like this: edxapp@vagrant:~/edx-platform$ paver test_bokchoy --attr="shard=7" --with-flaky --with-xunitwhich didn't produced failures either: https://pastebin.com/D7Um2y62 How should I run the tests in my devstack in order to get the same failures Jenkins reports? Thanks! |
815ceb0 to
eb0ae86
Compare
|
jenkins run bokchoy |
eb0ae86 to
c567add
Compare
|
@jibsheet @estute Could you please take a look? This PR fixes the bokchoy failures of https://github.com/edx/edx-platform/pull/15005 |
|
Thanks for the pull request, @replaceafill! I've created OSPR-1807 to keep track of it in JIRA. JIRA is a place for product owners to prioritize feature reviews by the engineering development teams. Feel free to add as much of the following information to the ticket:
All technical communication about the code itself will still be done via the GitHub pull request interface. As a reminder, our process documentation is here. If you like, you can add yourself to the AUTHORS file for this repo, though that isn't required. Please see the CONTRIBUTING file for more information. |
pomegranited
left a comment
There was a problem hiding this comment.
Works great! Thanks @replaceafill .
👍
- I tested this using the described instructions. I also tested importing the exported course, just to be sure.
- I read through the code
-
I checked for accessibility issuesNo change to the user-facing GUI. -
Includes documentation- contains some docstrings, but it's a bugfix, so doesn't require user-facing docs.
|
@jibsheet it looks like you reviewed the earlier version of this. Are you able to OK this PR, or does it require an explicit Educator review? |
|
@cahrens I'd love someone else to look at the bok_choy.json change that fixed tests. I'm fine with the rest of the prod-facing changes, but don't have as much bok choy familiarity to be sure about the test fix. |
| (TEST_ROOT / "staticfiles" / "cms").abspath(), | ||
| ] | ||
|
|
||
| DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' |
There was a problem hiding this comment.
It appears that these are the same settings that are already in lms/envs/bok_choy.py. Therefore I think this change makes sense.
https://github.com/edx/edx-platform/blob/master/lms/envs/bok_choy.py#L67
FYI @jzoldak, in case you have any concerns.
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production on Friday, July 07, 2017. |
|
This merge was after the release that became Gingko. This will need to be cherry-picked if it's to be part of Ginkgo. |
|
Since it was merged, I went ahead and cherry-picked it. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
In a sandbox setup, the course export functionality throws this error if the file system is used as storage:
This is caused because the
MEDIA_ROOTandMEDIA_URLsettings are not set explicitly in the cms configuration and their default values (empty strings) are used to calculate the base location of the storage, breaking the Celery task.This PR reuses both settings from the
lms.envs.commonmodule and allows to override them through ENV_TOKENS fixing this permission issue.Sandbox URL
LMS: https://pr14831.sandbox.opencraft.hosting
Studio: https://studio-pr14831.sandbox.opencraft.hosting
Testing instructions
Note: This change was first created under https://github.com/edx/edx-platform/pull/15005, but had to be reverted because the bokchoy tests failed.