Commit Graph

91 Commits

Author SHA1 Message Date
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
7f47af99cb Fix order-dependent specs 2021-11-04 19:15:33 +01:00
Sebastian Serth
dcafbb9d46 DCP: Change HTTP verbs 2021-11-01 17:13:12 +01:00
Sebastian Serth
01ec9343cf Remove usage of DockerClient 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
c1cff29147 [Spec] Initialize environment for Docker testing 2021-11-01 17:13:08 +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
06ef4430f5 Change exposed_ports to array 2021-11-01 17:13:02 +01:00
Sebastian Serth
601e1fab5c Remove all occurrences of server-sent events 2021-11-01 17:12:57 +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
Sebastian Serth
08d7b89108 Merge pull request #930 from openHPI/own-project
Rebrush action sidebar for implement view
2021-06-01 17:38:55 +02:00
Sebastian Serth
f32661ad78 Rework left sidebar
* Move Buttons from left sidebar to JSTree
* Use light style for collapse sidebar buttons
2021-05-28 17:49:59 +02:00
Sebastian Serth
5243808d54 Apply automatic rubocop fixes 2021-05-17 19:40:38 +02:00
Sebastian Serth
da0a682ffb Apply manual rubocop fixes 2021-05-14 22:03:06 +02:00
Sebastian Serth
6cbecb5b39 Apply automatic rubocop fixes 2021-05-14 22:03:06 +02:00
Sebastian Serth
8378070bc2 Upgrade to Rails 6.0 and apply new framework defaults 2021-05-12 16:47:05 +02:00
Sebastian Serth
be3ec82bd4 Add new file role teacher_defined_linter 2020-10-15 00:43:57 +02:00
Sebastian Serth
fae60a21e5 Sync DockerClient with DockerContainerPool
Fix failing specs after upgrade
2020-09-28 16:53:15 +02:00
Sebastian Serth
df8ea4045c Fix spec 2020-05-12 18:20:29 +02:00
Sebastian Serth
31500bf297 Fix final failing spec 2020-04-14 15:32:05 +02:00
Sebastian Serth
28d40605c8 Fix specs 2020-04-14 15:20:15 +02:00
Sebastian Serth
efacb5a6a9 Completely remove old hints connected to the execution environment 2018-11-28 01:21:13 +01:00
Sebastian Serth
ac31afbd2a Clean Gemfile and perform bundle update
Signed-off-by: Sebastian Serth <Sebastian.Serth@student.hpi.de>
2018-11-06 16:45:59 +01:00
Sebastian Serth
1f56f8fb78 Always create workspace path dir for DockerClient specs 2018-02-22 17:19:54 +01:00
Sebastian Serth
eb4e620775 Allow folders to be created during DockerClient Spec 2018-02-22 17:19:54 +01:00
Sebastian Serth
2a38db6e75 Move workspace path to subdir of /tmp to prevent deleting other files 2018-02-22 17:19:53 +01:00
Ralf Teusner
fc873cb053 second run of replacement regex from https://github.com/thoughtbot/factory_bot/blob/4-9-0-stable/UPGRADE_FROM_FACTORY_GIRL.md ...
Nested calls seem to be fun..
2017-11-15 15:37:42 +01:00
Ralf Teusner
0e26ab98c8 rename factory_girl_(rails) to factory_bot_(rails) 2017-11-15 15:18:07 +01:00
Tom Staubitz
5fe12bfa78 fixing tests p1 2017-01-12 18:12:36 +01:00
Ralf Teusner
3842509275 removed comments that had no value for me. 2016-11-11 16:44:55 +01:00
yqbk
c937a1a9ef clean pull request 2016-10-24 23:02:44 +02:00
yqbk
46cdbc3b4b change workspace path to /tmp 2016-10-16 17:28:57 +02:00
yqbk
043ece68f4 enable container tests 2016-10-16 16:55:24 +02:00