mapknitter icon indicating copy to clipboard operation
mapknitter copied to clipboard

Upgrade to Rails 6.0.0

Open alaxalves opened this issue 5 years ago • 23 comments

Fixes #603 (<=== Add issue number here)

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • [x] PR is descriptively titled 📑 and links the original issue above 🔗
  • [x] tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with rake test
  • [x] code is in uniquely-named feature branch and has no merge conflicts 📁
  • [ ] screenshots/GIFs are attached 📎 in case of UI updation
  • [ ] ask @publiclab/mapknitter-reviewers for help, in a comment below

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

Thanks!

alaxalves avatar Jul 09 '19 16:07 alaxalves

In order to get this running we'll need a ruby version > 2.5. What's your input on this? @sashadev-sky @jywarren

alaxalves avatar Jul 09 '19 16:07 alaxalves

Hi @alaxalves - @icarito noted that Rails 6 is currently beyond Debian stable's version, and i was wondering if we should start with a PR that addresses deprecations and warnings without actually initiating the 6.0 upgrade just yet. Do we have an idea of Debian stable's schedule? I just want to be careful about this and think well ahead, and I don't quite have all the info to provide good input yet. Thanks so much!

On Tue, Jul 9, 2019 at 12:08 PM Álax de Carvalho Alves < [email protected]> wrote:

Fixes #603 https://github.com/publiclab/mapknitter/issues/603 (<=== Add issue number here)

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • PR is descriptively titled 📑 and links the original issue above 🔗
  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with rake test
  • code is in uniquely-named feature branch and has no merge conflicts 📁
  • screenshots/GIFs are attached 📎 in case of UI updation
  • ask @publiclab/mapknitter-reviewers for help, in a comment below

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

Thanks!

You can view, comment on, or merge this pull request online at:

https://github.com/publiclab/mapknitter/pull/824 Commit Summary

  • Bumping rails version

File Changes

Patch Links:

  • https://github.com/publiclab/mapknitter/pull/824.patch
  • https://github.com/publiclab/mapknitter/pull/824.diff

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/mapknitter/pull/824?email_source=notifications&email_token=AAAF6J6XGCTGN7NXDOO4KJTP6SZWVA5CNFSM4H7HD3Y2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G6ESRFQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAF6J7RBR5CLPG4LNUPQFLP6SZWVANCNFSM4H7HD3YQ .

jywarren avatar Jul 09 '19 16:07 jywarren

Ah, interesting. Would upgrading to Ruby 2.5 be its own PR perhaps, that could be done before Rails 6?

On Tue, Jul 9, 2019 at 12:12 PM Jeffrey Warren [email protected] wrote:

Hi @alaxalves - @icarito noted that Rails 6 is currently beyond Debian stable's version, and i was wondering if we should start with a PR that addresses deprecations and warnings without actually initiating the 6.0 upgrade just yet. Do we have an idea of Debian stable's schedule? I just want to be careful about this and think well ahead, and I don't quite have all the info to provide good input yet. Thanks so much!

On Tue, Jul 9, 2019 at 12:08 PM Álax de Carvalho Alves < [email protected]> wrote:

Fixes #603 https://github.com/publiclab/mapknitter/issues/603 (<=== Add issue number here)

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • PR is descriptively titled 📑 and links the original issue above 🔗
  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with rake test
  • code is in uniquely-named feature branch and has no merge conflicts 📁
  • screenshots/GIFs are attached 📎 in case of UI updation
  • ask @publiclab/mapknitter-reviewers for help, in a comment below

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

Thanks!

You can view, comment on, or merge this pull request online at:

https://github.com/publiclab/mapknitter/pull/824 Commit Summary

  • Bumping rails version

File Changes

Patch Links:

  • https://github.com/publiclab/mapknitter/pull/824.patch
  • https://github.com/publiclab/mapknitter/pull/824.diff

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/mapknitter/pull/824?email_source=notifications&email_token=AAAF6J6XGCTGN7NXDOO4KJTP6SZWVA5CNFSM4H7HD3Y2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G6ESRFQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAF6J7RBR5CLPG4LNUPQFLP6SZWVANCNFSM4H7HD3YQ .

