-
Notifications
You must be signed in to change notification settings - Fork 61
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 Partial Output to Tango, and functionality to localDocker VMMS #223
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
michellexliu
approved these changes
Dec 2, 2022
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
damianhxy
approved these changes
Dec 3, 2022
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.
Followed testing plan, code looks good
lgtm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds partial output functionality by:
localDocker
, mainly as this is likely the most use VMMS for Tango right now.job8-10
which is a grading test case that takes at least 30 seconds to run, which makes the rest of the testing easier by hand. 8 is a C version, 9 is Python and 10 is bash.How to test
test
(DEFAULT_KEY = "test"
in config.py`)Test situation when jobId doesn't exits / is no longer live or on the queue (could be completed)
python clients/tango-cli.py --getPartialOutput -k test --jobid 1
{"statusId": -1, "statusMsg": "getPartialOutput request failed: Invalid job id"}
Test situation when a VMMS doesn't have getPartialOutput Implemented
python clients/tango-cli.py -P 3000 -k test -l assessment10 --runJob clients/job10/ --image autograding_image
(this submits job10 for grading){"statusId": 0, "statusMsg": "Job added", "jobId": "1"}
python clients/tango-cli.py --getPartialOutput -k test --jobid 1
{"statusId": -1, "statusMsg": "getPartialOutput request failed: 'LocalDocker' object has no attribute 'getPartialOutput'"}
( make sure to change the function getPartialOutput name back)
Test getting partial output
python clients/tango-cli.py -P 3000 -k test -l assessment10 --runJob clients/job10/ --image autograding_image
(this submits job10 for grading) to submit another jobpython clients/tango-cli.py --getPartialOutput -k test --jobid 1
(depending on the job id){"statusId": 0, "statusMsg": "Partial output obtained", "output": "bash hello.sh\r\nHello to sleep job\r\nHello 1 times\r\nHello 2 times\r\nHello 3 times\r\nHello 4 times\r\nHello 5 times\r\nHello 6 times\r\nHello 7 times\r\nHello 8 times\r\nHello 9 times\r\nHello 10 times\r\nHello 11 times\r\n"}
Test situation when the Job is still on the queue
python clients/tango-cli.py -P 3000 -k test -l assessment10 --runJob clients/job10/ --image autograding_image
(this submits job10 for grading) to submit another job 3 times (if you are on default, as by default settings, Tango only spins up at most 2 in the autograding_pool).python clients/tango-cli.py --getPartialOutput -k test --jobid 3
(depending on the job id of the last job to be submitted{"statusId": -1, "statusMsg": "getPartialOutput request failed: Job 4 is not running yet"}
python clients/tango-cli.py --getPartialOutput -k test --jobid 3
should now get you the partial output