ada438b230
Add release and pool_size methods to DCP
2021-11-01 17:13:07 +01:00
2b98905acb
Remove usage of DockerClient from execution_environments_controller.rb
2021-11-01 17:13:07 +01:00
541afa92f3
Remove ws_client_protocol option
...
* The correct setting will be determined automatically
2021-11-01 17:13:06 +01:00
0db6f20933
Move MemoryLimit to Execution Environment
2021-11-01 17:13:06 +01:00
9cc4394296
Allow editing an Execution Environment with active runner management
2021-11-01 17:13:05 +01:00
d87e23b9a3
Add execute_command
method to runner.rb
...
* This is now used by the score and test runs
* This also re-enables the interactive shell for execution environments
2021-11-01 17:13:05 +01:00
02a2673bf2
Add hint for CPU limit
2021-11-01 17:13:05 +01:00
7e2039ebc2
Fix bug that always showed the default value for CPU limit when editing the limit
2021-11-01 17:13:04 +01:00
a1db30c288
Clarify EnvironmentNotFound error handling
2021-11-01 17:13:02 +01:00
06ef4430f5
Change exposed_ports to array
2021-11-01 17:13:02 +01:00
064c55b711
Add new validator for all elements of an array
2021-11-01 17:13:02 +01:00
90eeb3bb9c
Move CodeOcean::FileNameValidator
2021-11-01 17:13:01 +01:00
352e5f4329
Clarify strategy creation in runner.rb with comment
2021-11-01 17:13:01 +01:00
7285978ea3
Re-add test method for SubmissionsController
2021-11-01 17:13:01 +01:00
5f98456276
Extract run_test_file from submission.rb
2021-11-01 17:13:01 +01:00
56a1d78793
Use correct embed_option to disable_score
2021-11-01 17:13:01 +01:00
2377f8370c
Clarify set_file and set_files in SubmissionsController
2021-11-01 17:13:00 +01:00
21e0571838
Remove unnecessary post parameter from sync_all view
2021-11-01 17:13:00 +01:00
345860c779
Adapt output buffering to Poseidon and DCP
...
* Refactor flushing of messages
* Introduce two separate buffers for stdout and stderr
2021-11-01 17:13:00 +01:00
7e7b7ebdfa
Allow flushing the WebSocket connection
...
* This will prevent the current thread from crashing when a single newline character is received.
2021-11-01 17:12:59 +01:00
f4c806fe43
Forward JSON from runner to client if possible
2021-11-01 17:12:59 +01:00
a074a5cb0d
Add buffering to output received from runner
2021-11-01 17:12:58 +01:00
3240ea7076
Forward input as raw_event to runner
...
* Also, rename #send to #send_data in order to prevent debugging issues in RubyMine
2021-11-01 17:12:58 +01:00
f896d041f8
Restructure submissions_controller and remove outdated copy_comments method
2021-11-01 17:12:58 +01:00
1403fc03c4
Remove outdated lines from #download method
2021-11-01 17:12:57 +01:00
601e1fab5c
Remove all occurrences of server-sent events
2021-11-01 17:12:57 +01:00
82cab390ad
Remove outdated run method from turtle.js
2021-11-01 17:12:57 +01:00
cc17736bf5
Add CPU limit to Execution Environment index
2021-11-01 17:12:56 +01:00
0c22e1392a
Remove outdated mnemosyne traces
2021-11-01 17:12:55 +01:00
13c378b980
Remove concurrent ruby gem no longer needed
2021-11-01 17:12:55 +01:00
fd9e243064
Disable DCP if other strategy class is chosen
2021-11-01 17:12:54 +01:00
4ad898ad8b
Remove set_docker_client method from submissions_controller.rb
2021-11-01 17:12:54 +01:00
f77e6d9df8
Simplify code in runner model
2021-11-01 17:12:54 +01:00
1bf92d8c90
Fix sentry error capturing in submissions controller
2021-11-01 17:12:53 +01:00
30603cb7ab
Generalize method and constant names for runner management
2021-11-01 17:12:53 +01:00
e752df1b3c
Move EventMachine initialization to Runner::EventLoop
2021-11-01 17:12:53 +01:00
9e2cff7558
Attach connection errors to socket
...
Raising the errors would crash the current thread. As this thread
contains the Eventmachine, that would influence other connections
as well. Attaching the errors to the connection and reading them
after the connection was closed ensures that the thread stays
alive while handling the errors in the main thread of the current
request.
2021-11-01 17:12:53 +01:00
c7369366d5
Ensure that only one EventMachine is running
2021-11-01 17:12:52 +01:00
5cc180d0e9
Fix rubocop, I18n, cleanup rebase
2021-11-01 17:12:52 +01:00
2dff81a510
Attach duration information to the exception object
2021-11-01 17:12:52 +01:00
36578a2817
Ensure to save Testrun even when an error occurs
2021-11-01 17:12:52 +01:00
d1a5773e60
Add debug log statements to runner connection
2021-11-01 17:12:51 +01:00
cc412b73bc
Introduce more error types
2021-11-01 17:12:51 +01:00
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
1d3f0d7ad8
Handle Faraday errors
2021-11-01 17:12:50 +01:00
b48b45de9f
Refactor error classes
...
All runner errors are now in a single file. The not found error
has been splitted into an error for runner not found and for
environment not found.
2021-11-01 17:12:50 +01:00
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
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
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
cf58be97ee
Fix 17 previously failing specs
2021-11-01 17:12:49 +01:00