574e99eddd
Fix rubocop offenses - Requires Ruby 3.1+
2022-11-25 11:10:06 +01:00
9ea94ed4fc
Explicitly copy folders before adding files
...
This allows to protect copied files while additionally allowing learners to add new files in copied subdirectories
2022-10-29 18:50:27 +02:00
60078701f5
Editor: Allow file retrieval after code run
2022-10-29 18:49:18 +02:00
a5da7d1f84
Remove outdated HTTP status codes
...
See https://github.com/openHPI/codeocean/pull/1349#pullrequestreview-1091652523
2022-10-05 13:11:43 +02:00
ba821bd18b
Change HTTP status codes for Poseidon in accordance with recent changes.
...
See https://github.com/openHPI/poseidon/pull/159
2022-10-05 13:11:43 +02:00
f53c6cb3ee
Shell: Add toggle to execute command as root
2022-10-04 16:06:58 +02:00
eb188dcd71
Add privilegedExecution flag to database and Poseidon Strategy
2022-09-24 22:32:41 +02:00
d762f976a8
Add new CodeOcean::File#read method
...
* With a new method, we can simplify our code to handle differences between file.content and file.native_file.read
2022-08-19 22:42:55 +02:00
56eab88f88
Gracefully handle the deletion of non-existing runners
2022-07-15 00:49:15 +02:00
8e403ff65a
Poseidon: Use relative path to remove workspace directory
...
See #1088
2022-06-10 18:13:11 +02:00
5ecba6ef70
Persist TestrunMessages and store timestamp
...
So far, the Testrun messages are in addition to the Tesstrun.output column
2022-04-29 01:00:51 +02:00
4fc4b7ac35
Remove temporary fix for Poseidon#54
2021-12-16 23:15:27 +01:00
563e14a44a
Adapt dashboard to show idle and used runners
2021-12-07 00:08:31 +01:00
394385098d
Rescue Faraday::ConnectionFailed for Poseidon
2021-12-01 15:10:47 +01:00
5ef7da14be
Show release information for Poseidon
2021-11-25 20:09:46 +01:00
4cddcb6544
Fixes CODEOCEAN-68 with empty file
2021-11-18 13:37:32 +01:00
b07560bc7e
Poseidon: Read native file content if available
2021-11-17 19:36:06 +01:00
86c6ad7ea3
Poseidon: Use absolute path to remove workspace directory
2021-11-17 17:44:09 +01:00
46e0bb73a7
Fix initial sync with Poseidon
2021-11-10 08:56:33 +01:00
054d35b8d3
Add environments method to all strategies
2021-11-04 20:09:19 +01:00
ecf470bddd
Refactor sync_environment methods
...
* Add delete_environment method
* Change return value to allow raising an exception
2021-11-04 20:06:40 +01:00
d16917261b
Prevent inactivityTimeout from being smaller than permitted_execution_time
2021-11-01 17:13:14 +01:00
dfdec92c6e
Use ping option only for DCP WebSocket
...
* The Faye::WebSocket library will "buffer" some output of the connection and emit the `on :message` events in the order of the messages. However, when a ping is sent while the connection has already been closed, it will emit the `on :close` event immediately and drop all other messages (in that "buffer"). This is problematic for very short running executions that generate a long output (as this will be cut off without a proper exit message sent by Poseidon).
2021-11-01 17:13:11 +01:00
9d833e37b3
Use Net::HTTP::Persistent for requests to Poseidon
2021-11-01 17:13:09 +01:00
6d1b388e3c
Reorder methods in strategy classes
2021-11-01 17:13:07 +01:00
e33af5760d
Delegate initialization to Runner::Strategy
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
87c5302336
Switch logging to milliseconds and add more details
...
* By design, most logging happens in an `ensure` block. This ensures that no return value is modified unexpectedly.
2021-11-01 17:13:06 +01:00
696cd6a236
Poseidon: Clean workspace between executions
2021-11-01 17:13:03 +01:00
a6a477e361
Move error handling to else branch in execute_command
2021-11-01 17:13:03 +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
58e923abd8
Add custom websocket header to strategy class
2021-11-01 17:12:59 +01:00
cc98dc2229
Split WebSocket event in multiple lines before processing
2021-11-01 17:12:58 +01:00
b51a45e9b1
Add token header option for requests to Poseidon
2021-11-01 17:12:57 +01:00
44395b7792
Add ca file option for requests to Poseidon
2021-11-01 17:12:56 +01:00
30603cb7ab
Generalize method and constant names for runner management
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
2dff81a510
Attach duration information to the exception object
2021-11-01 17:12:52 +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
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
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