tickets #177717
openUpdate to Redmine 6
0%
Description
This tracks updating our Redmine packaging to major version 6.
It requires switching the Ruby version from 2.7 to 3.x. Some packages in o:i:redmine build against multiple Ruby versions already, but some have 2.7 hardcoded. Setting it using a macro would be nice, but is prone to conflicts upon linking from other projects.
Some dependency packages might no longer be needed and should be removed from o:i:redmine and the machine.
Some plugins will no longer be compatible and require patches or removals.
Starting work on this will likely render o:i:redmine unusable for a while and the production machine should get its packages locked in the meanwhile (which also means it should not be left broken for too long).
Files
Checklist
- Switch Ruby stack to 3.x
- Gather incompatible plugins
- Patch or remove incompatible plugins
- Update core package
- Test updated package
- Test RedmineUP plugin compatibility/updates
- Repair theme filter box alignment
- Solve to_time deprecation warning
- Repair font asset error (follow up upstream)
- Repair tabs/tab template error
- Follow audit.log and implement more AA profile refinements
- Repair image preview alignment
- Solve miscellaneous CSS problems
Updated by crameleon 20 days ago
- Related to tickets #181178: Remove Ruby 2.7 added
Updated by crameleon 19 days ago
I prepared the Ruby 3 + Redmine 6 stack in openSUSE:infrastructure:redmine:stage. The base application generally works, but the theme is still troubled. I adjusted the paths (the theme location changed in the new Redmine requiring both the installation paths of the theme as well as the font source paths in the theme CSS to be changed), but even after doing that and it briefly working, after running with the theme for a short while / making a few requests (??), it falls apart and all views return 500:
[534150ac-b182-413c-9240-1a57bd4c78fa] ActionView::Template::Error (unexpected token at ''): 21:41:16 [0/17626]
[534150ac-b182-413c-9240-1a57bd4c78fa]
Causes:
[534150ac-b182-413c-9240-1a57bd4c78fa] JSON::ParserError (unexpected token at '')
[534150ac-b182-413c-9240-1a57bd4c78fa] 4: <p><%= setting_text_field :app_title, :size => 30 %></p>
[534150ac-b182-413c-9240-1a57bd4c78fa] 5:
[534150ac-b182-413c-9240-1a57bd4c78fa] 6: <p><%= setting_text_area :welcome_text, :cols => 60, :rows => 5, :class => 'wiki-edit' %></p>
[534150ac-b182-413c-9240-1a57bd4c78fa] 7: <%= wikitoolbar_for 'settings_welcome_text' %>
[534150ac-b182-413c-9240-1a57bd4c78fa] 8:
[534150ac-b182-413c-9240-1a57bd4c78fa] 9:
[534150ac-b182-413c-9240-1a57bd4c78fa] 10: <p><%= setting_text_field :per_page_options, :size => 20 %>
[534150ac-b182-413c-9240-1a57bd4c78fa]
[534150ac-b182-413c-9240-1a57bd4c78fa] config/initializers/10-patches.rb:141:in `compute_asset_path'
[534150ac-b182-413c-9240-1a57bd4c78fa] app/helpers/application_helper.rb:1770:in `javascript_include_tag'
[534150ac-b182-413c-9240-1a57bd4c78fa] lib/redmine/wiki_formatting/common_mark/helper.rb:49:in `block in heads_for_wiki_formatter'
[534150ac-b182-413c-9240-1a57bd4c78fa] lib/redmine/wiki_formatting/common_mark/helper.rb:48:in `heads_for_wiki_formatter'
[534150ac-b182-413c-9240-1a57bd4c78fa] lib/redmine/wiki_formatting/common_mark/helper.rb:25:in `wikitoolbar_for'
[534150ac-b182-413c-9240-1a57bd4c78fa] app/views/settings/_general.html.erb:7
[534150ac-b182-413c-9240-1a57bd4c78fa] app/views/settings/_general.html.erb:1
[534150ac-b182-413c-9240-1a57bd4c78fa] app/views/common/_tabs.html.erb:21
[534150ac-b182-413c-9240-1a57bd4c78fa] app/views/common/_tabs.html.erb:20:in `each'
[534150ac-b182-413c-9240-1a57bd4c78fa] app/views/common/_tabs.html.erb:20
[534150ac-b182-413c-9240-1a57bd4c78fa] app/helpers/application_helper.rb:526:in `render_tabs'
[534150ac-b182-413c-9240-1a57bd4c78fa] app/views/settings/edit.html.erb:5
[534150ac-b182-413c-9240-1a57bd4c78fa] app/controllers/settings_controller.rb:33:in `index'
[534150ac-b182-413c-9240-1a57bd4c78fa] lib/redmine/sudo_mode.rb:78:in `sudo_mode'
Updated by crameleon 19 days ago · Edited
This was related to new Redmine using https://github.com/rails/propshaft, update task needs to compile assets which will then rewrite foo.suffix
to foo-<random code>.suffix
.
Updated by crameleon 19 days ago
It seems upstream has the same issue: https://github.com/mrliptontea/PurpleMine2/issues/284 - a patch found in the comments solved the broken icons.
Updated by crameleon 18 days ago
- Checklist item Test RedmineUP plugin compatibility/updates added
- Checklist item Patch or remove incompatible plugins set to Done
Work on free plugins:
-
diary - still unmaintained, but patch was simple:
-
force-issues-private - works well
-
openid_connect - still unmaintained, but patch was simple:
-
https://github.com/devopskube/redmine_openid_connect/pull/101 => https://build.opensuse.org/projects/openSUSE:infrastructure:redmine:stage/packages/redmine-openid_connect/files/gh-pr101-unloadable_rails7.patch
(I could only test if it loads, whether it fully works will unfortunately only show after deployment)
-
https://github.com/devopskube/redmine_openid_connect/pull/101 => https://build.opensuse.org/projects/openSUSE:infrastructure:redmine:stage/packages/redmine-openid_connect/files/gh-pr101-unloadable_rails7.patch
-
plugin-views-revisions - appears to work, but it's not clear if any of our other plugins are actually using this dependency
-
reopen-issues-by-mail - appears to work, but again I only tested if it loads, whether it fully works will show after deployment
-
wysiwyg_editor - does not find assets through Propshaft, as I only installed this for evaluation and don't want to spend effort maintaining it, it will be removed
Pending are RedmineUP plugins.
Updated by crameleon 17 days ago
- Checklist item Test RedmineUP plugin compatibility/updates set to Done
Thanks @mgriessmeier for promptly providing the new licenses, the updated plugins seem to work well with the new Redmine.
Updated by crameleon 16 days ago
- Checklist item Switch Ruby stack to 3.x set to Done
- Checklist item Gather incompatible plugins set to Done
- Checklist item Test updated package set to Done
All seems relatively well prepared in openSUSE:infrastructure:redmine:stage. I shall announce some maintenance time to copypac everything to non-stage, delete packages not existing in stage, and then make a backup and update packages on the machine offline (so database migrations can run undisturbed).
Updated by crameleon 12 days ago
- no longer needed packages removed
- updated rubygem packages copypac'd
- updated redmine packages sr'd + accepted
- redmine packages updated on machine
- ruby2.7* packages removed from machine
- two minor AA profile fixups submitted
TODO for messages only observed in production:
- figure out these missing assets:
E, [2025-04-27T15:16:22.764332 #12676] ERROR -- : [bd5da53b-c716-43a5-80cd-6f751360cfd5] Couldn't find template for digesting: tabs/tab [0/318]
E, [2025-04-27T15:16:24.000809 #12657] ERROR -- : [61947a6b-983c-45f9-8a52-d9c269d3c3d2] Couldn't find template for digesting: tabs/tab
E, [2025-04-27T15:17:02.034766 #12664] ERROR -- : [b2a010c7-c9a1-4365-a4a8-f51df4b49be7] Couldn't find template for digesting: tabs/tab
E, [2025-04-27T15:17:03.357646 #12680] ERROR -- : [e031f53c-2f04-44ea-98db-39d722674336] Couldn't find template for digesting: tabs/tab
[95de91f2-d29e-448a-993e-76905ea6bb41] ActionController::RoutingError (No route matches [GET] "/NotoSans-VariableFont_wdth,wght.woff2"):
[95de91f2-d29e-448a-993e-76905ea6bb41]
F, [2025-04-27T15:21:20.180130 #12685] FATAL -- : [0376ec1d-b54a-4325-bdd3-41d93724a774]
[0376ec1d-b54a-4325-bdd3-41d93724a774] ActionController::RoutingError (No route matches [GET] "/NotoSans-Italic-VariableFont_wdth,wght.woff2"):
[0376ec1d-b54a-4325-bdd3-41d93724a774]
(where is "tabs/tab" referenced, and what is trying to call these fonts?)
- solve this deprecation warning
W, [2025-04-27T15:13:11.700742 #12685] WARN -- : [208646cb-ed5e-4de6-8371-220e3df673ee] DEPRECATION WARNING: to_time will always preserve the timezone offset of the receiv
er in Rails 8.0. To opt in to the new behavior, set `ActiveSupport.to_time_preserves_timezone = true`. (called from time_tag at /srv/www/vhosts/redmine/app/helpers/applicat
ion_helper.rb:745)
(upstream?)
Updated by crameleon 12 days ago · Edited
Fonts errors seem related to this diff:
https://www.redmine.org/projects/redmine/repository/svn/revisions/23278/diff
I find app/assets/stylesheets/wiki_syntax.css to still reference the old paths.
I asked about it in https://www.redmine.org/issues/41748#note-9, if it causes an issue I can try to come up with a downstream patch, but it seems to require adjustment of the font weight etc in addition to the paths, so I shall wait for a comment upstream first otherwise.
Updated by crameleon 11 days ago
- Checklist item Repair theme filter box alignment added
- Checklist item Solve to_time deprecation warning added
- Checklist item Repair font asset error (follow up upstream) added
- Checklist item Repair tabs/tab template error added
- Checklist item Follow audit.log and implement more AA profile refinements added
- Status changed from New to In Progress
Updated by crameleon 11 days ago · Edited
- Checklist item Repair image preview alignment added
Interestingly uploading the screenshot above revealed another CSS issue, opening the preview (/attachments/20207) the image is not scaled to fit into the "preview space", the image spans over into the footer, overlapped by the issue attachment navigation buttons.
Updated by cboltz 10 days ago
That's an interesting[tm] issue.
The page source contains <div class="filecontent-container">
which would be ok.
However, if you look at the page via developer tools, you'll see <div class="filecontent-container" style="height: calc(-287px + 100vh);">
(which means 100% of the viewport height, minus 287px). I can only guess that this gets added via JavaScript, either by redmine itsself or the theme.
A quick grep confirms that, and shows where this might come from (the two *.js matches, even if firefox displays the formula the other way round):
progressoo (progress.o.o):/srv/www/vhosts/redmine # grep -r 100vh
public/assets/application-19859659.css:html, body { min-height: 100vh; }
public/assets/application-24bcafd3.js: $filecontainer.css('height', 'calc(100vh - ' + diff + 'px)')
app/assets/javascripts/application.js: $filecontainer.css('height', 'calc(100vh - ' + diff + 'px)')
app/assets/stylesheets/application.css:html, body { min-height: 100vh; }
The obvious solution is to get a bigger/higher screen and to enlarge the browser window ;-) - but preventing the addition of height:...
or switching it to min-height
should also work.
Since this is in upstream code, I'd recommend to open a bugreport upstream. Feel free to copy&paste this comment.
(As a side note: that height:
also means that we always get a scrollbar, even for small images. I'd call that a related bug.)
.
An alternative (if you prefer to scale down the image) would be to extend the CSS:
img.filecontent, video.filecontent {
max-width: 100%;
max-height: 100%; /* add this */
}
Since this adds a property (and doesn't need to overwrite anything), you can add it to the CSS file you like mostly (if you don't want to patch app/assets/stylesheets/scm.css).
Updated by cboltz 10 days ago
Ok, then it's indeed a problem where our theme is involved (I'd guess because it has a different height of the menu bar etc.).
Nevertheless, I'd expect that redmine doesn't break just because the theme looks different, and would still recommend to open a bugreport upstream.
In the meantime, you can add max-height
as a workaround. It doesn't really matter in which CSS file you add it, so our theme CSS would (also) be fine.
.
For the filter alignment, you can add:
.field, .operator, .values {
display: inline-block;
min-width: 10em;
}
Optionally, you can also add a min-width
for .operator select
and .values select
so that all dropdowns get the same width.
Updated by crameleon 10 days ago
For the filter alignment, you can add:
This does not seem to help in my testing, it only adjusts the dropdown menus. I tried to add it for .query-columns
(the class of the list of columns one can select) but that did not help with aligning the lists horizontally.
It does however slightly help with another issue, the crammed filter dropdowns looks more well spaced horizontally instead of crammed vertically after your patch. Speaking of which, there is a miniature button next to them:
Updated by crameleon 10 days ago
- File Redmine_Upstream_Theme_Filter_Projects.png Redmine_Upstream_Theme_Filter_Projects.png added
- File Redmine_Upstream_Theme_Filter_Issues.png Redmine_Upstream_Theme_Filter_Issues.png added
For reference, this is the filter look with the default theme:
Updated by crameleon 10 days ago
- Checklist item Repair font asset error (follow up upstream) set to Done
I asked about it in https://www.redmine.org/issues/41748#note-9, if it causes an issue I can try to come up with a downstream patch, but it seems to require adjustment of the font weight etc in addition to the paths, so I shall wait for a comment upstream first otherwise.
https://www.redmine.org/issues/42644 => https://build.opensuse.org/package/rdiff/openSUSE:infrastructure:redmine/redmine?linkrev=base&rev=81.
Updated by crameleon 7 days ago · Edited
- Checklist item Repair theme filter box alignment set to Done
Status after working on CSS together in meeting today:
- filter section aligned again
- plus buttons visible again
- still somewhat flawed (button not centered, breakage upon changing of zoom level, ..) but usable
Updated by asmorodskyi 1 day ago
Hi since update happened I notice dramatically increased slowness and also up to 5 times during working day I am getting "Service unavailable" during interaction with redmine.
Is it known issue ? Shall I open dedicated ticket for this ?
Updated by crameleon about 24 hours ago
Hi,
I think it's not related to the upgrade but to a recent influx of careless requests from bots (https://monitor.opensuse.org/grafana/goto/IWuwMlbHR?orgId=1), I already implemented some mitigation and rate limiting but I fear it's not sufficient yet. I hope https://progress.opensuse.org/issues/181643 will improve general performance but it's still a TODO. I will try to come up with some more ideas later and make a separate ticket if needed.
Updated by gpathak about 22 hours ago
I have created a follow-up ticket: https://progress.opensuse.org/issues/182015 for the issue
Updated by crameleon about 13 hours ago
- File redmine_files_normal.png redmine_files_normal.png added
- File redmine_files_odd_paperclip.png redmine_files_odd_paperclip.png added
Updating to 6.0.5 reveals yet another CSS problem:
(the paperclip is in the default theme "hidden" and only displayed if you attach a file next to the files, with our theme it 1. always shows, 2. is huge (even after attaching files, you have one of the same size next to each attachment)
vs
Updated by crameleon about 13 hours ago
The theme just gets worse :-(
Updated by crameleon about 9 hours ago
regarding #note-31, it seems the SVG class changed from s18 to s16, this should solve the paperclip: https://build.opensuse.org/package/rdiff/openSUSE:infrastructure:redmine/redmine-theme-opensuse?linkrev=base&rev=11.
Updated by crameleon about 9 hours ago
and #note-32 should be repaired via https://build.opensuse.org/package/rdiff/openSUSE:infrastructure:redmine/redmine-theme-opensuse?linkrev=base&rev=12 (though I don't quite understand what this background was block was supposed to be doing before).