jywarren avatar Jul 09 '19 16:07 jywarren

Ah, interesting. Would upgrading to Ruby 2.5 be its own PR perhaps, that could be done before Rails 6? On Tue, Jul 9, 2019 at 12:12 PM Jeffrey Warren @.> wrote: Hi @alaxalves - @icarito noted that Rails 6 is currently beyond Debian stable's version, and i was wondering if we should start with a PR that addresses deprecations and warnings without actually initiating the 6.0 upgrade just yet. Do we have an idea of Debian stable's schedule? I just want to be careful about this and think well ahead, and I don't quite have all the info to provide good input yet. Thanks so much! On Tue, Jul 9, 2019 at 12:08 PM Álax de Carvalho Alves < @.> wrote: > Fixes #603 <#603> (<=== > Add issue number here) > > Make sure these boxes are checked before your pull request (PR) is ready > to be reviewed and merged. Thanks! > > - PR is descriptively titled and links the original issue above > - tests pass -- look for a green checkbox a few minutes after > opening your PR -- or run tests locally with rake test > - code is in uniquely-named feature branch and has no merge conflicts > > - screenshots/GIFs are attached in case of UI updation > - ask @publiclab/mapknitter-reviewers for help, in a comment below > > We're happy to help you get this ready -- don't be afraid to ask for > help, and don't be discouraged if your tests fail at first! > > If tests do fail, click on the red X to learn why by reading the logs. > > Please be sure you've reviewed our contribution guidelines at > https://publiclab.org/contributing-to-public-lab-software > > Thanks! > ------------------------------ > You can view, comment on, or merge this pull request online at: > > #824 > Commit Summary > > - Bumping rails version > > File Changes > > - M Gemfile > https://github.com/publiclab/mapknitter/pull/824/files#diff-0 (4) > - M Gemfile.lock > https://github.com/publiclab/mapknitter/pull/824/files#diff-1 (131) > > Patch Links: > > - https://github.com/publiclab/mapknitter/pull/824.patch > - https://github.com/publiclab/mapknitter/pull/824.diff > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <#824?email_source=notifications&email_token=AAAF6J6XGCTGN7NXDOO4KJTP6SZWVA5CNFSM4H7HD3Y2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G6ESRFQ>, > or mute the thread > https://github.com/notifications/unsubscribe-auth/AAAF6J7RBR5CLPG4LNUPQFLP6SZWVANCNFSM4H7HD3YQ > . >

Yes, I could open a MR upgrading to latest ruby. BTW can I push Rails 5 to unstable?

alaxalves avatar Jul 09 '19 21:07 alaxalves

for sure push to unstable! Thanks!

On Tue, Jul 9, 2019 at 5:29 PM Álax de Carvalho Alves < [email protected]> wrote:

Ah, interesting. Would upgrading to Ruby 2.5 be its own PR perhaps, that could be done before Rails 6? … <#m_-5784711317799686700_> On Tue, Jul 9, 2019 at 12:12 PM Jeffrey Warren @.> wrote: Hi @alaxalves https://github.com/alaxalves - @icarito https://github.com/icarito noted that Rails 6 is currently beyond Debian stable's version, and i was wondering if we should start with a PR that addresses deprecations and warnings without actually initiating the 6.0 upgrade just yet. Do we have an idea of Debian stable's schedule? I just want to be careful about this and think well ahead, and I don't quite have all the info to provide good input yet. Thanks so much! On Tue, Jul 9, 2019 at 12:08 PM Álax de Carvalho Alves < @.> wrote: > Fixes #603 https://github.com/publiclab/mapknitter/issues/603 <#603 https://github.com/publiclab/mapknitter/issues/603> (<=== > Add issue number here) > > Make sure these boxes are checked before your pull request (PR) is ready > to be reviewed and merged. Thanks! > > - PR is descriptively titled and links the original issue above > - tests pass -- look for a green checkbox a few minutes after > opening your PR -- or run tests locally with rake test > - code is in uniquely-named feature branch and has no merge conflicts > > - screenshots/GIFs are attached in case of UI updation > - ask @publiclab/mapknitter-reviewers https://github.com/orgs/publiclab/teams/mapknitter-reviewers for help, in a comment below > > We're happy to help you get this ready -- don't be afraid to ask for > help, and don't be discouraged if your tests fail at first! > > If tests do fail, click on the red X to learn why by reading the logs. > > Please be sure you've reviewed our contribution guidelines at

