-
Notifications
You must be signed in to change notification settings - Fork 7
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
[#153119909] Upgrade Ruby to 2.5 #164
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bandesz
changed the title
[WIP] [#153119909] Upgrade Ruby to 2.5
[#153119909] Upgrade Ruby to 2.5
May 23, 2018
Ruby 2.2 reached EOL on 2018-03-31 (#1), so we decided to migrate to the latest stable version.
Ruby 2.2 reached EOL on 2018-03-31 (#1), so we decided to migrate to the latest stable version.
We want to set the Ruby version for rvm so people using it will be automatically switched to the right Ruby version.
Ruby 2.2 reached EOL on 2018-03-31 (#1), so we decided to migrate to the latest stable version.
We have to upgrade govuk-lint as older versions didn't support Ruby 2.5. Thanks to the upgrade we now got new style check violations but we decided to ignore them (at least for now). The errors were: ``` Offenses: vagrant/Vagrantfile:28:1: W: Lint/MissingCopEnableDirective: Re-enable Metrics/BlockLength cop with # rubocop:enable after disabling it. ^ manifests/runtime-config/spec/support/manifest_helpers.rb:77:14: C: Performance/HashEachMethods: Use each_value instead of each. (https://github.com/bbatsov/ruby-style-guide#hash-each) object.each { |_k, v| deep_freeze(v) } ^^^^ manifests/concourse-manifest/spec/support/manifest_helpers.rb:75:14: C: Performance/HashEachMethods: Use each_value instead of each. (https://github.com/bbatsov/ruby-style-guide#hash-each) object.each { |_k, v| deep_freeze(v) } ^^^^ manifests/shared/spec/secret_generator_spec.rb:40:56: C: Performance/RegexpMatch: Use match? instead of =~ when MatchData is not used. skip "No sha support in crypt(3) on Mac OS X" if RUBY_PLATFORM =~ /darwin/ ^^^^^^^^^^^^^^^^^^^^^^^^^ manifests/shared/lib/secret_generator.rb:108:10: C: Style/NumericPredicate: Use val.negative? instead of val < 0. (https://github.com/bbatsov/ruby-style-guide#predicate-methods) if val < 0 ^^^^^^^ manifests/shared/lib/secret_generator.rb:111:13: C: Style/NumericPredicate: Use first_byte.negative? instead of first_byte < 0. (https://github.com/bbatsov/ruby-style-guide#predicate-methods) elsif first_byte < 0 ^^^^^^^^^^^^^^ manifests/bosh-manifest/spec/support/manifest_helpers.rb:86:14: C: Performance/HashEachMethods: Use each_value instead of each. (https://github.com/bbatsov/ruby-style-guide#hash-each) object.each { |_k, v| deep_freeze(v) } ^^^^ ``` We added a matching rubocop:enable to the vagrant/Vagrantfile as we don't want to disable Lint/MissingCopEnableDirective.
We decided to use the same (latest) Ruby version everywhere. We update the following Docker images to the latest builds which now use Ruby 2.5: - bosh-cli-v2 - bosh-shell - bosh - self-update-pipelines
The mentioned PR and the FIXME comment was merged, so we don't need this custom config anymore.
samcrang
force-pushed
the
upgrade_ruby_153119909
branch
from
May 31, 2018 10:57
d57e768
to
83a90dc
Compare
I've updated the commit with real docker images. |
samcrang
added a commit
that referenced
this pull request
May 31, 2018
[#153119909] Upgrade Ruby to 2.5
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Update Ruby version to 2.5
We decided to use the same (latest) Ruby version everywhere. We still used 2.2 in multiple places which reached EOL on 2018-03-31 [1], so we decided to migrate to the latest stable version.
We had to upgrade govuk-lint as older versions didn't support Ruby 2.5. Thanks to the upgrade we've got new style check violations but we decided to ignore them (at least for now), as this would unnecessarily blow up the story and increase the risk.
[1] https://www.ruby-lang.org/en/downloads/branches/
How to review
Create a BOSH+Concourse env from this branch:
Review [#153119909] Upgrade Ruby to 2.5 paas-cf#1366
Run the create-bosh-concourse pipeline again on this env or on your existing env.
Test
DEPLOY_ENV=... make dev bosh-cli
Test
DEPLOY_ENV=... AWS_ACCOUNT=dev ./scripts/bosh vms
Destroy the env
How to merge
❗️ The PR contains a WIP commit which needs to be updated with the final Docker image tags.
Who can review
Not me.