Commit Graph

27 Commits

Author SHA1 Message Date
574e99eddd Fix rubocop offenses - Requires Ruby 3.1+ 2022-11-25 11:10:06 +01:00
c75f52f2c8 Fix Rubocop offenses 2022-10-24 12:28:50 +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
eb188dcd71 Add privilegedExecution flag to database and Poseidon Strategy 2022-09-24 22:32:41 +02:00
a9039a8019 Prevent false positive for raised error 2022-08-09 11:42:06 +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
d9f40531fb Fix Rubocop offenses 2022-04-20 18:26:53 +02:00
ea85519163 Update bundle (with newest rubocop version) and fix offenses 2022-01-04 09:42:37 +01:00
86c6ad7ea3 Poseidon: Use absolute path to remove workspace directory 2021-11-17 17:44:09 +01:00
b179dadce6 Mock CodeOcean::Config for Poseidon strategy 2021-11-04 20:09:20 +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
9d833e37b3 Use Net::HTTP::Persistent for requests to Poseidon 2021-11-01 17:13:09 +01:00
696cd6a236 Poseidon: Clean workspace between executions 2021-11-01 17:13:03 +01:00
3fa6ba6c72 Use instance_double for Poseidon Strategy specs 2021-11-01 17:12:57 +01:00
ee1751debf Fix rubocop offenses 2021-11-01 17:12:55 +01:00
30603cb7ab Generalize method and constant names for runner management 2021-11-01 17:12:53 +01:00
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
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
db2d1e3164 Add tests for DockerContainerPool strategy 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
1d3f0d7ad8 Handle Faraday errors 2021-11-01 17:12:50 +01:00
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
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