d5b274c9f2
Introduce new error types for runners
...
The errors are raised in the runner model and in the runner connection
class. In the submission controller the errors are rescued and,
depending on the error, the status timeout / container depleted is
sent to the client.
2021-11-01 17:12:48 +01:00
90fac7b94c
Copy execution environment to Poseidon on create and update
...
When creating or updating an execution environment, an API call to
Poseidon is made with the necessary information to create the
corresponding Nomad job.
If runner management is configured, his will display a warning
(currently in the same color as if it were a success) in the UI, if the
API call fails. The environment is saved even if it fails.
If runner management is not configured, this warning will not be created.
2021-11-01 17:12:48 +01:00
b762c73ddd
Update usage of Poseidon API to newest API version (0.2.2)
...
copy file, create and execute command had to be adapted.
2021-11-01 17:12:47 +01:00
8d968e01e6
Move RunnerConnection into class Runner
...
The old approach was to require the runner connection. This did
not work anymore with Zeitwerk in Rails 6. @sebastian.serth and I
moved the Connection class in `lib` into the ActiveRecord class
`Runner`. This will also work with future changes like specific
error classes. Furthermore the config was fixed and simplified.
Co-authored-by: Sebastian Serth <Sebastian.Serth@hpi.de >
2021-11-01 17:12:47 +01:00
63d997a7e3
Fix Rubocop offenses after Rubocop was reconfigured
2021-11-01 17:12:47 +01:00
fc6aa12b0a
Remove handling of runner timeouts
2021-11-01 17:12:47 +01:00
286a3f394d
Fix autocorrectable rubocop offences and implement suggestions
2021-11-01 17:12:46 +01:00
b29bc5e70f
Apply 3 suggestion(s) to 3 file(s)
2021-11-01 17:12:46 +01:00
17bd2d8726
Reuse runners per user and execution environment
...
Co-authored-by: Jan-Eric Hellenberg <jan-eric.hellenberg@student.hpi.uni-potsdam.de >
Co-authored-by: Maximilian Pass <maximilian.pass@student.hpi.uni-potsdam.de >
2021-11-01 17:12:46 +01:00
2404c1c36c
Rename variables from container to runner
2021-11-01 17:12:45 +01:00
3e6534567d
Move copy_submission_files from runner to submission
2021-11-01 17:12:45 +01:00
575057acd3
Fix some non-autocorrectable linting issues
...
Many functions in submission_controller.rb still are very long and have
a high complexity. Because the logic for handling execution of
submissions will probably move elsewhere (when switching to
ActionCable), this is fine for now.
2021-11-01 17:12:45 +01:00
80932c0c40
Auto-correct linting issues
2021-11-01 17:12:45 +01:00
cf1e4d6edf
Rename API routes
2021-11-01 17:12:44 +01:00
28f8de1a93
Implement workaroud for double render error
...
Co-authored-by: Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de >
2021-11-01 17:12:44 +01:00
347e4728a0
Rework protocol inside websocket
...
Co-authored-by Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de >
2021-11-01 17:12:44 +01:00
6a4e302f4e
Fix socket handling and add configuration option
...
Co-authored-by: Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de >
2021-11-01 17:12:43 +01:00
92b249e7b3
Reimplement scoring and create connection abstraction
...
Co-authored-by: Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de >
2021-11-01 17:12:43 +01:00
1546f70818
Begin to refactor websocket handling and implement test
...
Co-authored-by: Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de >
2021-11-01 17:12:43 +01:00
3cf70a33d8
Integrate new API with websocket (run only)
...
Co-authored-by: Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de >
2021-11-01 17:12:43 +01:00
2e2cd1855e
Add Container abstration with new API calls and adapt running a submission
...
Co-authored-by: Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de >
2021-11-01 17:12:43 +01:00
f9a7e73719
Remove usage of safe_html in renderings
2021-10-12 11:23:22 +02:00
bb4b4ece92
Add ping/pong health check
2021-10-09 23:37:31 +02:00
6a255ced5b
Exclude content attribute of files to be trimmed
2021-10-08 19:30:55 +02:00
9374334bef
Fix memoization for exercise_params
2021-10-08 19:30:55 +02:00
ccf2f1f5fd
Memoize @exercise_params
2021-10-08 19:30:54 +02:00
6321b2edef
trim whitespace from beginning and end of string attributes
2021-10-08 19:30:54 +02:00
74e285e9fd
Fix rubocop offenses
2021-10-05 12:09:56 +02:00
858ccd128f
Add callback handler for clear command during execution
2021-08-29 14:56:59 +02:00
47888f1dbd
Always use ActionController::Base.helpers to sanitize Markdown
...
Co-authored-by: Sebastian Serth <Sebastian.Serth@hpi.de >
2021-08-05 23:17:06 +02:00
a170f7bfc2
Throw exception on any error within Concurrent::Future
...
Co-authored-by: Sebastian Serth <Sebastian.Serth@hpi.de >
2021-08-05 23:17:06 +02:00
3840b45f8a
Revert "Revert "Use switch_locale instead of I18n.with_locale directly""
...
This reverts commit 2c08e270e7
.
Co-authored-by: Sebastian Serth <Sebastian.Serth@hpi.de >
2021-08-05 23:17:06 +02:00
2c08e270e7
Revert "Use switch_locale instead of I18n.with_locale directly"
...
This reverts commit 125c342f35
.
2021-08-05 11:55:54 +02:00
9751d5a5a1
Update render_markdown to work without html_safe
2021-07-29 00:12:18 +02:00
125c342f35
Use switch_locale instead of I18n.with_locale directly
2021-07-26 12:01:25 +02:00
448b5e4a7a
Use current_locale for "not_graded" hint
2021-07-22 10:23:57 +02:00
671c2bd28b
Allow changes to internal user when password is void
2021-07-12 13:27:41 +02:00
4926b33a5f
Introduce new config option for JS-based Sentry
...
* Also update environment_variables.md
2021-07-08 20:15:29 +02:00
d5d58e5f1b
Merge branch 'misc'
2021-07-07 21:05:54 +02:00
d7eb562389
Prevent underscores from being removed during command substitution
2021-07-07 20:42:59 +02:00
72e4026d6c
Ensure that the current docker image is listed when editing an execution environment
2021-07-07 20:19:45 +02:00
038ffd4afb
Fix alternative_input toggle text
2021-07-07 20:19:44 +02:00
237c225732
Add support for running CodeOcean under a subpath
...
* Also refactor (JavaScript) routes
2021-07-06 19:33:55 +02:00
7914608efe
Add js-routes to use Route helpers in JavaScript
2021-07-06 16:54:27 +02:00
9696fcb06f
Remove unnecessary require for zip download
2021-07-06 09:27:44 +02:00
110f1a5750
Fix rubocop offenses after bundle update
2021-06-30 09:13:25 +02:00
7010614a75
Re-enable translation of linter messages
2021-06-28 22:11:00 +02:00
d08707f62e
Fix switch_locale to return the block result
2021-06-28 16:08:24 +02:00
4e8033f5d4
Show CO and DCP versions on admin dashboard
2021-06-25 21:57:17 +02:00
1b71163a77
Refactor locale with around method
2021-06-25 17:36:56 +02:00