Commit Graph

143 Commits

Author SHA1 Message Date
Sebastian Serth
1403fc03c4 Remove outdated lines from #download method 2021-11-01 17:12:57 +01:00
Sebastian Serth
601e1fab5c Remove all occurrences of server-sent events 2021-11-01 17:12:57 +01:00
Sebastian Serth
4ad898ad8b Remove set_docker_client method from submissions_controller.rb 2021-11-01 17:12:54 +01:00
Felix Auringer
1bf92d8c90 Fix sentry error capturing in submissions controller 2021-11-01 17:12:53 +01:00
Felix Auringer
c7369366d5 Ensure that only one EventMachine is running 2021-11-01 17:12:52 +01:00
Felix Auringer
5cc180d0e9 Fix rubocop, I18n, cleanup rebase 2021-11-01 17:12:52 +01:00
Felix Auringer
2dff81a510 Attach duration information to the exception object 2021-11-01 17:12:52 +01:00
Felix Auringer
36578a2817 Ensure to save Testrun even when an error occurs 2021-11-01 17:12:52 +01:00
Felix Auringer
d1a5773e60 Add debug log statements to runner connection 2021-11-01 17:12:51 +01:00
Felix Auringer
704407b9fc Add strategy for DockerContainerPool
In order to provide an alternative to Poseidon, a strategy for the
DockerContainerPool is added that is used by the runner model.

Co-authored-by: Sebastian Serth <Sebastian.Serth@hpi.de>
2021-11-01 17:12:51 +01:00
Felix Auringer
413f9b2705 Improve error resilience and handling
Timeouts are now handled correctly and the Runner automatically
creates the execution environment if it could not be found in
Poseidon. The runner is deleted locally if Poseidon returns
a bad request error.
2021-11-01 17:12:50 +01:00
Felix Auringer
b6bc578aea Move submission scoring from controller concern to submission model
Localization and markdown formatting is now done in a controller
spec in order to bring this logic away from the data and towards
the view.
2021-11-01 17:12:50 +01:00
Felix Auringer
d0d1b1bffd Introduce strategy for runner behavior
The runner model is only a class responsible for storing information
now. Based on the configuration it picks a strategy for the runner
management. The Poseidon strategy is already implemented and tested.
The Docker strategy will follow.
2021-11-01 17:12:49 +01:00
Felix Auringer
cf58be97ee Fix 17 previously failing specs 2021-11-01 17:12:49 +01:00
Felix Auringer
d5b274c9f2 Introduce new error types for runners
The errors are raised in the runner model and in the runner connection
class. In the submission controller the errors are rescued and,
depending on the error, the status timeout / container depleted is
sent to the client.
2021-11-01 17:12:48 +01:00
Felix Auringer
63d997a7e3 Fix Rubocop offenses after Rubocop was reconfigured 2021-11-01 17:12:47 +01:00
Konrad Hanff
17bd2d8726 Reuse runners per user and execution environment
Co-authored-by: Jan-Eric Hellenberg <jan-eric.hellenberg@student.hpi.uni-potsdam.de>
Co-authored-by: Maximilian Pass <maximilian.pass@student.hpi.uni-potsdam.de>
2021-11-01 17:12:46 +01:00
Konrad Hanff
2404c1c36c Rename variables from container to runner 2021-11-01 17:12:45 +01:00
Konrad Hanff
575057acd3 Fix some non-autocorrectable linting issues
Many functions in submission_controller.rb still are very long and have
a high complexity. Because the logic for handling execution of
submissions will probably move elsewhere (when switching to
ActionCable), this is fine for now.
2021-11-01 17:12:45 +01:00
Konrad Hanff
80932c0c40 Auto-correct linting issues 2021-11-01 17:12:45 +01:00
Konrad Hanff
cf1e4d6edf Rename API routes 2021-11-01 17:12:44 +01:00
Konrad Hanff
28f8de1a93 Implement workaroud for double render error
Co-authored-by: Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de>
2021-11-01 17:12:44 +01:00
Konrad Hanff
347e4728a0 Rework protocol inside websocket
Co-authored-by Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de>
2021-11-01 17:12:44 +01:00
Konrad Hanff
6a4e302f4e Fix socket handling and add configuration option
Co-authored-by: Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de>
2021-11-01 17:12:43 +01:00
Konrad Hanff
92b249e7b3 Reimplement scoring and create connection abstraction
Co-authored-by: Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de>
2021-11-01 17:12:43 +01:00
Konrad Hanff
1546f70818 Begin to refactor websocket handling and implement test
Co-authored-by: Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de>
2021-11-01 17:12:43 +01:00
Konrad Hanff
3cf70a33d8 Integrate new API with websocket (run only)
Co-authored-by: Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de>
2021-11-01 17:12:43 +01:00
Konrad Hanff
2e2cd1855e Add Container abstration with new API calls and adapt running a submission
Co-authored-by: Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de>
2021-11-01 17:12:43 +01:00
Ralf Teusner
3840b45f8a Revert "Revert "Use switch_locale instead of I18n.with_locale directly""
This reverts commit 2c08e270e7.

