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
Felix Auringer
cf58be97ee
Fix 17 previously failing specs
2021-11-01 17:12:49 +01:00
Konrad Hanff
0280c0282e
Add tests for synchronizing all execution environments
...
This adds policy tests to ensure only an admin can synchronize all
execution environments. It also adds controller tests that check that
all execution environments get synchronized.
2021-11-01 17:12:49 +01:00
Konrad Hanff
598de3bcff
Add button to synchronize all execution environments
...
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.
2021-11-01 17:12:49 +01:00
Felix Auringer
0978a3be83
Add tests for the different runner errors
2021-11-01 17:12:48 +01:00
Felix Auringer
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
Konrad Hanff
5e913c8a1a
Skip failing tests
...
17 tests are always failing, due to changes introduced when adding the
Runner abstraction. To know only these fail, they now get skipped in
order to make it apparent if tests that should not fail do fail in the
pipeline.
2021-11-01 17:12:48 +01:00
Konrad Hanff
d22d24df4d
Add tests for execution environment copy to Poseidon
2021-11-01 17:12:48 +01:00
Konrad Hanff
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
Felix Auringer
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
Felix Auringer
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
Felix Auringer
63d997a7e3
Fix Rubocop offenses after Rubocop was reconfigured
2021-11-01 17:12:47 +01:00
Felix Auringer
fc6aa12b0a
Remove handling of runner timeouts
2021-11-01 17:12:47 +01:00
Felix Auringer
7ff65135b5
Add runner management configuration to ci
2021-11-01 17:12:46 +01:00
Konrad Hanff
286a3f394d
Fix autocorrectable rubocop offences and implement suggestions
2021-11-01 17:12:46 +01:00
Konrad Hanff
b29bc5e70f
Apply 3 suggestion(s) to 3 file(s)
2021-11-01 17:12:46 +01:00
Konrad Hanff
c14cf99a96
Don't cleanup runners during precompile
2021-11-01 17:12:46 +01:00
Konrad Hanff
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
Konrad Hanff
3017e46006
Add newline to end of json schema
2021-11-01 17:12:45 +01:00
Konrad Hanff
2404c1c36c
Rename variables from container to runner
2021-11-01 17:12:45 +01:00
Konrad Hanff
3e6534567d
Move copy_submission_files from runner to submission
2021-11-01 17:12:45 +01:00
Konrad Hanff
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
Konrad Hanff
80932c0c40
Auto-correct linting issues
2021-11-01 17:12:45 +01:00
Konrad Hanff
6e9562c9e1
Validate json
2021-11-01 17:12:44 +01:00
Konrad Hanff
cf1e4d6edf
Rename API routes
2021-11-01 17:12:44 +01:00
Konrad Hanff
c36ec447ff
Fix faulty API data format
2021-11-01 17:12:44 +01:00
Konrad Hanff
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
Konrad Hanff
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
Konrad Hanff
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
Konrad Hanff
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
Konrad Hanff
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
Konrad Hanff
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
Konrad Hanff
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
Sebastian Serth
78893ba1a5
Merge pull request #1075 from openHPI/dependabot/bundler/rubocop-performance-1.12.0
...
Bump rubocop-performance from 1.11.5 to 1.12.0
2021-11-01 14:22:59 +01:00
dependabot[bot]
66955e1f25
Bump rubocop-performance from 1.11.5 to 1.12.0
...
Bumps [rubocop-performance](https://github.com/rubocop/rubocop-performance ) from 1.11.5 to 1.12.0.
- [Release notes](https://github.com/rubocop/rubocop-performance/releases )
- [Changelog](https://github.com/rubocop/rubocop-performance/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop/rubocop-performance/compare/v1.11.5...v1.12.0 )
---
updated-dependencies:
- dependency-name: rubocop-performance
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-11-01 03:01:24 +00:00
Sebastian Serth
95cddd3039
Merge pull request #1072 from openHPI/dependabot/bundler/newrelic_rpm-8.1.0
...
Bump newrelic_rpm from 8.0.0 to 8.1.0
2021-10-30 12:33:51 +02:00
dependabot[bot]
c28af6220e
Merge pull request #1074 from openHPI/dependabot/npm_and_yarn/bootstrap-4.6.1
2021-10-29 03:10:46 +00:00
dependabot[bot]
5e78d4419f
Bump bootstrap from 4.6.0 to 4.6.1
...
Bumps [bootstrap](https://github.com/twbs/bootstrap ) from 4.6.0 to 4.6.1.
- [Release notes](https://github.com/twbs/bootstrap/releases )
- [Commits](https://github.com/twbs/bootstrap/compare/v4.6.0...v4.6.1 )
---
updated-dependencies:
- dependency-name: bootstrap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-10-29 03:02:59 +00:00
dependabot[bot]
a54ef45624
Merge pull request #1071 from openHPI/dependabot/bundler/rubocop-1.22.3
2021-10-28 03:08:49 +00:00
dependabot[bot]
07faa89d18
Bump newrelic_rpm from 8.0.0 to 8.1.0
...
Bumps [newrelic_rpm](https://github.com/newrelic/newrelic-ruby-agent ) from 8.0.0 to 8.1.0.
- [Release notes](https://github.com/newrelic/newrelic-ruby-agent/releases )
- [Changelog](https://github.com/newrelic/newrelic-ruby-agent/blob/dev/CHANGELOG.md )
- [Commits](https://github.com/newrelic/newrelic-ruby-agent/compare/8.0.0...8.1.0 )
---
updated-dependencies:
- dependency-name: newrelic_rpm
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-10-28 03:01:19 +00:00
dependabot[bot]
588898fc88
Bump rubocop from 1.22.2 to 1.22.3
...
Bumps [rubocop](https://github.com/rubocop/rubocop ) from 1.22.2 to 1.22.3.
- [Release notes](https://github.com/rubocop/rubocop/releases )
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop/rubocop/compare/v1.22.2...v1.22.3 )
---
updated-dependencies:
- dependency-name: rubocop
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-10-28 03:00:44 +00:00
Sebastian Serth
c646a19fe6
Merge pull request #1070 from openHPI/dependabot/bundler/capybara-3.36.0
...
Bump capybara from 3.35.3 to 3.36.0
2021-10-26 09:46:48 +02:00
dependabot[bot]
2c1d0d8aa1
Bump capybara from 3.35.3 to 3.36.0
...
Bumps [capybara](https://github.com/teamcapybara/capybara ) from 3.35.3 to 3.36.0.
- [Release notes](https://github.com/teamcapybara/capybara/releases )
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md )
- [Commits](https://github.com/teamcapybara/capybara/compare/3.35.3...3.36.0 )
---
updated-dependencies:
- dependency-name: capybara
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-10-26 03:00:59 +00:00
dependabot[bot]
aaee50e77a
Merge pull request #1069 from openHPI/dependabot/bundler/rubocop-1.22.2
2021-10-25 03:07:11 +00:00
dependabot[bot]
464a624564
Bump rubocop from 1.22.1 to 1.22.2
...
Bumps [rubocop](https://github.com/rubocop/rubocop ) from 1.22.1 to 1.22.2.
- [Release notes](https://github.com/rubocop/rubocop/releases )
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop/rubocop/compare/v1.22.1...v1.22.2 )
---
updated-dependencies:
- dependency-name: rubocop
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-10-25 03:01:07 +00:00
dependabot[bot]
d5648c1c82
Merge pull request #1068 from openHPI/dependabot/bundler/selenium-webdriver-4.0.3
2021-10-21 03:08:37 +00:00
dependabot[bot]
8e39906ff4
Bump selenium-webdriver from 4.0.2 to 4.0.3
...
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium ) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases )
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES )
- [Commits](https://github.com/SeleniumHQ/selenium/commits )
---
updated-dependencies:
- dependency-name: selenium-webdriver
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-10-21 03:01:09 +00:00
dependabot[bot]
3b75117837
Merge pull request #1067 from openHPI/dependabot/bundler/selenium-webdriver-4.0.2
2021-10-20 03:09:08 +00:00
dependabot[bot]
c14a13d8d3
Bump selenium-webdriver from 4.0.0 to 4.0.2
...
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium ) from 4.0.0 to 4.0.2.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases )
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES )
- [Commits](https://github.com/SeleniumHQ/selenium/commits )
---
updated-dependencies:
- dependency-name: selenium-webdriver
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2021-10-20 03:01:18 +00:00
Sebastian Serth
da1b70d0c7
Merge pull request #1065 from openHPI/dependabot/bundler/rubocop-rails-2.12.4
...
Bump rubocop-rails from 2.12.3 to 2.12.4
2021-10-19 00:52:13 +02:00