-
Notifications
You must be signed in to change notification settings - Fork 922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to rails 7.2.0 #5070
Update to rails 7.2.0 #5070
Conversation
Looks like this is a no-go until we can move to ruby 3.1 then... |
97591e4
to
5e4091d
Compare
I did a smoke test on Ubuntu 22.04 + ruby 3.3.2 (2024-05-30 revision e5a195edf6), which I installed manually at one point. Tests are passing without issue:
A few tests are reporting some warning "Test is missing assertions":
|
Not sure why you're getting those messages because I don't see them. I mean I can see what the problem is - people have written stubs for tests that don't do anything yet. It's just a bit odd that you get warned about them and I don't. |
In some cases they're not even stubs - a test of an action with no assertions still checks that a given action will run without throwing any exceptions. |
The messages also show up in GitHub action runs, such as: https://github.com/openstreetmap/openstreetmap-website/actions/runs/10394204557/job/28783478253?pr=5070 around line 70:
|
According to the docs, https://api.rubyonrails.org/v7.1.3.4/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_nothing_raised should handle this case. Probably a bit redundant, as exceptions would cause the test to fail anyway. |
Yes I figured it out... I had |
6eb2b88
to
1a937de
Compare
I think it's a shame that we have to drop 22.04 support, since I expect some developers won't have yet upgraded their Ubuntu to 24.04. (I haven't, but I used rbenv - we don't want to rely on that for new developers). It seems like an unfortunate combination of release dates and support periods:
So we end up with a period of only 4 months where we have two versions of Ubuntu available. We'll face a similar problem in two year's time, because Ubuntu 24.04 shipped with ruby 3.2, which will be EOL in Mar 2026 i.e. just before Ubuntu 26.04 LTS. I wish either ruby would extend their support a little, or Ubuntu would use the newest ruby, or rails would be more tolerant of slightly EOL rubies, all the make this developer experience a bit smoother. Nevertheless, I'm happy to move forward. I would say that we should:
|
There's an extra complication which is that we can't (yet) use the GitHub 24.04 image to run tests as it's still beta and is missing firefox (planned to be fixed before it leaves beta) so for now we probably have to stick with 22.04 for GHA. |
Also we're waiting on jumph4x/canonical-rails#92 before we can go to 7.2.1 which is already out. |
d66be9d
to
e60faba
Compare
I've updated this as follows:
The docker issue is rubyjs/mini_racer#305 / rubyjs/libv8-node#36 which stops mini_racer installing on 24.04 currently. |
Oh just to add that all the production servers, and the dev server, are now on Debian 12 and hence ruby 3.1. |
#5010 (comment) proposes some changes to use Debian 12 for Docker. Maybe we should try to resolve the remaining issue there, to keep everything a bit more in sync. |
Also add Ubuntu 24.04 and drop 20.04 as 24.04 is needed for ruby 3.1 without rvm so we should test it.
Looks good to me, thanks! |
Oh I was going to wait until we could do 7.2.x updates in case there security issues that couldn't wait... |
It looks like 7.2.1 is OK at least as there don't look to be any security fixes. |
Ah, I didn't realise it was blocked for any reason. I saw that the canonical-rails PR had been merged already, but I guess the problem is that it hasn't been included in a release. I can make a PR that moves to canonical-rails from git master, if that helps? That way we can get point releases for rails 7.2.x |
I don't think we need to worry for now but it's a way out if we do need to do a rails update urgently. |
Ah, I created #5246 before I saw your comment, so the work is done if you want it. I've no idea whether rails 7.2.2 or canonical-rails will be the first to be released. |
No description provided.