Sebastian Serth
c75f52f2c8
Fix Rubocop offenses
2022-10-24 12:28:50 +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
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
cb0f30768f
Change HTTP links to HTTPS
2022-08-17 01:29:27 +02:00
Sebastian Serth
a9039a8019
Prevent false positive for raised error
2022-08-09 11:42:06 +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
d9f40531fb
Fix Rubocop offenses
2022-04-20 18:26:53 +02:00
Sebastian Serth
ea85519163
Update bundle (with newest rubocop version) and fix offenses
2022-01-04 09:42:37 +01:00
Sebastian Serth
86c6ad7ea3
Poseidon: Use absolute path to remove workspace directory
2021-11-17 17:44:09 +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
b179dadce6
Mock CodeOcean::Config for Poseidon strategy
2021-11-04 20:09:20 +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
dcafbb9d46
DCP: Change HTTP verbs
2021-11-01 17:13:12 +01:00
Sebastian Serth
9d833e37b3
Use Net::HTTP::Persistent for requests to Poseidon
2021-11-01 17:13:09 +01:00
Sebastian Serth
68c8f1dbdf
DCP: Set sticky bit for folder and secure delete
2021-11-01 17:13:04 +01:00
Sebastian Serth
696cd6a236
Poseidon: Clean workspace between executions
2021-11-01 17:13:03 +01:00
Sebastian Serth
3fa6ba6c72
Use instance_double for Poseidon Strategy specs
2021-11-01 17:12:57 +01:00
Sebastian Serth
ee1751debf
Fix rubocop offenses
2021-11-01 17:12:55 +01:00
Sebastian Serth
30603cb7ab
Generalize method and constant names for runner management
2021-11-01 17:12:53 +01:00
Felix Auringer
c8e1a0bbcb
Fix tests for Runner#attach_to_execution
...
These tests were blocking because of the newly introduced
EventLoop. The messages sent to the EventLoop are now mocked
and the EventLoop isn't blocking anymore in the tests.
2021-11-01 17:12:53 +01:00
Felix Auringer
2dff81a510
Attach duration information to the exception object
2021-11-01 17:12:52 +01:00
Felix Auringer
cc412b73bc
Introduce more error types
2021-11-01 17:12:51 +01:00
Felix Auringer
db2d1e3164
Add tests for DockerContainerPool strategy
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
1d3f0d7ad8
Handle Faraday errors
2021-11-01 17:12:50 +01:00
Felix Auringer
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
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