Commit Graph

110 Commits

Author SHA1 Message Date
Maximilian Paß
b9c923da8a Remove unused and deprecated Storer interface. 2022-10-24 22:12:09 +01:00
Maximilian Paß
7119f3e012 Fix not canceling monitoring events for removed environments
and runners.
2022-10-24 13:15:14 +02:00
Maximilian Paß
3509109b6f Fix Ls2JsonWriter
by allowing more spaces in the ls response.
by sending the error response of the list file system route only when no content has been written.
2022-10-05 12:11:47 +01:00
Maximilian Paß
195f88177e Add Content-Length and Content-Disposition Header
for GetFileContent route.
2022-10-05 12:11:47 +01:00
Maximilian Paß
0c70ad3b24 Enable unprivileged retrieve of file listing and content. 2022-10-05 12:11:47 +01:00
Maximilian Paß
3469d0ce77 Specify http not found exit code
by replacing it with StatusGone (410) for a missing runner and StatusFailedDependency (424) for missing or not accessible files.
2022-10-05 12:11:47 +01:00
Maximilian Paß
fc77f11d4d Enquote file path for shell execution.
Also, fix json of 500 response.
2022-10-05 12:11:47 +01:00
Maximilian Paß
152b77afe5 Add listing of runners file system. 2022-10-05 12:11:47 +01:00
Maximilian Paß
f2b25566dd #136 Copy files back from Nomad runner. 2022-10-05 12:11:47 +01:00
Sebastian Serth
1a5a49d7c8 Explicitly switch user for code execution.
Co-authored-by: Maximilian Pass <maximilian.pass@student.hpi.uni-potsdam.de>
2022-09-24 23:09:23 +02:00
Maximilian Paß
549d147870 Fix missing environment id for monitoring data. 2022-08-31 08:49:07 +02:00
Maximilian Paß
1eef26cc83 Add environment id to periodical monitoring events. 2022-08-20 09:17:43 +02:00
Maximilian Paß
5590c50e14 #110 Add periodical monitoring events. 2022-08-19 20:48:46 +02:00
Maximilian Paß
9677253b35 Change Influx field name for the startup duration
due to a currently not resolvable type mismatch.
2022-08-10 20:46:17 +02:00
Maximilian Paß
89e15c5c2f Fix startup time format
Before it was a string. To use it efficiently we want it to be a number - in this case in nanoseconds.
2022-08-05 21:16:58 +02:00
Maximilian Paß
b287aa335d Monitor environment id also for deletions. 2022-08-05 21:16:58 +02:00
Maximilian Paß
c6e65c14bb Monitor Nomad allocation startup duration. 2022-07-31 19:42:35 +02:00
Maximilian Paß
18daa1152c Save the environment id for runner monitoring. 2022-07-31 19:42:35 +02:00
Maximilian Paß
49c7a2d405 Save the runner and environment id for executions monitoring. 2022-07-31 19:42:35 +02:00
Maximilian Paß
498e8f5ff5 #110 Refactor influxdb monitoring
to use it as singleton.
This enables the possibility to monitor processes that are independent of an incoming request.
2022-07-01 15:29:31 +02:00
Maximilian Paß
34040162c2 #89 Generalise the three Storage interfaces and structs into one generic storage manager. 2022-06-29 16:21:19 +02:00
Maximilian Paß
eecacc08bf #42 Allow deletion of ./* 2022-06-10 18:21:06 +02:00
Maximilian Paß
59ca63268b Add CODEOCEAN environment variable. 2022-06-10 18:10:28 +02:00
Maximilian Paß
903ad415c6 Set and unset aws environment variables
in order to provide the CodeOcean context for some scripts and hide AWS credentials from the users.
2022-06-10 18:10:28 +02:00
Maximilian Paß
795c83f7b2 Fix deleting non existent environments
that is an error caused by throwing a panic when an environment is not found and a nonexistent runner manager at the end of the chain is asked for it.
2022-06-07 15:54:48 +02:00
Maximilian Paß
430b1748f5 Allow the CR character as part of a newline.
Since CodeOcean may send the `\r\n` newline.
2022-04-18 22:29:05 +02:00
Maximilian Paß
eabe3a1b27 Add the Environment ID to the influxdb data.
Also move the interface of an execution environment into its own file, execution_environment.go.
2022-04-18 13:17:49 +02:00
Maximilian Paß
b7a20e3114 Introduce method "Environment" to the Runners interface.
This way we can relate to which environment a runner belongs.
2022-04-18 13:17:49 +02:00
Maximilian Paß
3570f18202 Apply suggestions from code review
Co-authored-by: Sebastian Serth <MrSerth@users.noreply.github.com>
2022-04-09 16:35:53 +02:00
Maximilian Paß
136f596dc2 Add aws environments to the statistics
but only with the field usedRunners.
2022-04-09 16:35:53 +02:00
Maximilian Paß
2cf890ab91 Implement review comments 2022-02-28 14:54:40 +01:00
Maximilian Paß
df68461264 Sanitize user input in logs. 2022-02-28 14:54:40 +01:00
Maximilian Paß
4ffbb712ed Parametrize e2e tests to also check AWS environments.
- Fix destroy runner after timeout.
- Add file deletion
2022-02-28 14:54:40 +01:00
Maximilian Paß
d603a8ebb0 Refactor static AWS functions
from a magic number in the code to a configurable list in configuration.yaml
2022-02-28 14:54:40 +01:00
Maximilian Paß
f6d9a6ddbb Add unit tests 2022-02-28 14:54:40 +01:00
Maximilian Paß
6123d20525 Implement core functionality of AWS integration 2022-02-28 14:54:40 +01:00
Maximilian Paß
dd41e0d5c4 Generate structures for an AWS environment and runner 2022-02-28 14:54:40 +01:00
Maximilian Paß
0ef5a4e39f Make Execution Environment interface Nomad independent 2022-02-28 14:54:40 +01:00
Maximilian Paß
ba43f667c2 Add architecture for multiple managers
using the chain of responsibility pattern.
2022-02-28 14:54:40 +01:00
Maximilian Paß
d57a0c07b8 Implement review suggestions 2021-12-22 17:30:16 +01:00
Maximilian Paß
0571b10b5c Recreate runners on execution environment update
Solves #69 and #48
2021-12-22 17:30:16 +01:00
Maximilian Paß
f3929cbf50 Fix webSocket error
that was introduced by closing the WebSocket connection without stopping the inputLoop.
2021-12-16 15:05:47 +01:00
Maximilian Paß
feefe2c1ed Fix third goroutine leak and refactor proxy cancellation.
Fix goroutine leak in the Read function of the codeOceanToRawReader: Blocking Select statement.
2021-12-14 13:24:53 +01:00
Maximilian Paß
d684366a4d Add debug statements for TestSendsSignalAfterTimeout 2021-12-12 10:27:03 +01:00
Maximilian Paß
1de559cebc Add statistics route for execution environments
* Add statistics route for execution environments

* Add maximum to port api definition

Co-authored-by: Sebastian Serth <MrSerth@users.noreply.github.com>
2021-12-08 12:08:22 +01:00
Maximilian Paß
a6eaa45097 Stop stdout & stderr after timeout
Co-authored-by: Sebastian Serth <MrSerth@users.noreply.github.com>
2021-11-25 21:08:56 +01:00
Maximilian Paß
fbbc96da37 Add guard close in event stream
for not handling stopped Execution Environment Allocations
2021-11-17 13:16:18 +01:00
Maximilian Paß
dcc869cd94 Fix after updating golangci-lint
v1.43
2021-11-10 13:11:38 +01:00
Maximilian Paß
fff67246d6 Infinite busy waiting for lost event (#31)
* Close evaluation stream for Nomad Job creation
 when set event handler have been finished

* Remove evaluation event stream requests
by handling the events via the main Nomad event handler.
2021-11-10 09:57:40 +01:00
Maximilian Paß
4db1ceb41e Fix Bug with the runner recovery
that the runners of the environment 10 are also recovered for the environment 1.
2021-10-22 16:24:55 +02:00