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

ROR Upgrade - Ruby 3 / Rails 7 #2602

Merged
merged 16 commits into from
Jun 1, 2022

Conversation

RajeshPaul38
Copy link
Contributor

Description

[Please describe what this change achieves]

Issues Resolved

[List any existing issues this PR resolves, or any Discourse or
StackOverflow discussions that are relevant]

Check List

@RajeshPaul38 RajeshPaul38 requested review from a team as code owners February 14, 2022 12:36
@netlify
Copy link

netlify bot commented Feb 14, 2022

👷 Deploy Preview for chef-supermarket processing.

Name Link
🔨 Latest commit 8ba4a3a
🔍 Latest deploy log https://app.netlify.com/sites/chef-supermarket/deploys/6297077ca0e5d500087bdbd1

@dheerajd-msys
Copy link
Contributor

Please check the conflicts @RajeshPaul38

@RajeshPaul38 RajeshPaul38 force-pushed the rajeshpaul38/upgrade-ROR/INFSUS-36 branch from 0ba4dbd to 6de1e66 Compare February 17, 2022 18:51
@RajeshPaul38
Copy link
Contributor Author

@dheerajd-msys it's a WIP PR. I've resolved the conflicts.

@RajeshPaul38 RajeshPaul38 force-pushed the rajeshpaul38/upgrade-ROR/INFSUS-36 branch from 9ed72e6 to a365664 Compare March 2, 2022 13:08
@RajeshPaul38
Copy link
Contributor Author

@RajeshPaul38 RajeshPaul38 force-pushed the rajeshpaul38/upgrade-ROR/INFSUS-36 branch from e153748 to 109b311 Compare March 14, 2022 12:40
@antima-gupta antima-gupta force-pushed the rajeshpaul38/upgrade-ROR/INFSUS-36 branch from 109b311 to c648882 Compare May 11, 2022 06:05
@RajeshPaul38 RajeshPaul38 requested a review from a team as a code owner May 16, 2022 14:03
@RajeshPaul38
Copy link
Contributor Author

@RajeshPaul38 RajeshPaul38 force-pushed the rajeshpaul38/upgrade-ROR/INFSUS-36 branch from a7f2143 to c1d8403 Compare May 16, 2022 14:35
@RajeshPaul38
Copy link
Contributor Author

@RajeshPaul38 RajeshPaul38 changed the title WIP: Ruby on Rails Upgrade Ruby on Rails Upgrade May 16, 2022
@RajeshPaul38
Copy link
Contributor Author

@msys-sgarg
Copy link
Contributor

Please resolve conflicts then we are good to go i think

@RajeshPaul38 RajeshPaul38 force-pushed the rajeshpaul38/upgrade-ROR/INFSUS-36 branch from c1d8403 to 2ad66d6 Compare May 19, 2022 05:42
@RajeshPaul38
Copy link
Contributor Author

Please resolve conflicts then we are good to go i think

Merge conflicts resolved. Pls proceed

@RajeshPaul38 RajeshPaul38 changed the title Ruby on Rails Upgrade ROR Upgrade - Ruby 3 / Rails 7 May 19, 2022
@RajeshPaul38 RajeshPaul38 force-pushed the rajeshpaul38/upgrade-ROR/INFSUS-36 branch from 2ad66d6 to 3289218 Compare May 26, 2022 14:59
Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
…ngine

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
…ware

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
RajeshPaul38 and others added 9 commits June 1, 2022 11:58
Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
* upgrade to rails 7.0.1 gem; updated all gems

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* explicit require s3_config in initializer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* upgrade rails version to 7.0.2 in gemfile

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* file path concatenation syntax fix

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Rails 7.0.2 upgrade completed with all configuration changes and schema.rb changes as per rails 7

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* lib utils path added in autoload paths in application config

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* missing template fix in render in spec

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
* Added json format responder for not_found cases in application controller

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* test view rendering spec fix

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* replaced paperclip with kt-paperclip

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* changed cache_store to memory_store from null_store for test env

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Fix issue: Psych::DisallowedClass: Tried to load unspecified class: Time

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* explicitly specified the template name for render to fix: ActionView::MissingTemplate

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Specified template and format for render in specs

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Added sprockets-rails in fieri.gemspec

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* upgraded kt-paperclip version to 7 and rails patch version upgrade to 7.0.2.2

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* lint errors fix

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* passing template_path in it_behave_like for shared example

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed unnecessary whitelisting of Time, Symbol in Psych; Changed delayed mailer implementaion: sending simple objects instead of compless objects in params of methods invoked in an async manner

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Added back Time and Symbol in Psych whitelist

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* fixed mailer signature

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed complex atrributes and replaced with simple attributes

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* replaced complex parameter to primitive datatype parameter for delayed mailer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* rolled back argument change for CollaboratorMailer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Gemfile cleanup

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* using variable for template_path instead of string literal

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
#2612)