https://publiclab.org/contributing-to-public-lab-software > > Thanks! > ------------------------------ > You can view, comment on, or merge this pull request online at: > > #824 https://github.com/publiclab/mapknitter/pull/824 > Commit Summary > > - Bumping rails version > > File Changes > > - M Gemfile > https://github.com/publiclab/mapknitter/pull/824/files#diff-0 (4) > - M Gemfile.lock > https://github.com/publiclab/mapknitter/pull/824/files#diff-1 (131) > > Patch Links: > > - https://github.com/publiclab/mapknitter/pull/824.patch

  • https://github.com/publiclab/mapknitter/pull/824.diff > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <#824 https://github.com/publiclab/mapknitter/pull/824?email_source=notifications&email_token=AAAF6J6XGCTGN7NXDOO4KJTP6SZWVA5CNFSM4H7HD3Y2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G6ESRFQ>, or mute the thread > https://github.com/notifications/unsubscribe-auth/AAAF6J7RBR5CLPG4LNUPQFLP6SZWVANCNFSM4H7HD3YQ . >

Yes, I could open a MR upgrading to latest ruby. BTW can I push Rails 5 to unstable?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/mapknitter/pull/824?email_source=notifications&email_token=AAAF6J3DE2OH6RSNXDETANDP6T5PJA5CNFSM4H7HD3Y2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZRRXPA#issuecomment-509811644, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAF6J3MHHPWUQEE6UXKHETP6T5PJANCNFSM4H7HD3YQ .

jywarren avatar Jul 09 '19 21:07 jywarren

Codecov Report

Merging #824 into development will decrease coverage by 0.82%. The diff coverage is 73.33%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development     #824      +/-   ##
===============================================
- Coverage        74.03%   73.20%   -0.83%     
===============================================
  Files               40       40              
  Lines             1398     1396       -2     
===============================================
- Hits              1035     1022      -13     
- Misses             363      374      +11     
Impacted Files Coverage Δ
lib/extensions.rb 0.00% <ø> (ø)
lib/extensions/action_view.rb 0.00% <ø> (ø)
lib/extensions/action_view/helpers.rb 0.00% <ø> (ø)
...extensions/action_view/helpers/asset_tag_helper.rb 0.00% <0.00%> (ø)
app/controllers/front_ui_controller.rb 74.28% <60.00%> (-4.51%) :arrow_down:
lib/not_at_origin_validator.rb 85.71% <80.00%> (-14.29%) :arrow_down:
app/controllers/comments_controller.rb 100.00% <100.00%> (ø)
app/controllers/export_controller.rb 90.90% <100.00%> (ø)
app/controllers/maps_controller.rb 85.47% <100.00%> (-7.70%) :arrow_down:
app/models/map.rb 93.54% <100.00%> (ø)
... and 11 more

codecov[bot] avatar Jul 11 '19 19:07 codecov[bot]

@kaustubh-nair If we want to upgrade to Rails 6 is highly recommended to use Webpacker. We should not revert as in 730774c. Actually we should try to integrate it properly by deprecating Sprockets usage. Please check out the following: https://www.botreetechnologies.com/blog/introducing-jquery-in-rails-6-using-webpacker https://medium.com/@coorasse/goodbye-sprockets-welcome-webpacker-3-0-ff877fb8fa79

