Commit Graph

79 Commits

Author SHA1 Message Date
Sebastian Serth
0dd931fba1 Add runner management health check for /ping
Even though we can check the health of the runner management, we would like to ensure an external health check validates the availability of all required services.
2023-03-13 22:54:14 +01:00
Sebastian Serth
fb9ab4cd61 DCP: Allow unused keyword arguments for Rubocop 2022-12-19 17:09:59 +01:00
Sebastian Serth
82bb0dd5d1 Return default for retrieve_files
Fixes CODEOCEAN-G7
2022-12-19 16:10:38 +01:00
Sebastian Serth
574e99eddd Fix rubocop offenses - Requires Ruby 3.1+ 2022-11-25 11:10:06 +01:00
Sebastian Serth
61c4d5a894 Provide default for retrieve_files method
Fixes CODEOCEAN-F4
2022-11-17 20:47:33 +01:00
Sebastian Serth
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
Sebastian Serth
9e7b3b7b58 Update keyword arguments for #retrieve_files 2022-10-29 18:49:18 +02:00
Sebastian Serth
60078701f5 Editor: Allow file retrieval after code run 2022-10-29 18:49:18 +02:00
Sebastian Serth
cb94bc3de6 Strategy: Allow privileged_execution: keyword even if not used 2022-10-05 19:19:12 +02:00
Sebastian Serth
a5da7d1f84 Remove outdated HTTP status codes
See https://github.com/openHPI/codeocean/pull/1349#pullrequestreview-1091652523
2022-10-05 13:11:43 +02:00
Sebastian Serth
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
Sebastian Serth
f53c6cb3ee Shell: Add toggle to execute command as root 2022-10-04 16:06:58 +02:00
Sebastian Serth
eb188dcd71 Add privilegedExecution flag to database and Poseidon Strategy 2022-09-24 22:32:41 +02:00
Sebastian Serth
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
Sebastian Serth
56eab88f88 Gracefully handle the deletion of non-existing runners 2022-07-15 00:49:15 +02:00
Sebastian Serth
8e403ff65a Poseidon: Use relative path to remove workspace directory
See #1088
2022-06-10 18:13:11 +02:00
Sebastian Serth
b613267add Remove legacy DockerClient 2022-06-08 13:18:37 +02:00
Sebastian Serth
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
Sebastian Serth
5caace01b6 Add comment to DockerContainerPool strategy regarding filtering 2022-04-12 12:47:16 +02:00
Sebastian Serth
ea85519163 Update bundle (with newest rubocop version) and fix offenses 2022-01-04 09:42:37 +01:00
Sebastian Serth
4fc4b7ac35 Remove temporary fix for Poseidon#54 2021-12-16 23:15:27 +01:00
Sebastian Serth
563e14a44a Adapt dashboard to show idle and used runners 2021-12-07 00:08:31 +01:00
Sebastian Serth
a4003ca733 DCP: Redirect successful PyLint output to stdout 2021-12-06 22:12:16 +01:00
Sebastian Serth
394385098d Rescue Faraday::ConnectionFailed for Poseidon 2021-12-01 15:10:47 +01:00
Sebastian Serth
5ef7da14be Show release information for Poseidon 2021-11-25 20:09:46 +01:00
Sebastian Serth
4cddcb6544 Fixes CODEOCEAN-68 with empty file 2021-11-18 13:37:32 +01:00
Sebastian Serth
b07560bc7e Poseidon: Read native file content if available 2021-11-17 19:36:06 +01:00
Sebastian Serth
86c6ad7ea3 Poseidon: Use absolute path to remove workspace directory 2021-11-17 17:44:09 +01:00
Sebastian Serth
eb985bec9a DCP: Rescue Excon::Error::Socket 2021-11-15 15:09:43 +01:00
Sebastian Serth
46e0bb73a7 Fix initial sync with Poseidon 2021-11-10 08:56:33 +01:00
Sebastian Serth
3608856397 Merge pull request #1079 from openHPI/sync_execution_environments
Sync execution environments
2021-11-09 18:44:35 +01:00
Sebastian Serth
1dce6c59ab Add note about default ACL for Docker mount dir 2021-11-08 22:39:10 +01:00
Sebastian Serth
5401ebb54d Revert "DCP: previous_data match should be non-greedy"
This reverts commit 328055e6e8 due to dramatically slower processing.
2021-11-08 20:06:55 +01:00
Sebastian Serth
054d35b8d3 Add environments method to all strategies 2021-11-04 20:09:19 +01:00
Sebastian Serth
94170ea742 DCP: Improve error handling for destroy_at_management 2021-11-04 20:09:19 +01:00
Sebastian Serth
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
Sebastian Serth
328055e6e8 DCP: previous_data match should be non-greedy 2021-11-01 17:13:15 +01:00
Sebastian Serth
65fe1d902d DCP: Match java@hostname output 2021-11-01 17:13:15 +01:00
Sebastian Serth
d16917261b Prevent inactivityTimeout from being smaller than permitted_execution_time 2021-11-01 17:13:14 +01:00
Sebastian Serth
475aa8c512 DCP: Allow increasing the pool size when previously empty 2021-11-01 17:13:13 +01:00
Sebastian Serth
eaa06ee528 DCP: Prevent double deletion of runner 2021-11-01 17:13:13 +01:00
Sebastian Serth
6a902c41db DCP: Refactor container method and usage 2021-11-01 17:13:12 +01:00
Sebastian Serth
537d8bfc95 DCP: Add handling of inactivity timer 2021-11-01 17:13:12 +01:00
Sebastian Serth
dcafbb9d46 DCP: Change HTTP verbs 2021-11-01 17:13:12 +01:00
Sebastian Serth
6209e25ee2 DCP: Move pool location to code_ocean.yml 2021-11-01 17:13:12 +01:00
Sebastian Serth
7bb2ef8588 DCP: Forward data before matching stdout termination 2021-11-01 17:13:12 +01:00
Sebastian Serth
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
Sebastian Serth
4f1a7cde27 Add null strategy for runners
* This is the default strategy used when the runner management is disabled. It might be replaced with a generic Docker strategy in the future (without pooling). For now, it allows normal "operation" of CodeOcean without any runner management. However, as no runner system is configured, no command can be executed.
2021-11-01 17:13:10 +01:00
Sebastian Serth
01ec9343cf Remove usage of DockerClient 2021-11-01 17:13:10 +01:00
Sebastian Serth
b13a3b084d Use new available_images routes from DCP 2021-11-01 17:13:10 +01:00