-
Notifications
You must be signed in to change notification settings - Fork 31
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
fix STORAGE_KWARGS #70
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,9 @@ | |
PROFILE_IMAGE_BACKEND = { | ||
"class": DEFAULT_FILE_STORAGE, | ||
"options": { | ||
"bucket": "{{ S3_PROFILE_IMAGE_BUCKET }}", | ||
"bucket_name": "{{ S3_PROFILE_IMAGE_BUCKET }}", | ||
"location": PROFILE_IMAGE_BACKEND["options"]["location"].lstrip("/"), | ||
{% if S3_PROFILE_IMAGE_CUSTOM_DOMAIN %}"custom_domain": "{{ S3_PROFILE_IMAGE_CUSTOM_DOMAIN }}",{% endif %} | ||
# A non empty base_url is necessary in development as it will be used | ||
# to build a static url for the profile images. | ||
"base_url": "dummyprofileimagebaseurl", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure I understand why it's necessary to remove this from here, and then reindroduce it in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure. The comment indicates that this is necessary for development and I thought it was cleaner to move this to the dev-specific patch. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, that makes sense. :) |
||
}, | ||
} | ||
{% endif %} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @CefBoud If I read overhangio/tutor#999 and overhangio/tutor-minio#35 correctly, then I would assume that we don't need to mess with |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% if S3_PROFILE_IMAGE_BUCKET %} | ||
# A non empty base_url is necessary in development as it will be used | ||
# to build a static url for the profile images. | ||
PROFILE_IMAGE_BACKEND["options"]["base_url"] = "dummyprofileimagebaseurl" | ||
{% endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I presume you are overriding the whole dictionary here, rather than just overriding the value of
location
, in order to remove the problematicbase_url
key. Is that correct?If so, I'm curious as to why the
tutor-minio
plugin does not fail in the same way. Because it appears to be doing the same thing that we do here, namely only override thelocation
key rather than the whole dictionary:https://github.com/overhangio/tutor-minio/blob/ac817717c92ca006e7752efd1c034a6175f3c948/tutorminio/patches/openedx-common-settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly.
I am not really familiar with the
tutor-minior
plugin. But please note that this problem occurs in Quince (3 months-ish ago?) and the last commit from that file dates back to 7 months ago. So they might have the same issue. I am not sure.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem. @regisb, just checking, does this ring a bell?
I ask because if setting
base_url
breaks bothtutor-minio
andtutor-contrib-s3
, then it should probably be fixed in both — or else, maybe we want to remove lines such as this from Tutor Core:https://github.com/overhangio/tutor/blob/2924b92ceab8aca550ec5ecae559a367fb1b713a/tutor/templates/apps/openedx/settings/partials/common_all.py#L122
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. Thanks for the heads up Florian. @FahadKhalid210 could you please have a look and see if you can reproduce the issue described here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@regisb sure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@regisb The issue has been replicated locally by initiating Tutor with the
Quince
version and thes3
plugin. Additionally, the problem was verified usingMinio
, and it was reproduced in that environment as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @FahadKhalid210!
@regisb, at your convenience could you please advise whether the
base_url
setting is even still necessary in Tutor Core? Because if it is not, then I'd suggest we remove it from there, and remove any reference to it from thes3
andminio
plugins.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't figure remember the reason I initially introduced a
base_url
setting inGRADES_DOWNLOAD
. The most information I can find is from this commit, five years ago: overhangio/tutor@abfbf1cIndeed, we should remove this
base_url
attribute if it's causing errors.@FahadKhalid210 can you please handle this? We should verify that grades download keeps working both with and wihout minio.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FahadKhalid210: When you create a PR for such a change in either
tutor
ortutor-minio
, would you mind adding a link to this issue in the discussion thread, so we get a backlink here and can coordinate the fix?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing. Here it is: overhangio/tutor#999
EDIT: actually, here's the relevant PR overhangio/tutor-minio#35