alaxalves avatar Jul 21 '19 01:07 alaxalves

@alaxalves I understand that. I just wanted to make sure everything is working properly before integrating webpacker. Webpacker was not working anyway so no harm in anything. We can add it properly now. The problem is the installation files are not being loaded after installing the gem. Running bundle exec rake webpacker:install doesn't work. Let's install it first before making changes to the code

kaustubh-nair avatar Jul 21 '19 06:07 kaustubh-nair

@kaustubh-nair I think it's time to rebase this with development, before https://github.com/publiclab/mapknitter/pull/805 gets merged.

alaxalves avatar Aug 07 '19 18:08 alaxalves

@alaxalves I merged development here but there is some syntax error in app/views/front_ui/index.html.erb which I can't figure out.

kaustubh-nair avatar Aug 09 '19 10:08 kaustubh-nair

This occurs even after I copied front_ui/index.html.erb from development..weird

kaustubh-nair avatar Aug 09 '19 10:08 kaustubh-nair

Thanks, I'll check it out. How's system tests on Rails 5 doing @kaustubh-nair, do you need any help?

alaxalves avatar Aug 09 '19 17:08 alaxalves

@alaxalves from your comment "setting Webpacker with Rails 6.0.0 on #824 ?? I'm getting trouble trying to get the assets to precompile along with Webpack, since we dropped Sprockets."

What is the problem trying to fix and how can I reproduce it? If its referring to paper trail I think @jywarren has resolved this! I can link the PR if needed

sashadev-sky avatar Aug 11 '19 02:08 sashadev-sky

@alaxalves from your comment "setting Webpacker with Rails 6.0.0 on #824 ?? I'm getting trouble trying to get the assets to precompile along with Webpack, since we dropped Sprockets."

What is the problem trying to fix and how can I reproduce it? If its referring to paper trail I think @jywarren has resolved this! I can link the PR if needed

Thx for your input @sashadev-sky. You reproduce it by running rails assets:precompile. If you use docker you have to rebuild your image, since we changed the ruby version. If u use RVM or similar you have to use ruby 2.6.3. If you're able to get the assets to precompile it would be great, because we would be using the newest of the newest and Mapknitter would be one the first projects in the world to fully deprecate Sprockets and fully use Webpacker(For JS, SCSS and images), a huge upgrade BTW. I have changed the entire directory structure for assets, as you'll notice. You'll get more info on the Webpacker gem page. Maybe @jywarren could give us help on this thing too. If this takes too much time or anything like this, I think the best option is dropping this Webpacker integration for now, and set Sprockets back again(since it was working fine and all). Then get Rails 6 stable and open up an issue regarding this Webpacker thing or anything like it. I have been trying to get those assets precompiled for the entire past week, but no success since I'm not very into the Rails' asset pipeline. Maybe we could set an ending date to try this, since the end of GSoC is coming to an end and I'd like the deliver something stable for u guys. What do you think? @jywarren @sashadev-sky

alaxalves avatar Aug 12 '19 12:08 alaxalves

Gosh, i mean webpacker instead of sprockets sounds really nice. It's hard to believe Sprockets is still being widely used in Rails, but many of the asset pipeline components seem brittle when we try to upgrade them (like the Yarn integration), in my experience. I think it's totally OK to split them, and defer to you on this.

Indeed although webpacker would be really nice, and i totally appreciate your work on it, there are other issues I feel are more urgent - like fixing our coverage tracking (codecov or otherwise) and getting system tests in place to help us merge more JS dependabot updates. So, I still defer, but those are the things in mind for me.

jywarren avatar Aug 15 '19 19:08 jywarren

Hi, @alaxalves -- this is so exciting! Did you have a chance to look into the Debian Rails 6 schedule, or do some thinking/planning on the potential issues related to getting ahead of Debian? Let's also ping @icarito on this topic!

jywarren avatar Aug 20 '19 20:08 jywarren

