-
Notifications
You must be signed in to change notification settings - Fork 206
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
Add docker image uploading #2013
Conversation
Warning Rate Limit Exceeded@evanyeyeye has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 7 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe overall change introduces a feature for uploading Docker images, controlled by a feature flag across different environments. It modifies views to conditionally display links for Docker image upload based on the feature's enablement status. Additionally, a new controller and view are added to handle the Docker image upload process, with environment-specific configurations determining the feature's availability. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 3
Configuration used: CodeRabbit UI
Files selected for processing (7)
- app/controllers/dockers_controller.rb (1 hunks)
- app/helpers/assessment_autograde_core.rb (1 hunks)
- app/views/assessments/index.html.erb (1 hunks)
- app/views/autograders/_form.html.erb (1 hunks)
- app/views/dockers/index.html.erb (1 hunks)
- config/routes.rb (1 hunks)
- lib/tango_client.rb (1 hunks)
Files skipped from review due to trivial changes (3)
- app/helpers/assessment_autograde_core.rb
- app/views/assessments/index.html.erb
- app/views/autograders/_form.html.erb
Additional comments: 1
config/routes.rb (1)
- 104-107: The new routes for the
dockers
resource are correctly defined for theindex
anduploadDockerImage
actions. Theindex
action is associated with a GET request, and theuploadDockerImage
action is associated with a POST request, which is appropriate for file uploads. Ensure that the corresponding controller actions are properly secured to prevent unauthorized access, especially since this involves uploading Docker images which could potentially be a security risk if not handled correctly.
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.
This PR is not currently suitable for an autolab instance shared among multiple courses, since any instructor (in practice, many TAs) can overwrite any image (including those used by other courses/assessments) |
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.
Changes look good. I agree with @cg2v, it might be good to allow someone to specify the filename the image should be saved with.
Maybe the best way to go about it is to hide this behind a feature flag for now? I'm not sure how we can make this suitable for an instance shared among multiple courses. We could make it such that only the course that uploaded an image can overwrite it (by tracking it somehow), but we might also want to share the same image across iterations of a course. |
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.
Blocking until filename can be specified and nits (typos) are resolved
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.
LGTM
* Start frontend for docker upload * Some fixes * Typo fixes * Modify post request to build * Add error message for failed image uploads * Add success message * Add link to upload from edit assessment view * Add link to view all pools on upload page * Fix rubocop complaints * Change content type to standard MIME type * Fix erblint complaints * Change button name * Remove newline * Add feature flag * Add name specification for docker images, add to feature flag, and fix nits * Add feature flag for test env * Move button to manage course page * Move feature flag to config.x namespace and fix syntax error * Address issues with dockers_controller.rb * Fix regex pattern in dockers controller * Add frontend pattern * Fix truthy config
Summary
Summary generated by Reviewpad on 29 Jan 24 23:11 UTC
This pull request includes the following changes:
dockers_controller.rb
in theapp/controllers
directory.assessment_autograde_core.rb
in theapp/helpers
directory.index.html.erb
in theapp/views/assessments
directory._form.html.erb
in theapp/views/autograders
directory.index.html.erb
in theapp/views/dockers
directory.development.rb
in theconfig/environments
directory.production.rb.template
in theconfig/environments
directory.test.rb
in theconfig/environments
directory.routes.rb
in theconfig
directory.tango_client.rb
in thelib
directory.Please refer to the diff for more details.
Description
How Has This Been Tested?
With both local and docker installs:
docker save
) not yet used by Tango.Types of changes