Commit Graph

438 Commits

Author SHA1 Message Date
Sebastian Serth
9058ce00db Add A/B/n test for interventions 2021-11-23 01:38:10 +01:00
Sebastian Serth
c90e02e4f1 Fixes CODEOCEAN-5J with error during WebSocket handshake 2021-11-18 14:04:23 +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
e34656eb0f Modify buffer line breaking behavior
* This is based on Sentry issue CODEOCEAN-5W (linter translation failing due to \r in output)
* We cannot keep all "\r" messages but we must not forward the "\r" if it is a single message received after a valid JSON
2021-11-15 00:30:32 +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
7d032e5c0d Buffer: Prevent replacement of "\r" message 2021-11-08 23:33:37 +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
9a541998e4 Optimize RegEx 2021-11-06 02:15:03 +01:00
Sebastian Serth
59d2a8ecdb Junit5: Specify line to search for assertion error 2021-11-06 00:03:45 +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
7bda3f1950 JUnit 4: Allow "exit" at the end of tests 2021-11-02 22:42:38 +01:00
Sebastian Serth
e37683a1b2 Fix linting issue for PyLint adapter 2021-11-02 15:53:49 +01:00
Sebastian Serth
3d3478d859 Test Adapters: Always use the last output for score runs
* This prevents learners from cheating by printing the required status line themselves
2021-11-02 15:52:49 +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
6ff14d6fc7 Connection Buffer: Replace \r in run and score output with \n 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
570809bfe9 Allow whitespace for JSON exit 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
20064b0715 DockerClient: Cleanup usage of config 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
Sebastian Serth
2551ea709b Remove 'previous' DockerContainerPool implementation 2021-11-01 17:13:09 +01:00
Sebastian Serth
9d833e37b3 Use Net::HTTP::Persistent for requests to Poseidon 2021-11-01 17:13:09 +01:00
Sebastian Serth
ada438b230 Add release and pool_size methods to DCP 2021-11-01 17:13:07 +01:00
Sebastian Serth
6d1b388e3c Reorder methods in strategy classes 2021-11-01 17:13:07 +01:00
Sebastian Serth
e33af5760d Delegate initialization to Runner::Strategy 2021-11-01 17:13:07 +01:00
Sebastian Serth
2b98905acb Remove usage of DockerClient from execution_environments_controller.rb 2021-11-01 17:13:07 +01:00
Sebastian Serth
0db6f20933 Move MemoryLimit to Execution Environment 2021-11-01 17:13:06 +01:00
Sebastian Serth
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
Sebastian Serth
e272fcd19c Add more comments and error logging to connection.rb 2021-11-01 17:13:04 +01:00
Sebastian Serth
e95ad5e26c Add @!attribute comments to connection.rb 2021-11-01 17:13:04 +01:00
Sebastian Serth
2ad4eb7625 DCP: Escape command for RegEx 2021-11-01 17:13:04 +01:00
Sebastian Serth
68c8f1dbdf DCP: Set sticky bit for folder and secure delete 2021-11-01 17:13:04 +01:00
Sebastian Serth
04c896c7de DCP: Listen for Python exit handler 2021-11-01 17:13:03 +01:00