Feature #29914
Migrate to Rails 6.1
Status: | New | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | Rails support | |||
Target version: | 5.0.0 | |||
Resolution: |
Related issues
Associated revisions
Code cleanup: RuboCop: Rails/ActiveRecordAliases
update_attributes is deprecated in Rails 6.0 and will be removed in Rails 6.1 (#29914).
Gemfile: Update Rails to 6.1 (#29914).
Fix Subclasses must implement a find_templates(name, prefix, partial, details, locals = []) method (#29914).
Patch by Go MAEDA.
Fix "DEPRECATION WARNING: Passing a path to relative to is deprecated." (#29914).
Patch by Marius BALTEANU.
Fix "ActionView::Template::Error (wrong number of arguments (given 2, expected 1))" (#29914).
Patch by Marius BALTEANU.
Fix ArgumentError: wrong number of arguments (given 1, expected 3) (#29914).
Patch by Marius BALTEANU.
Use media_type to get the MIME type of the request (#29914).
Patch by Marius BALTEANU.
Update activerecord-sqlserver-adapter to 6.0.1 (#29914).
Set TargetRailsVersion of RuboCop to 6.1 (#29914).
History
#1
Updated by Go MAEDA over 2 years ago
- Related to Defect #27780: Case-insensitive matching fails for Unicode filenames when referring to attachments in text formatting added
#2
Updated by Marius BALTEANU about 2 years ago
- Related to Feature #31128: Drop Ruby < 2.5 support added
#3
Updated by Go MAEDA almost 2 years ago
- Target version changed from Unplanned backlogs to 5.0.0
#4
Updated by Enziin System almost 2 years ago
Rails 6?
Please carefully, because Rails 6 drop sprockets assets and use Webpack default.
In the wonderland, Redmine converts to the frontend with Angular/Reactjs/Vue, it's my dream.
#5
Updated by Go MAEDA over 1 year ago
- Blocked by Patch #31919: Update roadie-rails gem (~> 2.1.0) added
#6
Updated by Marius BALTEANU over 1 year ago
#7
Updated by Tigergm Wu over 1 year ago
Yes. I hope so.
Enziin System wrote:
Rails 6?
Please carefully, because Rails 6 drop sprockets assets and use Webpack default.
In the wonderland, Redmine converts to the frontend with Angular/Reactjs/Vue, it's my dream.
#8
Updated by Go MAEDA about 1 year ago
- Related to Defect #32885: Rails 6: DEPRECATION WARNING: Single arity template handlers are deprecated added
#9
Updated by Go MAEDA about 1 year ago
- Related to Patch #32886: Rails 6: Use #media_type instead of #content_type to test the MIME type of a response added
#10
Updated by Go MAEDA about 1 year ago
- Related to Patch #32887: Rails 6: Use "render template:" instead of "render file:" in app/views/layouts/admin.html.erb added
#11
Updated by Go MAEDA about 1 year ago
- File 32886-wip-r19467.patch
added
I started work on this issue.
Here is the very first version of the work-in-progress patch but there are still many errors.
4936 runs, 22346 assertions, 34 failures, 42 errors, 7 skips
Please feel free to update the patch. Your help is highly appreciated!
#12
Updated by Marius BALTEANU about 1 year ago
Go MAEDA wrote:
I started work on this issue.
Here is the very first version of the work-in-progress patch but there are still many errors.
[...]
Please feel free to update the patch. Your help is highly appreciated!
I'm willing to help with this, but I think we should have first a decision (from Jean-Philippe, I guess) regarding next Redmine major version. If we're going to update to Rails 6, we should merge version 4.2.0 to 5.0.0.
Considering the time frame of the major releases, I'm in favour of Redmine 5.0.0 with support for Rails 6.
#13
Updated by Marius BALTEANU about 1 year ago
- Related to Defect #32897: Rails 6: Pass `case_sensitive: true` option explicitly to the uniqueness validator added
#14
Updated by Go MAEDA about 1 year ago
Marius BALTEANU wrote:
I'm willing to help with this, but I think we should have first a decision (from Jean-Philippe, I guess) regarding next Redmine major version. If we're going to update to Rails 6, we should merge version 4.2.0 to 5.0.0.
I agree. Redmine 5.0.0 is the appropriate version to switch to Rails 6 and this should be decided by Jean-Philippe Lang.
But while waiting for Jean-Philippe's decision, we can prepare for moving to Rails 6. And I think we should do it to quickly switch to Rails 6 once JPL decided to do.
I think we should move to Rails 6 as soon as we can because the Rails team no longer provides bug fixes for Rails 5.2 except for security fixes. The negative impacts of that are already happening. For example, Redmine does not support Ruby 2.7 because Rails 5.2 does not. And probably Rails 5.2 will never support 2.7.
So, I think we should prepare for Rails 6 in parallel with waiting for the decision.
#15
Updated by Aleksandar Pavic about 1 year ago
+1 however I guess lot's of plugin developers will need to be notified and start their upgrades as well...
#16
Updated by Marius BALTEANU about 1 year ago
Go MAEDA wrote:
I agree. Redmine 5.0.0 is the appropriate version to switch to Rails 6 and this should be decided by Jean-Philippe Lang.
But while waiting for Jean-Philippe's decision, we can prepare for moving to Rails 6. And I think we should do it to quickly switch to Rails 6 once JPL decided to do.
I think we should move to Rails 6 as soon as we can because the Rails team no longer provides bug fixes for Rails 5.2 except for security fixes. The negative impacts of that are already happening. For example, Redmine does not support Ruby 2.7 because Rails 5.2 does not. And probably Rails 5.2 will never support 2.7.
So, I think we should prepare for Rails 6 in parallel with waiting for the decision.
Let's do it then. I've prepared this branch on my Gitlab CI instance, it should be easier to track the test fails.
As next steps, I propose to open issues for all fails and deprecation warnings and to discuss there the fixes. I expect to get some feedback from other active contributors.
#17
Updated by Marius BALTEANU about 1 year ago
- Related to Defect #32908: Rails 6: Sending mail with DeliveryJob is deprecated added
#18
Updated by Marius BALTEANU about 1 year ago
- Related to Patch #32909: Replace pluck().first with pick() added
#19
Updated by Marius BALTEANU about 1 year ago
- Related to Defect #32910: Rails 6: add lookup_context to hook_test.rb added
#20
Updated by Marius BALTEANU about 1 year ago
- Related to Patch #32911: Rails 6: Fix deprecation warning "Class level methods will no longer inherit scoping" added
#21
Updated by Marius BALTEANU about 1 year ago
- Related to Defect #32912: Rails 6: update no longer bypass optimistic locking added
#22
Updated by Marius BALTEANU about 1 year ago
- Related to Defect #32913: Rails 6: add filename header added
#23
Updated by Marius BALTEANU about 1 year ago
- Related to Defect #32914: Rails 6: remove #filename_for_content_disposition for MS browsers added
#24
Updated by Marius BALTEANU about 1 year ago
- Related to Patch #32922: Reload detached attachments added
#25
Updated by Marius BALTEANU about 1 year ago
- Related to Defect #32923: Rails 6: detach attachments when a conflict occurs added
#26
Updated by Marius BALTEANU about 1 year ago
- Related to Defect #32921: Rails 6: add header=present to csv tests added
#27
Updated by Pavel Rosický about 1 year ago
all tests should be passing now
#28
Updated by Marius BALTEANU about 1 year ago
- Related to Defect #32935: Rails 6: fix set role_ids added
#29
Updated by Marius BALTEANU about 1 year ago
- Related to Defect #32936: Rails 6: disable AJ test adapter for integration tests added
#30
Updated by Marius BALTEANU about 1 year ago
- Related to Patch #32937: test_revisions_latin_1_identifier should be skipped on Windows added
#31
Updated by Marius BALTEANU about 1 year ago
- Related to Feature #32938: Rails 6: Zeitwerk support added
#32
Updated by Marius BALTEANU about 1 year ago
- Related to Defect #32939: Rails 6: fix plugin migrations added
#33
Updated by Go MAEDA 6 months ago
- Related to deleted (Defect #27780: Case-insensitive matching fails for Unicode filenames when referring to attachments in text formatting)
#34
Updated by Petr Pospisil 5 months ago
Hello all,
I would like to offer you our help to speed up migration to Rails 6. If you are interested in, please contact me. I have several experienced Redmine developers that should help to move Redmine forward. We can setup a plan and deliver issues done. I know we can send a patch, but I am talking about closer cooperation.
Thank you
Petr
#35
Updated by Marius BALTEANU 20 days ago
- Related to Defect #34980: Fix "undefined method `represent_boolean_as_integer=' for nil:NilClass" in Rails 6.1 added
#36
Updated by Marius BALTEANU 20 days ago
- Related to Defect #34985: Rails 6.1 replace ActiveModel::Errors #<< with #add added
#37
Updated by Marius BALTEANU 20 days ago
- Related to Defect #34984: Rails 6.1 Rendering actions with '.' in the name is deprecated added
#38
Updated by Marius BALTEANU 20 days ago
- File 0010-Fix-ArgumentError-wrong-number-of-arguments-given-1-.patch
added
- File 0009-Fix-ArgumentError-wrong-number-of-arguments-given-1-.patch
added
- File 0008-Rails-6.1-add-header-present-to-csv-tests-29914-3292.patch
added
- File 0007-Fix-ActionView-Template-Error-wrong-number-of-argume.patch
added
- File 0006-Fix-DEPRECATION-WARNING-Passing-a-path-to-relative-t.patch
added
- File 0005-Fix-ActiveRecord-StaleObjectError-Attempted-to-updat.patch
added
- File 0004-Fix-Subclasses-must-implement-a-find_templates-name-.patch
added
- File 0003-Fix-sending-mail-with-DeliveryJob-is-deprecated-2991.patch
added
- File 0002-Fix-undefined-method-for-nil-NilClass-in-Rails-6.1-2.patch
added
- File 0001-Fix-DEPRECATION-WARNING-Uniqueness-validator-will-no.patch
added
I'm attaching a patch series (19) that updates Rails to 6.1.3.1 and fixes all the tests on MySQL and PostgreSQL. MS SQL support is broken for now because the gem supports only Rails 6.0, but I'm confident that will be fixed in the following weeks (there are active discussions/PRs).
My proposal is to have these patches committed as soon as possible in order to have enough time to catch and fix other issues caused by this update (this apply also for plugin developers) and to discuss the other improvements that Rails 6.0/6.1 are adding. In the meanwhile, to track the changes easily, I've changed from Patch to Defect all those tickets that are a must for this update (and for which we have patches attached here).
Thanks again Pavel Rosický for you work on this!
#39
Updated by Marius BALTEANU 20 days ago
- File 0019-Update-activerecord-sqlserver-adapter-to-6.0.1.patch
added
- File 0018-Rails-6.1-fix-set-roleids-29914-32935.patch
added
- File 0017-Fix-DEPRECATION-WARNING-Calling-to-an-ActiveModel-Er.patch
added
- File 0016-Fix-DEPRECATION-WARNING-Rendering-actions-with-.-in-.patch
added
- File 0015-Fix-detach-attachments-when-a-conflict-occurs-29914-.patch
added
- File 0014-Disable-TestAdapter-on-IntegrationTest-29914-32936.patch
added
- File 0013-Remove-filename_for_content_disposition-for-MS-brows.patch
added
- File 0012-Add-filename-header-29914-32913.patch
added
- File 0011-Use-media_type-to-get-the-MIME-type-of-the-request-2.patch
added
Batch 2.
#40
Updated by Go MAEDA 19 days ago
Thank you all for working on this.
Marius BALTEANU wrote:
My proposal is to have these patches committed as soon as possible in order to have enough time to catch and fix other issues caused by this update (this apply also for plugin developers) and to discuss the other improvements that Rails 6.0/6.1 are adding.
I agree. Support for Rails 5.2 will end when Rails 7.0 is released (maybe this year?). So we need to migrate to Rails 6 as soon as possible.
I will commit the patches contributed by Pavel Rosický and Marius BALTEANU in the coming days.
#41
Updated by Marius BALTEANU 19 days ago
- Subject changed from Migrate to Rails 6 to Migrate to Rails 6.1
#42
Updated by Marius BALTEANU 19 days ago
- Related to Feature #34987: Rails 6.1 destroy async added
#43
Updated by Go MAEDA 19 days ago
- Blocks Feature #34992: Ruby 3.0 support added
#44
Updated by Go MAEDA 18 days ago
The following error was reported while running the test suite.
Failure: RepositoriesSubversionControllerTest#test_entry_download [/Users/maeda/redmines/trunk/test/functional/repositories_subversion_controller_test.rb:332]: --- expected +++ actual @@ -1 +1 @@ -"attachment; filename=\"helloworld.c\"" +"attachment; filename=\"helloworld.c\"; filename*=UTF-8''helloworld.c" rails test test/functional/repositories_subversion_controller_test.rb:318
#45
Updated by Go MAEDA 18 days ago
Go MAEDA wrote:
The following error was reported while running the test suite.
[...]
I will fix RepositoriesSubversionControllerTest#test_entry_download
when I commit 0012-Add-filename-header-29914-32913.patch
#46
Updated by Go MAEDA 18 days ago
Committed 19 patches attached to #29914#note-38 and #29914#note-39 (r20879 .. r20901).
#47
Updated by Yuichi HARADA 17 days ago
Updating activerecord-sqlserver-adapter with r20900, but when I execute bundle update
, the following error occurs.
% bundle update Fetching gem metadata from https://rubygems.org/.......... Resolving dependencies... Bundler could not find compatible versions for gem "activerecord": In Gemfile: activerecord-sqlserver-adapter (~> 6.0.1) was resolved to 6.0.1, which depends on activerecord (~> 6.0.0) rails (= 6.1.3.1) was resolved to 6.1.3.1, which depends on activerecord (= 6.1.3.1)
#48
Updated by Pavel Rosický 17 days ago
@yuichi activerecord-sqlserver-adapter doesn't support Rails 6.1 yet, but there's an open PR
https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/861
it would be nice if someone could run tests on it.
#49
Updated by Yuichi HARADA 17 days ago
Pavel Rosický wrote:
@yuichi activerecord-sqlserver-adapter doesn't support Rails 6.1 yet, but there's an open PR
https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/861it would be nice if someone could run tests on it.
Thank you for teaching me. I hope it will be resolved by the time Redmine 5.0 is released.
#50
Updated by Marius BALTEANU 17 days ago
- Related to Defect #35002: Fix MS SQL on Rails 6.1 added
#51
Updated by Marius BALTEANU 17 days ago
I've created #35002 to track the compatibility with MS SQL.
#52
Updated by Marius BALTEANU 17 days ago
- Related to Defect #35003: Update Rails UJS added
#53
Updated by Go MAEDA 17 days ago
- Related to Defect #35004: DEPRECATION WARNING during startup added
#54
Updated by Go MAEDA 17 days ago
- Related to Defect #35005: RuntimeError "Couldn't find Active Storage configuration" is raised at startup added
#55
Updated by Marius BALTEANU 16 days ago
- File 0001-Update-TargetRailsVersion-to-6.1.patch
added
We should update Rubocop TargetRailsVersion to 6.1
#57
Updated by Go MAEDA 6 days ago
- Related to Patch #35081: Update config/environments/*.rb for Rails 6.1 added