@icarito @jywarren According to this link they have only mapped the upcoming functionalities for Rails 6. But I have found no info on release dates. @arthurbdiniz Do you have any info on this?

alaxalves avatar Aug 20 '19 20:08 alaxalves

@icarito @jywarren According to this link they have only mapped the upcoming functionalities for Rails 6. But I have found no info on release dates. @arthurbdiniz Do you have any info on this?

Hi everyone, I did some research here and I have some information for you guys.

The current rails version on Debian is 5.2.2. And all this information can be found on https://tracker.debian.org/pkg/rails

So I saw that rails 6.0.0 still not stable yet looking at https://github.com/rails/rails/releases The latest stable is 5.2.3 and the Debian package maintainer is already in the process of upgrading, see https://salsa.debian.org/ruby-team/rails.

To the maintainer start the packaging of the rails 6.0.0 first this version needs to be on stable.

Since rails are within the Debian Ruby ​​Team and when rails come to a new stable release the maintainer is usually advised to make a new version of the package.

In case the maintainer disappears and show no sign of the new version, there are two ways to contact, by sending an email to the team list [email protected] or sending an email directly to the maintainer Utkarsh Gupta [email protected], which is my friend 😄, showing interest in packaging the new version.

⚠️ Remembering that we at Debian do as volunteer work and I recommend waiting a while before sending messages to the maintainer.

Extra

You can also find him on Debian IRC, the hostname is irc.debian.org which is an alias for irc.oftc.net on channel #debian-ruby or directly to him with the nickname utkarsh2102[m]

Hope this helps!

arthurbdiniz avatar Aug 21 '19 03:08 arthurbdiniz

@icarito @jywarren According to this link they have only mapped the upcoming functionalities for Rails 6. But I have found no info on release dates. @arthurbdiniz Do you have any info on this?

Hi everyone, I did some research here and I have some information for you guys.

The current rails version on Debian is 5.2.2. And all this information can be found on https://tracker.debian.org/pkg/rails

So I saw that rails 6.0.0 still not stable yet looking at https://github.com/rails/rails/releases The latest stable is 5.2.3 and the Debian package maintainer is already in the process of upgrading, see https://salsa.debian.org/ruby-team/rails.

To the maintainer start the packaging of the rails 6.0.0 first this version needs to be on stable.

Since rails are within the Debian Ruby ​​Team and when rails come to a new stable release the maintainer is usually advised to make a new version of the package.

In case the maintainer disappears and show no sign of the new version, there are two ways to contact, by sending an email to the team list [email protected] or sending an email directly to the maintainer Utkarsh Gupta [email protected], which is my friend , showing interest in packaging the new version.

Remembering that we at Debian do as volunteer work and I recommend waiting a while before sending messages to the maintainer.

Extra

You can also find him on Debian IRC, the hostname is irc.debian.org which is an alias for irc.oftc.net on channel #debian-ruby or directly to him with the nickname utkarsh2102[m]

Hope this helps!

Thx a lot my dude! This was super helpful! Check this out @jywarren @icarito

alaxalves avatar Aug 21 '19 12:08 alaxalves

Thank you so much, super helpful! Echoing something from @alaxalves from our chatroom:

Rails 6 has just been shipped I think we'll soon have it packed on Debian I'll update the merge https://edgeguides.rubyonrails.org/6_0_release_notes.html https://weblog.rubyonrails.org/2019/8/15/Rails-6-0-final-release/

😄

jywarren avatar Aug 21 '19 15:08 jywarren

Hi @alaxalves has there been any updates on the Debian release?

kaustubh-nair avatar Jan 20 '20 16:01 kaustubh-nair

Hi @alaxalves has there been any updates on the Debian release?

Not yet, last pkg release has been for Rails 5.2.3 on October 2019.

alaxalves avatar Jan 20 '20 19:01 alaxalves

@jywarren Good news, seems like we're close to a stable Rails 6.0 package. I'll make sure to update this ASAP

alaxalves avatar Mar 28 '20 23:03 alaxalves