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

jcroteau/APPEALS-26725 Update to Rails 6.0.Z #19262

Closed
wants to merge 62 commits into from

Conversation

jcroteau
Copy link
Contributor

Resolves https://jira.devops.va.gov/browse/APPEALS-26725

Description

Upgrade Steps

  • Updated Bundler to 2.4.Z: bundle update --bundler
  • Updated rails and other necessary dependencies in Gemfile:
    • gem "rails", "6.0.6.1"
    • gem "activerecord-oracle_enhanced-adapter", "~> 6.0.0"
  • Updated Gemfile.lock
    • bundle update rails activerecord-oracle_enhanced-adapter
  • Generated configuration changes and new_framework_defaults_6_0.rb:
    • bin/rails app:update
    • Note: You can reference RailsDiff to preview configuration changes between versions.
  • Removed bin/rails app:update-generated DB migration for ActiveStorage, since we are not using ActiveStorage.
  • Inspected bin/rails app:update-generated config changes and decided what to keep and what to replace.
  • Moved new_framework_defaults_6_0.rb settings into config/application.rb and overrided those where necessary.
  • Added configuration for activerecord-oracle_enhanced-adapter to preserve pre-existing behavior after upgrading the gem.

Noteworthy Changes

activerecord-oracle_enhanced-adapter 6.0.6

  • Changed default value of default_sequence_start_value from 10000 to 1 #1636
    • Note: We are overriding this value to 10_000 to maintain the pre-existing behavior.
  • Supports longer identifiers for Oracle database 12.2 or higher #1703 #1705
  • Introduces config setting use_shorter_identifier #1707
    • Note: If we need or want to keep using shorter identifiers, we will have to set this setting to true.

Testing Plan

# TODO: Link to Caseflow Regression Testing Plan

  • For feature branches merging into master: Was this deployed to UAT?

Backend

Best practices

Code Documentation Updates

  • Add or update code comments at the top of the class, module, and/or component.

Tests

Test Coverage

Did you include any test coverage for your code? Check below:

  • RSpec
  • Jest
  • Other

Code Climate

Your code does not add any new code climate offenses? If so why?

  • No new code climate issues added

This will ensure cleaner diffs when generating config file changes during Rails upgrades.
CVE-2019-5420 was fixed in Rails 5.2.2.1, negating the need for this workaround.

For further details, see https://nvd.nist.gov/vuln/detail/CVE-2019-5420.
 This will ensure cleaner diffs when generating config file changes during Rails upgrades.
This will ensure cleaner diffs when generating config file changes during Rails upgrades.
We were already effectively assuming the default value (true) for this setting, so we can omit it.
…essage_encryption'

We can migrate this setting to the default (true) after the 5.2.8.1 upgrade is verified and stable in production.
…from_forgery'

Migrating to the default value (true) will require a non-trivial refactoring of several controllers
…olean_as_integer'

Migrating to the default value (true) will first require a migration of old values in any sqlite3 boolean columns to the new values.
Currently, 'demo_vacols' is the only sqlite3 database affected.
We can safely assume the default (true) for this setting.
We may notice an initial spike in requests since all cached assets will be invalided.
…s_ids'

We're not currently using 'form_with' helper anywhere, so we can safely assume the default.
…ticated_cookie_encryption'

We can migrate to the default value (true) after the upgrade is verified and stable in production.
'config.serve_static_files' was replaced by 'config.public_file_server.enabled' in Rails 5.0
This setting was accidentally removed while reconciling 'bin/rais app:update' changes.
Also needed to update 'activerecord-oracle_enhanced-adapter' simultaneously (to ~> 6.0.0)
Since 'bin/app rails:update' frequently modifies these files and doesn't generally abide by our style guide, lets exclude them from linter checks.
We're not currently using ActionCable, so changes to this file are inconsequential.
Also override Zeitwerk autoloading default to preserve classic behavior.
We must eventually transition to Zeitwerk when upgrading to Rails 7.0.
…d-oracle_enhanced-adapter'

oracle-enhanced v6.00 changes the default sequence start value from 10,000 to 1:
  Release Notes: https://github.com/rsim/oracle-enhanced/blob/v6.0.6/History.md#600--2019-08-17
  Related PR: rsim/oracle-enhanced#1636

Preserve the original default value of 10,000
@jcroteau jcroteau closed this Aug 24, 2023
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.

1 participant