Commit Graph

16 Commits

Author SHA1 Message Date
0b1cb3affa Fix removal of event listeners for runSocket
The code previously used was only working with the patched Sentry method, not when Sentry was inactive. Since a Websocket is inheriting from EventTarget, the method signature usually requires two arguments.

See https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener
2024-05-26 10:28:16 +02:00
94404370c4 Upgrade Sentry to v8 and remove custom Dependabot grouping
As part of the upgrade process, we need to rework the tracing instrumentation. Now, we are just wrapping all async functions in a new sentry transaction, which will automatically end once the function returns.

Further, the structure of the Sentry packages got reworked, so that we only need a single package by now. This removes the need to group dependabot updates.

Co-authored-by: Jan Graichen <jgraichen@altimos.de>
2024-05-24 14:52:14 +02:00
86c67f3c9a Refactor code execution to use async functions
This refactoring is required for Sentry tracing. It ensures that the respective functions only return as soon as a code execution finished. With this approach, we can then instrument the duration of the functions, so that Sentry spans are created as desired.

Co-authored-by: Jan Graichen <jgraichen@altimos.de>
2024-05-24 14:52:14 +02:00
17dd8b1267 Change syntax for routes with filename
Previously, the filename was URL-encoded, thus each / was replaced with %2F. This caused issues with some Apache2 configuration, smartly mingling with the URL to either encode it a second time (resulting in %252F) or decoding it (generating a real /). However, for authenticated file downloads with the JWT, we hardly require a byte-by-byte matching. With these changes, the URL parameter is no longer URL-encoded, so that Apache2 won't break our implementation any longer.

Further, we use this opportunity to get rid of the unnecessary .json extension for those filename routes, simplifying the routes generated and doing some further cleanup.
2024-01-19 11:06:40 +01:00
f393d8cb48 Sentry: Allow backend filtering for WebSocket connections without frontend 2023-12-02 23:30:03 +01:00
175c8933f3 Automatically submit LTI grade on each score run
With this commit, we refactor the overall score handling of CodeOcean. Previously, "Score" and "Submit" were two distinct actions, requiring users to confirm the LTI transmission of their score (after assessing their submission). This yielded many questions and was unnecessary, since LTI parameters are no longer expiring after each use. Therefore, we can now transmit the current grade on each score run with the very same LTI parameters. As a consequence, the LTI consumer gets a more detailed history of the scores, enabling further analytical insights.

For users, the previous "Submit" button got replaced with a notification that is shown as soon as the full score got reached. Then, learners can decide to "finalize" their work on the given exercise, which will initiate a redirect to a follow-up action (as defined in the RedirectBehavior). This RedirectBehavior has also been unified and simplified for better readability.

As part of this refactoring, we rephrased the notifications and UX workflow of a) the LTI transmission, b) the finalization of an exercise (measured by reaching the full score) and c) the deadline handling (on time, within grace period, too late). Those information are now separately shown, potentially resulting in multiple notifications. As a side effect, they are much better maintainable, and the LTI transmission is more decoupled from this notification handling.
2023-11-23 14:42:10 +01:00
6f3b72d207 Fix missing Sentry span for WebSocket close
Fixes CODEOCEAN-FRONTEND-3C
2023-09-20 00:35:18 +02:00
6d6851a27a Check for Sentry span before appending header for WebSocket
Fix CODEOCEAN-FRONTEND-2X
2023-09-07 22:50:14 +02:00
08a1eb6201 Ignore errors with missing Sentry Transaction
Fix CODEOCEAN-FRONTEND-1D
2023-08-17 00:14:39 +02:00
3b43cb31bf Remove leftover for CodePilot integration 2023-07-30 12:21:05 +02:00
240fbc5a3b Add Sentry instrumentation for JavaScript 2023-05-09 22:10:40 +02:00
60078701f5 Editor: Allow file retrieval after code run 2022-10-29 18:49:18 +02:00
dccc60b7ca Remove renderWebsocketOutput and use printWebsocketOutput instead
* The `render` command is not used much
* Originally added with commit 898074be3f
* The `#render` anchor (see findOrCreateRenderElement) was the "Render" button above the editor, nothing was rendered at all if executing code and otherwise it would be included _within_ the button.
2022-09-04 23:12:46 +02:00
ea02dff0e5 Extend storage of Testrun Messages and truncate long output 2022-04-29 22:44:34 +02:00
19bd742bc9 Show a localized message if the program was killed.
* This will most likely happen by the OOM killer, thus we inform the user about the memory restriction.
2022-04-15 21:29:55 +02:00
541afa92f3 Remove ws_client_protocol option
* The correct setting will be determined automatically
2021-11-01 17:13:06 +01:00