action #159411
closedUpgrade codemirror from 5.58.2 to 6.0.1 size:M
0%
Description
Motivation¶
dependabot automatically prepares PR's as a new version of a dependency we rely on is available. Some of the updates require manual intervention when there's incompatible changes. We should treat them like High tickets.
codemirror 6.0.1 has been available since March 15 meaning it exceeds our SLA and we should look into it asap, hence this ticket to make it more visible.
Acceptance criteria¶
- AC1: The codemirror dependency has been upgraded, replaced or otherwise handled
Suggestions¶
- See https://github.com/os-autoinst/openQA/pull/5524 as a starting point for the upgrade Note that there'd be also many alternatives: https://js.libhunt.com/codemirror-alternatives Considering that updating CodeMirror would be quite some effort as well we should consider looking into alternatives as well:
- Look into "ace editor", Try https://ace.c9.io/
- Quill looks light-weight (see https://www.npmjs.com/package/quill). It uses https://highlightjs.org as dependency and would definitely support all languages we need that way. Judging by this example no bundling is required for that. mkittler votes for quill because that would probably be very easy to do. One just had to follow the example from https://quilljs.com/docs/modules/syntax. but hasn't consider ace editor yet
Rollback actions¶
- DONE
Enable auto-update service on o3 - DONE
Make sure openqa on o3 is up-to-date again
Updated by mkittler 6 months ago · Edited
Looks like CodeMirror really requires the use of a bundler, see https://codemirror.net/docs/ref. I suppose WebPack could be used (see https://github.com/codemirror/codemirror5/issues/5484) and thus perhaps also https://metacpan.org/pod/Mojolicious::Plugin::Webpack.
We also need to install packages packages for certain features manually, e.g. @codemirror/view
, @codemirror/lang-yaml
and @codemirror/legacy-modes
, .@codemirror/lang-perl
and @codemirror/lang-diff
. Unfortunately I couldn't actually find the last two packages. Not sure where support for this went; if those languages are no longer supported this would be quite problematic
Note that there'd be also many alternatives: https://js.libhunt.com/codemirror-alternatives
Considering that updating CodeMirror would be quite some effort as well we should consider looking into alternatives as well:
- Monaco Editor looks interesting (see https://www.npmjs.com/package/monaco-editor). It is basically what VSCode uses. It seems like a little bit too much but at least it seems directly consumable without bunder (but I haven't verified that yet) and supports all languages we need.
- Quill looks more light-weight (see https://www.npmjs.com/package/quill). It uses https://highlightjs.org as dependency and would definitely support all languages we need that way. Judging by this example no bundling is required for that.
Updated by mkittler 6 months ago
I'd vote for quill because that would probably be very easy to do. One just had to follow the example from https://quilljs.com/docs/modules/syntax.
Updated by openqa_review 6 months ago
- Due date set to 2024-05-10
Setting due date based on mean cycle time of SUSE QE Tools
Updated by jbaier_cz 6 months ago · Edited
- Description updated (diff)
So there is an issue with this PR, webui is refusing to start:
Apr 26 10:11:35 new-ariel systemd[1]: Started The openQA web UI.
Apr 26 10:11:36 new-ariel openqa-webui-daemon[21685]: AssetPack was unable to locate related asset '../node_modules/ace-builds/css/main-1.png' at /usr/share/openqa/script/../lib/Mojolicious/Plugin/AssetPack/Pipe/FetchForNode.pm line 25.
Apr 26 10:11:36 new-ariel systemd[1]: openqa-webui.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 26 10:11:36 new-ariel systemd[1]: openqa-webui.service: Failed with result 'exit-code'.
I did zypper in --oldpackage /var/cache/zypp/packages/devel_openQA/x86_64/*-4.6.1713895143.68ea6d5a-lp155.6541.1.x86_64.rpm
as a workaround and disabled auto-update systemctl disable --now openqa-auto-update.timer
and systemctl disable --now openqa-continuous-update.timer
Updated by okurz 6 months ago
- Copied to action #159663: Prevent missing js assets in PR checks as observed in #159411-11 added
Updated by okurz 6 months ago
fix https://github.com/os-autoinst/openQA/pull/5594 was merged. I conducted rollback steps, fixed version deployed, o3 up, checked multiple pages with editor and looks new and good, all good again. Closed revert https://github.com/os-autoinst/openQA/pull/5593
Updated by okurz 5 months ago
- Related to action #159720: [OBS] openQA packages failing with "File not found: /home/abuild/…/usr/share/openqa/node_modules" apparently on all architectures but x86_64 added