Feature #29914

Migrate to Rails 6

Added by Go MAEDA over 1 year ago. Updated 18 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Rails support
Target version:5.0.0
Resolution:

32886-wip-r19467.patch Magnifier (1.79 KB) Go MAEDA, 2020-01-27 05:30


Related issues

Related to Redmine - Defect #27780: Attachment sort doesn't work with Unicode New
Related to Redmine - Feature #31128: Drop Ruby < 2.5 support New
Related to Redmine - Patch #32885: Rails 6: DEPRECATION WARNING: Single arity template handl... New
Related to Redmine - Patch #32886: Rails 6: Use #media_type instead of #content_type to test... Closed
Related to Redmine - Patch #32887: Rails 6: Use "render template:" instead of "render file:"... Closed
Related to Redmine - Patch #32897: Rails 6: Pass `case_sensitive: true` option explicitly to... Reopened
Related to Redmine - Patch #32908: Rails 6: Sending mail with DeliveryJob is deprecated New
Related to Redmine - Patch #32909: Rails 6: use Relation#pick New
Related to Redmine - Patch #32910: Rails 6: add lookup_context to hook_test.rb New
Related to Redmine - Patch #32911: Rails 6: Fix deprecation warning "Class level methods wil... Closed
Related to Redmine - Patch #32912: Rails 6: update no longer bypass optimistic locking New
Related to Redmine - Patch #32913: Rails 6: add filename header New
Related to Redmine - Patch #32914: Rails 6: remove #filename_for_content_disposition for MS ... New
Related to Redmine - Patch #32922: reload detached attachments New
Related to Redmine - Patch #32923: Rails 6: detach attachments when a conflict occurs New
Related to Redmine - Patch #32921: Rails 6: add header=present to csv tests New
Related to Redmine - Patch #32935: Rails 6: fix set role_ids New
Related to Redmine - Patch #32936: Rails 6: disable AJ test adapter for integration tests New
Related to Redmine - Patch #32937: test_revisions_latin_1_identifier should be skipped on Wi... Closed
Related to Redmine - Feature #32938: Rails 6: Zeitwerk support New
Related to Redmine - Patch #32939: Rails 6: fix plugin migrations New
Blocked by Redmine - Patch #31919: Update roadie-rails gem (~> 2.1.0) Closed

Associated revisions

Revision 18375
Added by Go MAEDA 6 months ago

Code cleanup: RuboCop: Rails/ActiveRecordAliases

update_attributes is deprecated in Rails 6.0 and will be removed in Rails 6.1 (#29914).

History

#1 Updated by Go MAEDA over 1 year ago

  • Related to Defect #27780: Attachment sort doesn't work with Unicode added

#2 Updated by Marius BALTEANU 11 months ago

#3 Updated by Go MAEDA 8 months ago

  • Target version changed from Unplanned backlogs to 5.0.0

#4 Updated by Enziin System 8 months 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 6 months ago

  • Blocked by Patch #31919: Update roadie-rails gem (~> 2.1.0) added

#7 Updated by Tigergm Wu about 1 month 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 26 days ago

  • Related to Patch #32885: Rails 6: DEPRECATION WARNING: Single arity template handlers are deprecated added

#9 Updated by Go MAEDA 26 days 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 25 days 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 25 days ago

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 25 days 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 24 days ago

  • Related to Patch #32897: Rails 6: Pass `case_sensitive: true` option explicitly to the uniqueness validator added

#14 Updated by Go MAEDA 24 days 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 24 days 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 23 days 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 23 days ago

  • Related to Patch #32908: Rails 6: Sending mail with DeliveryJob is deprecated added

#18 Updated by Marius BALTEANU 23 days ago

#19 Updated by Marius BALTEANU 23 days ago

  • Related to Patch #32910: Rails 6: add lookup_context to hook_test.rb added

#20 Updated by Marius BALTEANU 23 days ago

  • Related to Patch #32911: Rails 6: Fix deprecation warning "Class level methods will no longer inherit scoping" added

#21 Updated by Marius BALTEANU 23 days ago

  • Related to Patch #32912: Rails 6: update no longer bypass optimistic locking added

#22 Updated by Marius BALTEANU 23 days ago

  • Related to Patch #32913: Rails 6: add filename header added

#23 Updated by Marius BALTEANU 23 days ago

  • Related to Patch #32914: Rails 6: remove #filename_for_content_disposition for MS browsers added

#24 Updated by Marius BALTEANU 22 days ago

  • Related to Patch #32922: reload detached attachments added

#25 Updated by Marius BALTEANU 22 days ago

  • Related to Patch #32923: Rails 6: detach attachments when a conflict occurs added

#26 Updated by Marius BALTEANU 22 days ago

  • Related to Patch #32921: Rails 6: add header=present to csv tests added

#27 Updated by Pavel Rosick√Ĺ 18 days ago

all tests should be passing now

#28 Updated by Marius BALTEANU 17 days ago

#29 Updated by Marius BALTEANU 17 days ago

  • Related to Patch #32936: Rails 6: disable AJ test adapter for integration tests added

#30 Updated by Marius BALTEANU 17 days ago

  • Related to Patch #32937: test_revisions_latin_1_identifier should be skipped on Windows added

#31 Updated by Marius BALTEANU 17 days ago

#32 Updated by Marius BALTEANU 17 days ago

  • Related to Patch #32939: Rails 6: fix plugin migrations added

Also available in: Atom PDF