555 Commits

Author SHA1 Message Date
3895537f4f concise names for docker containers and links 2024-07-16 14:54:56 -04:00
336519b21d Refactor CodeOcean::Config class
The new architecture memorizes settings (which we mostly did after reading the config so far) and also exposes the resulting file path as well as further settings.

This change is a prerequisite to define a dependency with Sprockets.
2024-05-21 21:56:31 +02:00
0a379721a1 Add AuthenticationToken to UserMailer.exercise_anomaly_needs_feedback 2024-05-21 20:10:00 +02:00
e1d87b51e9 Fix AnomalyDetection broken after recent changes 2024-05-21 20:10:00 +02:00
f6041af4c3 Add i18n-tasks with adapted config from CodeHarbor 2024-05-21 19:42:26 +02:00
71cb9ccbdb Connection::Buffer: Ignore linter indicator wrapped in quotes
The PyLint output is marking the erroneous location visually by using ^ in the next line. This indicator is always prefixed by multiple spaces and the line does not contain any further text. Now, it might happen that the indicator is between two source lines that use the same quote type. Since we detect quotes through our regex, this occurrence would qualify, effectively enquoting the linter indicator ^. As a consequence of our quote handling, we normally prevented quoted text from being split. However, in the described scenario, this is not desired, since we are not dealing with a regular quote (but an accidental mismatch).

Therefore, with this commit, we disable our quote handling for those multi-line quotes where one line fully represents a typical PyLint indicator line. This should restore the desired line-matching behavior.

