Skip to content
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

Upgrade Rails to 6.x #956

Closed
t3k4y opened this issue Oct 13, 2022 · 8 comments · Fixed by #979
Closed

Upgrade Rails to 6.x #956

t3k4y opened this issue Oct 13, 2022 · 8 comments · Fixed by #979

Comments

@t3k4y
Copy link
Contributor

t3k4y commented Oct 13, 2022

Foodsoft urgently needs an Rails upgrade since 5.2 is not supported anymore.
(see https://endoflife.date/rails )
Rails 6 will end soon so it will be only an intermediate step.

See also issue on ruby-version: #939

@t3k4y
Copy link
Contributor Author

t3k4y commented Oct 13, 2022

In context of our project for further developing foodsoft ( https://prototypefund.de/project/weiterentwicklung-von-foodsoft/ ) we are currently working on an pull request solving this issue.

Best wishes, T.

@paroga
Copy link
Member

paroga commented Oct 13, 2022

100% agree. i did the update from 4 to 5, but there were a lot of incompatibilities, which need (a) code changes and (b) extensive manual testing (since the test coverage is not super high). I'm looking forward to merging the tests from the yksflip fork into master.

IMHO we should "directly" upgrade to the most recent rails version (similar to my 4.2 to 5.2 upgrade commits)

Do you have people who are willing to do the manual testing?

@t3k4y
Copy link
Contributor Author

t3k4y commented Oct 25, 2022

Hi paroga,
thank you for your superfast reply!

We are currently working on an upgrade to Rails 7.x
It seems pretty straight forward except the apivore incompatibility mentioned in #939 (comment)
Our approach is to rewrite the specs and swagger-file using the rswag-gem ( https://github.com/rswag/rswag )

In the next days @yksflip will start a pull request with the test code we have written to raise the coverage making the upgrade a little more save.

We are working together with a foodcoop willing to do manual testing in the field.

Best wishes,
T.

@Viehlieb
Copy link
Contributor

Viehlieb commented Nov 3, 2022

Hey folks,
The Upgrade to rails 6.1 looked good and as @t3k4y mentioned, we are directly head to 7.0 and ruby 2.7.2.
Currently we are facing issues with the

gem 'twitter-bootstrap-rails'

This gem supports rails 7, but comes with bootstrap 3, which makes code changes necessary anyways (for instance navbar and modal changed behavior).

What do you think about using a different gem and go to bootstrap 5 straight away?
Drawback would be a different way of including the bootstrap framework due to asset pipeline changes ( as part of rails upgrade).

regards
viehlieb

@paroga
Copy link
Member

paroga commented Nov 3, 2022

I'd choose whatever gem is the most compatible and requires the least code changes. IMO you could choose whatever you think fits the most and you feel comfortable with, if you can ensure that it does not break anything of the existing code and you adopt the code of the whole repository to the new gem.

PS: If you have already a working 6.1 version, it would be great to create separate pull request for the update to 6.0 and 6.1, so we can review them already. There are probably some code changes like 3ffdb42 or the switch to rswag, which can be integrated even before updating to a newer rails version.

@Viehlieb
Copy link
Contributor

Viehlieb commented Jan 9, 2023

We froze the version of the bootstrap gem since there are the least code changes necessary.

We decided to go straight for 7 and got separate rails 7 + ruby 2.7 and rswag branches, that should not conflict with the intermediate steps already merged to the master branch.

Our future development and the PRs will be based on these changes. Currently we are trying to get a foodcoop to test our changes. We are wondering how we could work together with you until we can get the upgrade upstream.

The funding will go until the end of February. Until then we can manage PRs. For further development we will use the upgraded foodsoft as base for features.

best
v.

@kidhab
Copy link
Contributor

kidhab commented Feb 6, 2023

How can we support this tasks?

There are two merge requests connected to this task: #970 and #972.

The group working on improving thet Foodsoft already did an version upgrade for Ruby and Rails in their own repository.

@yksflip
Copy link
Member

yksflip commented Feb 10, 2023

this would be my proposed steps to get the upgrade done:

  1. controller tests Controller Tests #970 Add home controller test #972
  2. rswag api tests Replace apivore with rswag for api tests #969
  3. ruby, rails upgrade
  4. javacript importmaps

Until these changes are merged we maintain a develop branch with the mentioned changes and use it as a base for further feature developments. We test all this merged together in this demo branch.

Happy to chat about any ideas how we could get some more traction on this whole thing :)

One more big todo is a bootstrap upgrade (v2 -> v5)

@yksflip yksflip linked a pull request May 6, 2023 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants