-
Notifications
You must be signed in to change notification settings - Fork 278
Better channel restoration for local dev with content proxying #5611
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
base: unstable
Are you sure you want to change the base?
Better channel restoration for local dev with content proxying #5611
Conversation
5d36345 to
6b0a37f
Compare
6b0a37f to
246f58e
Compare
| :param: filepath: the file path inside the bucket that the user can PUT their object. | ||
| :param: md5sum: the base64-encoded MD5sum of the object the user is planning to PUT. | ||
| This is ignored for this function and added solely to maintain API compatibility with other | ||
| private presigned URL functions. |
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.
Is this a continuation from the previous line?
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.
Yes, I believe an indent is the convention for parameter docstrings that wrap
| command: pnpm run devserver | ||
| ports: | ||
| - "8080:8080" | ||
| - "8081:8081" |
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.
What's the reason for moving to port 8081 again?
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.
We're allocating port 8080 to nginx, so it can proxy through to the devserver and minio. Therefore the devserver needs to be on a different port, and this changes it to 8081. From the developer's perspective, nothing changes, because they still load the the 8080 URL, but in reality they're hitting nginx first instead of the raw python devserver.
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.
From the developer's perspective, nothing changes, because they still load the the 8080 URL, but in reality they're hitting nginx first instead of the raw python devserver.
@bjester I did try to load the server on 8080 but was unable, I was successful with 8081 though.
akolson
left a comment
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.
The refactor make sense to me. I was able to restore 2 channels successfully (QA channel and the small channel recommended on the pr)--all seemed to work flawlessly including the restoration of exercises that were problematic with the previous script. Thanks @bjester
However, to access the server, you need to use port 8081 instead (as 8080 failed for me). I'm not sure if this in the intended behavior?
No, this doesn't sound like intended behavior. It sounds like nginx wasn't running. Which commands did you use? Do you see any output about the nginx container crashing? |
Summary
restore_channelmanagement command to be more robust and useful for restoring channels for local development:nginxto services started through Makefilemake dcservicesupfor proxying both devserver and content in developmentReferences
Supports ongoing improvements to curriculum automation (search recommendations)
Reviewer guidance
python contentcuration/manage.py restore_channel --editor [email protected] --source-url https://studio.learningequality.org --public --publish --token <your_studio_token> <channel_id>(the following is a small channel: d0ef6f71e4fe4e54bb87d7dab5eeaae2)make run-servicesthenpnpm run devserverNotes
I simply deleted the existing tests for the channel restoration. Since it's a development only command, the tests usefulness are questionable, but I'm willing to add tests later if it's desired.