Co-authored-by: Sebastian Serth <Sebastian.Serth@hpi.de>
2021-08-05 23:17:06 +02:00
Ralf Teusner
2c08e270e7 Revert "Use switch_locale instead of I18n.with_locale directly"
This reverts commit 125c342f35.
2021-08-05 11:55:54 +02:00
Sebastian Serth
125c342f35 Use switch_locale instead of I18n.with_locale directly 2021-07-26 12:01:25 +02:00
Sebastian Serth
448b5e4a7a Use current_locale for "not_graded" hint 2021-07-22 10:23:57 +02:00
Sebastian Serth
d7eb562389 Prevent underscores from being removed during command substitution 2021-07-07 20:42:59 +02:00
Sebastian Serth
9696fcb06f Remove unnecessary require for zip download 2021-07-06 09:27:44 +02:00
Sebastian Serth
e7cf4ef5db Apply automatic rubocop fixes 2021-06-25 14:41:49 +02:00
Sebastian Serth
5243808d54 Apply automatic rubocop fixes 2021-05-17 19:40:38 +02:00
Sebastian Serth
da0a682ffb Apply manual rubocop fixes 2021-05-14 22:03:06 +02:00
Sebastian Serth
6cbecb5b39 Apply automatic rubocop fixes 2021-05-14 22:03:06 +02:00
Sebastian Serth
4958f5b9a9 Add StudyGroup to RemoteEvaluationMapping 2021-04-30 12:06:12 +02:00
Sebastian Serth
1e5a9b0825 Remove unused SubmissionsController#stop action 2021-04-07 17:45:38 +02:00
Sebastian Serth
ef50b9b859 Turtle: Catch more parts for buffering 2021-03-15 19:53:29 +01:00
Sebastian Serth
b10e23dd16 Upgrade to newest Sentry 2021-03-04 14:02:16 +01:00
Sebastian Serth
de0c1e60c6 Less strict filter for workspace output 2021-02-02 11:28:35 +01:00
Sebastian Serth
6216786e3e Forward exit message even if part of multiple lines 2021-01-20 22:16:57 +01:00
Sebastian Serth
862e274739 Allow binary files to be downloaded 2021-01-11 15:19:37 +01:00
Sebastian Serth
8c04ecdfd1 Print no_output message also for Python container 2020-11-24 00:46:39 +01:00
Sebastian Serth
1df4685f38 Enable buffering for Turtle Commands in WebSocket output 2020-11-24 00:21:39 +01:00
Sebastian Serth
839e6e0936 Prevent displaying of bash errors in output 2020-11-23 23:36:34 +01:00
Sebastian Serth
c2a816968e Show no run output for Python execenv 2020-11-08 14:53:50 +01:00
Sebastian Serth
10bbc68829 Save file ref for code runs in testrun 2020-10-28 14:07:09 +01:00