* added ruby in omnibus softwares for support of 3.1.0

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* disabling version condition as it's breaking for ruby 3.1.0

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added patch condition for ruby 3.1.0

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* going to ruby version 3.0.3

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
…tion

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>
* Smriti/merge dependabot pr infus 173 (#2730)

* Bump capybara from 3.36.0 to 3.37.1 in /src/supermarket

Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.36.0 to 3.37.1.
- [Release notes](https://github.com/teamcapybara/capybara/releases)
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md)
- [Commits](teamcapybara/capybara@3.36.0...3.37.1)

---
updated-dependencies:
- dependency-name: capybara
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump omnibus from `27c37fc` to `63be4f1` in /omnibus

Bumps [omnibus](https://github.com/chef/omnibus) from `27c37fc` to `63be4f1`.
- [Release notes](https://github.com/chef/omnibus/releases)
- [Commits](chef/omnibus@27c37fc...63be4f1)

---
updated-dependencies:
- dependency-name: omnibus
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump rails from 6.1.5.1 to 6.1.6 in /src/supermarket/engines/fieri

Bumps [rails](https://github.com/rails/rails) from 6.1.5.1 to 6.1.6.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](rails/rails@v6.1.5.1...v6.1.6)

---
updated-dependencies:
- dependency-name: rails
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump rails from 6.1.5.1 to 6.1.6 in /src/supermarket

Bumps [rails](https://github.com/rails/rails) from 6.1.5.1 to 6.1.6.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](rails/rails@v6.1.5.1...v6.1.6)

---
updated-dependencies:
- dependency-name: rails
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Merge conflicts resolved

Signed-off-by: smriti <sgarg@msystechnologies.com>

* Bump nokogiri from 1.13.5 to 1.13.6 in /src/supermarket

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.5 to 1.13.6.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/v1.13.6/CHANGELOG.md)
- [Commits](sparklemotion/nokogiri@v1.13.5...v1.13.6)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump version to 5.1.29 by Chef Expeditor

Obvious fix; these changes are the result of automation not creative thinking.

* upgraded bunder to '2.3.6' and ruby '3.0.2' and all gems in gemfile

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* upgraded to ruby 3.1.0; made rubyracer gem conditional for mac

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* updated all reference of ruby 2.7.5 to 3.1.0; updated gems in fieri engine

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* replaced therubyracer with mini_racer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* using bundler version 2.3.6

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added net-smtp gem

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* using 3.0.3 ruby as this is the latest supported ruby in omnibus-software

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Upgrading to ruby 3.1.0 and gem upgrades

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added net-smtp in gemfile

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Rails upgrade 7.0.2

* upgrade to rails 7.0.1 gem; updated all gems

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* explicit require s3_config in initializer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* upgrade rails version to 7.0.2 in gemfile

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* file path concatenation syntax fix

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Rails 7.0.2 upgrade completed with all configuration changes and schema.rb changes as per rails 7

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* lib utils path added in autoload paths in application config

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* missing template fix in render in spec

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Unit testcases fix

* Added json format responder for not_found cases in application controller

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* test view rendering spec fix

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* replaced paperclip with kt-paperclip

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* changed cache_store to memory_store from null_store for test env

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Fix issue: Psych::DisallowedClass: Tried to load unspecified class: Time

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* explicitly specified the template name for render to fix: ActionView::MissingTemplate

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Specified template and format for render in specs

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Added sprockets-rails in fieri.gemspec

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* upgraded kt-paperclip version to 7 and rails patch version upgrade to 7.0.2.2

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* lint errors fix

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* passing template_path in it_behave_like for shared example

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed unnecessary whitelisting of Time, Symbol in Psych; Changed delayed mailer implementaion: sending simple objects instead of compless objects in params of methods invoked in an async manner

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Added back Time and Symbol in Psych whitelist

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* fixed mailer signature

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed complex atrributes and replaced with simple attributes

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* replaced complex parameter to primitive datatype parameter for delayed mailer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* rolled back argument change for CollaboratorMailer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Gemfile cleanup

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* using variable for template_path instead of string literal

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Omnibus build fix for ROR upgrade of supermarket to ruby 3 and rails 7 (#2612)

* added ruby in omnibus softwares for support of 3.1.0

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* disabling version condition as it's breaking for ruby 3.1.0

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added patch condition for ruby 3.1.0

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* going to ruby version 3.0.3

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* remove ruby software definition as we can use omnibus software definition

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Added mini_racer gem for precompilation

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* replaced ruby 2.7 with 3.0.3

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* replaced mini racer with sprockets

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Added mini_racer gem

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* lint error fix

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* chefspec issue fix by hash syntax correction

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* cookstyle linter error fix

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* check downgrading mini_racer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added nodejs-binary as omnibus dependency and removed mini_racer gem

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* using nodejs instead of nodejs-binary as omnibus dependency

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* changed nodejs-binary version

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added back mini_racer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed patch version of ruby, just using 3.0 as version

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* upgraded mini racer from 0.3.1 to 0.4.0 in omnibus-supermarket cookbook

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* specified complete ruby version for cookbook testing workflow

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* specified patch version for ruby 3

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed unnecessary freeze call

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added nodejs-binary back

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed mini_racer and exec js gem

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added gem lock

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* using latest version of mini_racer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed version constraint for mini_racer

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added mini_racer platforms specific

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added nodejs dependency for supermarket for js runtime

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added python software def as nodejs depends on it

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removing python dependency from nodejs

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed nodejs dependency

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added asset related gems in a group in gemfile

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* migration file made compatible with ruby 3

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* wrong number of arguments for index_exists? - fix

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* changed add_index statement to make it compatible with rails 7

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* gemfile cleanup

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed mini_racer from omnibus-software cookbook

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* added retry statement for all the cookbook using runit cookbook

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* changed the source of runit cookbook

Signed-off-by: Rajesh Paul <rajesh.093038@gmail.com>
Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* removed unnecessary dependency

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* Revert "added retry statement for all the cookbook using runit cookbook"

This reverts commit 9c661fd.

* Revert "changed the source of runit cookbook"

This reverts commit d2639b3.

* changed ruby version to 3.0

Signed-off-by: smriti <sgarg@msystechnologies.com>

* rebase with main.

Signed-off-by: antima-gupta <agupta@msystechnologies.com>

* Updated brakeman version to 5.0.4.

Signed-off-by: antima-gupta <agupta@msystechnologies.com>

* changed ruby version to 3.0

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* changed ruby version to 3.0 in github workflows

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

* test changes

Signed-off-by: Rajesh Paul <rajesh.paul@progress.com>

Co-authored-by: Smriti Garg <78783383+msys-sgarg@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Chef Expeditor <chef-ci@chef.io>
Co-authored-by: Rajesh Paul <rajesh.093038@gmail.com>
Co-authored-by: antima-gupta <agupta@msystechnologies.com>
Co-authored-by: smriti <sgarg@msystechnologies.com>
@RajeshPaul38 RajeshPaul38 force-pushed the rajeshpaul38/upgrade-ROR/INFSUS-36 branch from 3289218 to 8ba4a3a Compare June 1, 2022 06:30
@sonarcloud
Copy link

sonarcloud bot commented Jun 1, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
1.8% 1.8% Duplication

@saghoshprogress saghoshprogress merged commit 62ec0d5 into main Jun 1, 2022
@saghoshprogress saghoshprogress deleted the rajeshpaul38/upgrade-ROR/INFSUS-36 branch June 1, 2022 07:14
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 this pull request may close these issues.

4 participants