Fixes CODEOCEAN-12N
2024-04-18 08:43:13 +02:00
a73bb8f0ea Add Rake task to GDPR delete users 2024-04-03 10:25:50 +02:00
1f3d76707d Fix Rubocop offenses 2023-12-26 01:58:46 +01:00
05adde58ce Correctly set current Sentry span for WebSocket requests 2023-12-02 23:30:03 +01:00
59aa3926d9 Fix misleading Sentry error for DockerContainerPool 2023-11-24 23:49:29 +01:00
b91a2b7ce0 Remove PairProgramming23Study and instead use LTI parameter 2023-10-22 12:07:41 +02:00
a379243982 Disable PairProgramming23Study in tests 2023-09-30 21:50:04 +02:00
42b0507cd6 Connection::Buffer: Ignore comments for quote matching
Within a source code comment (beginning with # or \\), a user could write arbitrary text, including unmatched quotes " or '. This is not an error and should be supported. However, with the current implementation, we would also treat such a quote the same way as an original one. With this commit, we fix that erroneous behavior.

Fixes CODEOCEAN-XF
2023-09-30 18:56:19 +02:00
26ea69eba8 Require pair programming for a given set of exercises 2023-09-25 17:29:40 +02:00
077af74671 Connection::Buffer: Restore buffering for lines ending with CR
With the turtle graphics, some very long lines might be returned by Poseidon just after the CR (\r). In this case, our new normalization will fix the mistake, but the next message received (just a LF `\n`) will be forwarded to the clients unchanged. This is not desired, so that we filter this case separately.
2023-09-24 16:29:08 +02:00
4690dbee32 PyLint: Fix recognition of new lines
Since we prevent \r\r\n line breaks in the buffer (and rather return \r\n), we can also change the recognition of line breaks for the ASSERTION_ERROR_REGEXP.
2023-09-24 15:46:57 +02:00
ef63ebfecf JUnit 4: Fix broken arrayEquals comparison
This test still checked for a \r\n, which is why we modified the RegEx. Further, during testing of this change, I noticed that the line number 50 was outdated and only valid for JUnit 4.11. Since we updated to 4.13 recently, we need to find another mechanism to check for the correct line.
2023-09-24 15:43:58 +02:00
515a81537c Connection::Buffer: Prevent modification of line breaks in quotes
After splitting the messages received into lines, we could still have a line break within quotes. Since we just want to modify terminating line breaks, we change the recognition accordingly.
2023-09-24 15:42:26 +02:00
64c1a1cb6f Connection::Buffer: Handle Python doc string correctly
In Python, a so-called doc string consists of a string encoded in three quote (starting and ending with """ or '''). These strings were not yet recognized correctly, so that line breaks there would cause further trouble with recognizing individual lines (which is important for the linter translation).
2023-09-24 15:38:58 +02:00
968fd5b864 Connection::Buffer: Fix recognition of incoming CLRF line endings
Previously, a message received with CRLF line endings was (incorrectly) converted to CRCRLF line endings (i.e., from \r\n to \r\r\n). Then, the splitting in individual lines could generate an "empty" line, just containing the newly-added CR line ending \r.
2023-09-24 14:10:06 +02:00
03637b3185 Buffer: Buffer messages with incomplete quotes
If a non-JSON message received contains quotes and is cut off weirdly, the following message might "quote" the line breaks. Then, we have an issue and cause \r\n\n for the further processing within the CodeOcean backend.
2023-09-20 22:35:26 +02:00
b5cb5c16dd Buffer: Split only complete lines ending with \r\n
This change is required for Turtle output generated by the Python environment. Otherwise, drawing some images could add empty new lines (in the browser), since the original JSON message got split between the ending \r\n characters.
2023-09-20 22:33:59 +02:00
6d107ba2f4 Fix Linter translation with multi-line expression
Fixes CODEOCEAN-V1
2023-09-20 00:35:50 +02:00
72009667a6 Fix Poseidon JSON schema
that included a wrong usage of the `required` attribute.

See #1914 and openHPI/poseidon#456.
2023-09-19 12:52:53 +02:00
8faab2d16a Study: Only test fixed enrolled users for external users 2023-09-19 11:54:39 +02:00
e8619ae5f5 Add safeguard for sentry_span in connection.rb 2023-09-19 10:13:45 +02:00
56b6380f4d Capture invalid JSON received from runner management
Related to https://github.com/openHPI/codeocean/issues/1914
2023-09-19 10:13:45 +02:00
cc4f1d2ace Fix wrong test result output for Julia adapter 2023-09-16 16:09:17 +02:00
44618f6ac4 Add fixed enrolled users to PairProgramming23Study 2023-09-13 01:28:13 +02:00
c29256aa81 Fix Rubocop offenses 2023-09-11 14:10:16 +02:00
f47e29fae9 Fix missing sentry breadcrumb for websocket connection
It seems like we are still not setting the Sentry hub correctly. Therefore, we just use the hub passed with the span to add the breadcrumbs.
2023-09-08 00:01:20 +02:00
aaf1162cf8 Bump sentry-ruby and sentry-rails
Bumps [sentry-ruby](https://github.com/getsentry/sentry-ruby) and [sentry-rails](https://github.com/getsentry/sentry-ruby). These dependencies needed to be updated together.

Updates `sentry-ruby` from 5.10.0 to 5.11.0
- [Release notes](https://github.com/getsentry/sentry-ruby/releases)
- [Changelog](https://github.com/getsentry/sentry-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-ruby/compare/5.10.0...5.11.0)

Updates `sentry-rails` from 5.10.0 to 5.11.0
- [Release notes](https://github.com/getsentry/sentry-ruby/releases)
- [Changelog](https://github.com/getsentry/sentry-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-ruby/compare/5.10.0...5.11.0)

---
updated-dependencies:
- dependency-name: sentry-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: sentry-rails
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-07 14:16:10 +02:00
0b42bba988 Assign users into A/B groups 2023-09-05 22:56:50 +02:00
ac92385dd7 Rename remaining occurrences of webpacker to shakapacker 2023-09-01 19:39:51 +02:00
8ba5d5a984 Allow enabling pair programming study through env 2023-08-26 00:38:58 +02:00
9d1be1eeff Migrate AnomalyNotification to contributor
* Also, this commit aims to fix the (broken) anomaly notifications.
2023-08-24 19:32:06 +02:00
2fb8def1d0 Add PairProgrammingStudy
* Later used to create the A/B groups
2023-08-24 19:32:06 +02:00
730e6f85eb Migrate color-mode-picker to work with Turbolinks
Fix CODEOCEAN-FRONTEND-2D
2023-08-16 23:49:50 +02:00
3b4fc0a5ec Fix ActionCable load error due to custom inflection for middleware 2023-08-16 17:11:23 +02:00
246cd209f3 Fix access of current theme during page load 2023-08-07 22:07:36 +02:00
944b455194 Introduce Dark Mode
This commit mainly changes the color definitions. Mostly, those changes are semantically equally, but there are a few changes that occurred to align the color scheme within the app.
2023-07-31 11:48:42 +02:00
db56a690c7 Add option to suppress feedback messages
This is used to dynamically exclude some test results from being shown to users, but still allows them to run in the background (e.g., for research).
2023-07-27 10:38:49 +02:00
fd2d94568a Handle OutOfMemory runner errors with gVisor 2023-07-21 16:38:49 +02:00
bcdc71021e Fix Rubocop offenses 2023-06-11 20:46:45 +02:00
e59c991ece Add first version of JuliaAdapter
The adapter was tested with a first demo exercise, but further adjustments might be necessary to cover all edge cases.
2023-05-11 22:26:13 +02:00
f6278b27cf Determine WebSocket connection without Upgrade header
The HTTP Upgrade header is hop-by-hop only and therefore removed by a reverse proxy.
Read more: http://nginx.org/en/docs/http/websocket.html
2023-05-10 00:26:27 +02:00
240fbc5a3b Add Sentry instrumentation for JavaScript 2023-05-09 22:10:40 +02:00
6a0c4976ba Re-Allow successfully synchronization of environments
We previously fixed an issue with bootstrapping Poseidon, but unfortunately mixed with the conditions.

Amends c59eaa05
Fixes CODEOCEAN-M7
2023-04-17 22:23:25 +02:00
c59eaa05bb Handle bootstrapping of Poseidon when no environments
When starting Poseidon with an empty Nomad cluster, the list of existing environments is empty. In this case, however, our error handler threw an error, which was not correct.

Fixes CODEOCEAN-M7
2023-04-14 13:37:45 +02:00
c407d8cb8b Capture context for Sentry errors during WebSocket connection
Special handling is needed to ensure we have the transaction ID and Rack ENV. Otherwise the error cannot be matched to a transaction in Sentry. This special behavior is needed because of the underlying EventMachine, which executes code in a different thread/context.
2023-04-14 12:50:50 +02:00