Sebastian Serth
325720bd3b
Improve documentation in Runner::Connection
2021-11-01 17:12:56 +01:00
Sebastian Serth
13c378b980
Remove concurrent ruby gem no longer needed
2021-11-01 17:12:55 +01:00
Sebastian Serth
fd9e243064
Disable DCP if other strategy class is chosen
2021-11-01 17:12:54 +01:00
Sebastian Serth
30603cb7ab
Generalize method and constant names for runner management
2021-11-01 17:12:53 +01:00
Felix Auringer
e752df1b3c
Move EventMachine initialization to Runner::EventLoop
2021-11-01 17:12:53 +01:00
Felix Auringer
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
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
f98a8b9e7a
Resolve error handling todos in dcp strategy
2021-11-01 17:12:52 +01:00
Felix Auringer
5608d61b3a
Replace metaprogramming in Runner::Connection
...
This prevents someone who is controlling the websocket connection
to send messages starting with 'handle_' to the connection object.
2021-11-01 17:12:51 +01:00
Felix Auringer
d1a5773e60
Add debug log statements to runner connection
2021-11-01 17:12:51 +01:00
Felix Auringer
cc412b73bc
Introduce more error types
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
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
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
8d968e01e6
Move RunnerConnection into class Runner
...
The old approach was to require the runner connection. This did
not work anymore with Zeitwerk in Rails 6. @sebastian.serth and I
moved the Connection class in `lib` into the ActiveRecord class
`Runner`. This will also work with future changes like specific
error classes. Furthermore the config was fixed and simplified.
Co-authored-by: Sebastian Serth <Sebastian.Serth@hpi.de >
2021-11-01 17:12:47 +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
3017e46006
Add newline to end of json schema
2021-11-01 17:12:45 +01:00
Konrad Hanff
2404c1c36c
Rename variables from container to runner
2021-11-01 17:12:45 +01:00
Konrad Hanff
3e6534567d
Move copy_submission_files from runner to submission
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
6e9562c9e1
Validate json
2021-11-01 17:12:44 +01:00
Konrad Hanff
cf1e4d6edf
Rename API routes
2021-11-01 17:12:44 +01:00
Konrad Hanff
c36ec447ff
Fix faulty API data format
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
Sebastian Serth
74e285e9fd
Fix rubocop offenses
2021-10-05 12:09:56 +02:00
Sebastian Serth
9fbb148af4
Improve JUnit 5 adapter for successful runs
2021-09-11 21:07:47 +02:00
Sebastian Serth
49d71f9763
Specify version for junit_adapter.rb
2021-09-11 19:51:50 +02:00
Sebastian Serth
b9b2917acf
Add JUnit5 adapter
2021-09-11 19:51:26 +02:00
Sebastian Serth
d7eb562389
Prevent underscores from being removed during command substitution
2021-07-07 20:42:59 +02:00
Sebastian Serth
7010614a75
Re-enable translation of linter messages
2021-06-28 22:11:00 +02:00
Sebastian Serth
e7cf4ef5db
Apply automatic rubocop fixes
2021-06-25 14:41:49 +02:00
Sebastian Serth
08d7b89108
Merge pull request #930 from openHPI/own-project
...
Rebrush action sidebar for implement view
2021-06-01 17:38:55 +02:00
Sebastian Serth
f32661ad78
Rework left sidebar
...
* Move Buttons from left sidebar to JSTree
* Use light style for collapse sidebar buttons
2021-05-28 17:49:59 +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
b3bd84cc21
Change check for presence of Rails Console
2021-05-10 18:57:01 +02:00
Sebastian Serth
9e3eafb346
skip prometheus initialization if disabled / console
2021-04-26 14:20:14 +02:00
Sebastian Serth
6a6e1c84f4
Move Prometheus initialization after preloading the remaining app
2021-04-22 12:34:27 +02:00