Migrate to Rails 7.1
Updated by Takashi Kato over 1 year ago
- File 0001-Upgrade-to-Rails-7.patch 0001-Upgrade-to-Rails-7.patch added
- File 0002-Fix-deprecation-warning.patch 0002-Fix-deprecation-warning.patch added
- File 0003-Replace-to_s-db-to-to_fs-db.patch 0003-Replace-to_s-db-to-to_fs-db.patch added
- File 0004-Use-Selenium-WebDriver-Wait.patch 0004-Use-Selenium-WebDriver-Wait.patch added
Simple migration patches.
patches can be applied to r21527
Updated by Jun NAITOH 21 days ago
(01 Jun 2024)
6.1 is not getting anymore releases unless it's a severe vulnerability and will be EOL next June.
I think Redmine needs to upgrade to Rails 7 before Rails 6.1 EOL.
Not a bad effort there Takashi Kato, I gave your patch a quick go with Rails 7.1 and it seemed to work with standard Redmine 5.1 release branch.
However one thing that got broke is the autoloading of classes and modules from plugin folders, not sure why. Perhaps you could check this out... I know there have been some subtle changes in this area in Rails. (Also is there a reason you deleted the zeitwerk config line?)
Updated by Minoru Maeda 18 days ago
Takashi Kato wrote in #note-7:
I've updated a patch that is compatible with Rails 7.1 beta. As for the WebDriver patch, I have linked it to another issue 37558.
Thank you for the great patch. I applied the 0001-Upgrade-to-rails-7.1-beta1.patch to r22429@trunk and ran tests, but some of them failed.
- I think this is the behavior reported at https://www.redmine.org/issues/39110.
- test/integration/api_test/my_test.rb and test/integration/api_test/news_test.rb
- It seems there is a problem where XML and JSON requests don't return the expected content-type.
- It looks like assert_difference is evaluated without waiting for the Thread to finish.
Based on the patch you posted, I made corrections so that test/integration/api_test would pass. Also, I updated to Rails v7.1.2, which was released on November 10, 2023.
However, the failures in test/integration/sudo_mode_test.rb and test/unit/project_nested_set_concurrency_test.rb have not been resolved.
I hope this helps.
Updated by Mischa The Evil 6 days ago
Takashi Kato wrote in #note-16:
Just my two cents on this patch:
Sorry for your time.
It is difficult to fix autoload_paths after initialize, so I've changed the method.