Previously, the same runner could be used multiple times with different submissions simultaneously. This, however, yielded errors, for example when one submission time oud (causing the running to be deleted) while another submission was still executed.
Admin actions, such as the shell, can be still executed regardless of any other code execution.
Fixes CODEOCEAN-HG
FixesopenHPI/poseidon#423
Also align how we use query Postgres from controllers.
The change is mainly due to regular (but not reproducible) issues with the `intervalstyle` defaulting to `postgres` (instead of `iso8601`) and thereby causing issues. We're just experimenting to see whether this change resolves the issue.
This adds a button to the execution environment index page that, when
clicked, causes all execution environments to be synchronized to the
runner management (Poseidon) by creating or replacing them.
CodeOcean does not synchronize it's execution environments on startup or
when a new runner management configuration is used for the first time.
The administrator has to manually start this process by pressing this
button.
The equivalent for syncing just one execution environment is updating
it.
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.