Commit Graph

102 Commits

Author SHA1 Message Date
195f88177e Add Content-Length and Content-Disposition Header
for GetFileContent route.
2022-10-05 12:11:47 +01:00
0c70ad3b24 Enable unprivileged retrieve of file listing and content. 2022-10-05 12:11:47 +01:00
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
fc77f11d4d Enquote file path for shell execution.
Also, fix json of 500 response.
2022-10-05 12:11:47 +01:00
152b77afe5 Add listing of runners file system. 2022-10-05 12:11:47 +01:00
c7ee7c1e25 Remove superfluous response.WriteHeader call
as the Write of the responseWriter automatically sends also the Header.
2022-10-05 12:11:47 +01:00
f2b25566dd #136 Copy files back from Nomad runner. 2022-10-05 12:11:47 +01:00
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
7454e577e4 Allow using a local Docker image, e.g., for tests 2022-09-24 23:09:23 +02:00
d372e37d1a Add cni/secure-bridge to isolate host network 2022-09-18 19:02:04 +02:00
ce14c116be Remove deprecated (and ignored) server option 2022-09-18 18:41:59 +02:00
89fc7b2637 Fix Nomad event stream is ignoring errors
when an event stream could be established once.
2022-09-07 21:16:20 +02:00
549d147870 Fix missing environment id for monitoring data. 2022-08-31 08:49:07 +02:00
1eef26cc83 Add environment id to periodical monitoring events. 2022-08-20 09:17:43 +02:00
5590c50e14 #110 Add periodical monitoring events. 2022-08-19 20:48:46 +02:00
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
021530d5a7 Apply GoFmt fixes 2022-08-10 19:34:05 +02:00
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
b287aa335d Monitor environment id also for deletions. 2022-08-05 21:16:58 +02:00
d10b31a1fb Remove static (nil) return value. 2022-08-01 11:24:56 +02:00
c6e65c14bb Monitor Nomad allocation startup duration. 2022-07-31 19:42:35 +02:00
18daa1152c Save the environment id for runner monitoring. 2022-07-31 19:42:35 +02:00
49c7a2d405 Save the runner and environment id for executions monitoring. 2022-07-31 19:42:35 +02:00
39cfdbf635 Apply suggestions from code review 2022-07-01 15:29:31 +02:00
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
34040162c2 #89 Generalise the three Storage interfaces and structs into one generic storage manager. 2022-06-29 16:21:19 +02:00
203d5a3a4f #155 refactor and synchronise writing to CodeOcean. (#174)
* #155 refactor and synchronise writing to CodeOcean.

* Reduce complexity of input parsing.

* Update typo in internal/api/ws/codeocean_writer.go

Co-authored-by: Sebastian Serth <MrSerth@users.noreply.github.com>
2022-06-26 20:19:23 +02:00
a4d13fb8cb #148 Add stage to influx monitoring. 2022-06-21 15:31:29 +02:00
3afe8ddb66 #155 Enable stopping of the CodeOcean WebSocket read independently of writing to CodeOcean. 2022-06-21 12:13:33 +02:00
3d1ed7cb0f #155 Minimise timing issues with websocket close. 2022-06-21 12:13:33 +02:00
79dc3a94da #155 Add log statement for further investigations (#164) 2022-06-12 11:10:57 +02:00
eecacc08bf #42 Allow deletion of ./* 2022-06-10 18:21:06 +02:00
59ca63268b Add CODEOCEAN environment variable. 2022-06-10 18:10:28 +02:00
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
ecce3c294f #155 Add log statement for further investigations 2022-06-09 22:34:43 +02:00
0f8a1fa25a Specify AWS Functions as list
to conform with the yaml standard of list definition.
2022-06-08 09:01:46 +02:00
1e59c1146e Fix CodeQL log injection warning
by removing newlines from logged user input.
2022-06-07 17:21:05 +02:00
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
358769eb6b Fix golangci lint. 2022-05-24 22:12:48 +02:00
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
25f92e5f94 Add environment specific data to the influxdb data. 2022-04-18 13:17:49 +02:00
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
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
8feffdae3a Add initial structure of influxdb monitoring. 2022-04-18 13:17:49 +02:00
e4ebb5b384 Add trace statements for WebSocket messages
* With `logger.level: TRACE`, the content of WebSocket messages is logged
  together with the corresponding timestamp.
* The input is not further sanitized as this log level
  is not intended for production use.
2022-04-15 12:39:03 +02:00
3570f18202 Apply suggestions from code review
Co-authored-by: Sebastian Serth <MrSerth@users.noreply.github.com>
2022-04-09 16:35:53 +02:00
136f596dc2 Add aws environments to the statistics
but only with the field usedRunners.
2022-04-09 16:35:53 +02:00
a41659eed4 Enable memory oversubscription (#102)
* Enable memory oversubscription

* Fix and add e2e test
2022-03-18 08:31:27 +01:00
2cf890ab91 Implement review comments 2022-02-28 14:54:40 +01:00
df68461264 Sanitize user input in logs. 2022-02-28 14:54:40 +01:00