Skip to content

Commit

Permalink
feature/APPEALS-46558 - Rails 6.1 upgrade (uat) (#1678)
Browse files Browse the repository at this point in the history
* Removed depreciated 5.2 default represent_boolean_as_integer

* caseflow-commons update - bourbon/neat removal

* Rails gem updated to 6.1.7.4

* app:update bin/rails

* app:update bin/rake

* app:update bin/setup

* app:update bin/spring

* app:update bin/yarn

* app:update config.ru

* app:update application.rb

* app:update config/boot.rb

* app:update config/environment.rb

* app:update config/environments/development.rb

* app:update config/enviroments/production.rb

* app:update config/environments/test.rb

* app:update config/initializers/backtrace_silencers.rb

* app:update config/initializers/filter_parameter_logging.rb

* app:update config/initializers/permissions_policy.rb

* app:update config/puma.rb

* app:update config/routes.rb

* Updated PG gem for postgres adapter

* bourbon/neat code removed

* Bundler version correction

* final newline error fix

* Review changes

* ⬆️ Update `caseflow-commons` dependency to latest ref

Removes `bourbon` and `neat` dependencies.

* Added accidental deletion back in

* 🔥 Remove `uglifier`

During assets precompile in a 'production' environment, we encountered the following error:

  Uglifier::Error: Unexpected token: name (compare1).
  To use ES6 syntax, harmony mode must be enabled with Uglifier.new(:harmony => true).

Per the `uglifier` README:

  UglifyJS only works with ES5. If you need to compress ES6, `ruby-terser` is a better option.

Looking at the Caseflow git history for comparison, it looks like the `uglifier` gem was
removed in favor of using Webpack to perform JS compression via the `UglifyjsWebpackPlugin`.
Later, the `UglifyjsWebpackPlugin` was removed when Webpack v4 incorporated the
`TerserWebpackPlugin` out-of-the-box:
https://github.com/department-of-veterans-affairs/caseflow-efolder/blob/9853eaeb98692099f1e62435de9a4dc08292fa53/client/yarn.lock#L6119

It appears that there may need to be some additional configuration added to the
`webpack.config.js` file in order to leverage the Terser plugin:
https://v4.webpack.js.org/plugins/terser-webpack-plugin/

However, the Caseflow `webpack.config.js` does not include the Terser configuration at this time,
and so, in keeping parity with Caseflow, we will omit this configuration in eFolder as well
and leave it as a future exercise should it be necessary to enact JS compression.

* ⏪️ Restore overrides for `config.action_dispatch.use_authenticated_cookie_encryption` and `config.action_dispatch.use_cookies_with_metadata`

While testing in PreProd, we discovered that, without these cookie config overrides,
re-authentication was broken -- after logging out, a user could not log back in.

Since the default settings are still optional going forward, we can restore these
overrides and devise a solution to migrate cookies later.

For more details, see Jira story APPEALS-54897:

https://jira.devops.va.gov/browse/APPEALS-54897

* PG updated to 1.5.7

* PG regressed from 1.5.7 to 1.1.4 for seperate branches

---------

Co-authored-by: Alec Kagebein <[email protected]>
  • Loading branch information
jcroteau and AKeyframe authored Sep 6, 2024
1 parent f22dc4e commit a5c3f06
Show file tree
Hide file tree
Showing 21 changed files with 217 additions and 169 deletions.
1 change: 0 additions & 1 deletion .scss-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ linters:
properties: []
VendorPrefixes:
enabled: true
identifier_list: bourbon
include: []
exclude: []
ZeroUnit:
Expand Down
7 changes: 3 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ gem "aws-sdk-sqs"
gem "aws-sdk-ec2"
gem "bgs", git: "https://github.com/department-of-veterans-affairs/ruby-bgs.git", ref: "a2e055b5a52bd1e2bb8c2b3b8d5820b1a404cd3d"
gem "bootsnap", require: false
gem "caseflow", git: "https://github.com/department-of-veterans-affairs/caseflow-commons", ref: "716b58caf2116da5fca21c3b3aeea6c9712f3b9d"
gem "caseflow", git: "https://github.com/department-of-veterans-affairs/caseflow-commons", ref: "9bd3635fbd8094d25160669f38d8699e2f1d7a98"
gem "coffee-rails", "> 4.1.0"
gem "connect_vbms", git: "https://github.com/department-of-veterans-affairs/connect_vbms.git", branch: "master"
gem "connect_vva", git: "https://github.com/department-of-veterans-affairs/connect_vva.git", ref: "dfd1aeb2605c1f237f520bcdc41b059202e8944d"
Expand All @@ -29,10 +29,10 @@ gem "newrelic_rpm"
gem "nokogiri", ">=1.10.5"
gem "omniauth-saml-va", git: "https://github.com/department-of-veterans-affairs/omniauth-saml-va", branch: "pek-iam-ssoi"
#gem "omniauth-saml-va", git: "https://github.com/department-of-veterans-affairs/omniauth-saml-va", ref: "fbe2b878c250b14ee996ef6699c42df2c42e41a1"
gem "pg", "~> 0.18", platforms: :ruby
gem "pg", "~> 1.1.0", platforms: :ruby
gem "puma", "5.6.4"
gem "rack-cors", ">= 1.0.4"
gem "rails", "6.0.6.1"
gem "rails", "6.1.7.4"
gem "redis-namespace"
gem "redis-rails", "~> 5.0.2"
gem "redis-semaphore"
Expand All @@ -44,7 +44,6 @@ gem "sentry-raven"
gem "shoryuken", "3.1.11"
gem "therubyracer", platforms: :ruby
gem "turbolinks"
gem "uglifier", ">= 1.3.0"
gem "uswds-rails", git: "https://github.com/18F/uswds-rails-gem.git"
gem "wannabe_bool"
gem "zaru"
Expand Down
172 changes: 83 additions & 89 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,14 @@ GIT

GIT
remote: https://github.com/department-of-veterans-affairs/caseflow-commons
revision: 716b58caf2116da5fca21c3b3aeea6c9712f3b9d
ref: 716b58caf2116da5fca21c3b3aeea6c9712f3b9d
revision: 9bd3635fbd8094d25160669f38d8699e2f1d7a98
ref: 9bd3635fbd8094d25160669f38d8699e2f1d7a98
specs:
caseflow (0.4.8)
aws-sdk-s3
bourbon (= 4.2.7)
d3-rails
jquery-rails
momentjs-rails
neat
rails (>= 4.2.7.1)
redis-namespace
redis-rails
Expand Down Expand Up @@ -100,38 +98,40 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.6.1)
actionpack (= 6.0.6.1)
actioncable (6.1.7.4)
actionpack (= 6.1.7.4)
activesupport (= 6.1.7.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.6.1)
actionpack (= 6.0.6.1)
activejob (= 6.0.6.1)
activerecord (= 6.0.6.1)
activestorage (= 6.0.6.1)
activesupport (= 6.0.6.1)
actionmailbox (6.1.7.4)
actionpack (= 6.1.7.4)
activejob (= 6.1.7.4)
activerecord (= 6.1.7.4)
activestorage (= 6.1.7.4)
activesupport (= 6.1.7.4)
mail (>= 2.7.1)
actionmailer (6.0.6.1)
actionpack (= 6.0.6.1)
actionview (= 6.0.6.1)
activejob (= 6.0.6.1)
actionmailer (6.1.7.4)
actionpack (= 6.1.7.4)
actionview (= 6.1.7.4)
activejob (= 6.1.7.4)
activesupport (= 6.1.7.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.6.1)
actionview (= 6.0.6.1)
activesupport (= 6.0.6.1)
rack (~> 2.0, >= 2.0.8)
actionpack (6.1.7.4)
actionview (= 6.1.7.4)
activesupport (= 6.1.7.4)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.6.1)
actionpack (= 6.0.6.1)
activerecord (= 6.0.6.1)
activestorage (= 6.0.6.1)
activesupport (= 6.0.6.1)
actiontext (6.1.7.4)
actionpack (= 6.1.7.4)
activerecord (= 6.1.7.4)
activestorage (= 6.1.7.4)
activesupport (= 6.1.7.4)
nokogiri (>= 1.8.5)
actionview (6.0.6.1)
activesupport (= 6.0.6.1)
actionview (6.1.7.4)
activesupport (= 6.1.7.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
Expand All @@ -141,28 +141,30 @@ GEM
activemodel (>= 4.1, < 6.2)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
activejob (6.0.6.1)
activesupport (= 6.0.6.1)
activejob (6.1.7.4)
activesupport (= 6.1.7.4)
globalid (>= 0.3.6)
activejob_dj_overrides (0.2.0)
delayed_job
rails (>= 4.2)
activemodel (6.0.6.1)
activesupport (= 6.0.6.1)
activerecord (6.0.6.1)
activemodel (= 6.0.6.1)
activesupport (= 6.0.6.1)
activestorage (6.0.6.1)
actionpack (= 6.0.6.1)
activejob (= 6.0.6.1)
activerecord (= 6.0.6.1)
activemodel (6.1.7.4)
activesupport (= 6.1.7.4)
activerecord (6.1.7.4)
activemodel (= 6.1.7.4)
activesupport (= 6.1.7.4)
activestorage (6.1.7.4)
actionpack (= 6.1.7.4)
activejob (= 6.1.7.4)
activerecord (= 6.1.7.4)
activesupport (= 6.1.7.4)
marcel (~> 1.0)
activesupport (6.0.6.1)
mini_mime (>= 1.1.0)
activesupport (6.1.7.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
akami (1.3.1)
Expand Down Expand Up @@ -195,9 +197,6 @@ GEM
bigdecimal (3.1.8)
bootsnap (1.16.0)
msgpack (~> 1.2)
bourbon (4.2.7)
sass (~> 3.4)
thor (~> 0.19)
brakeman (4.10.1)
builder (3.3.0)
bundler-audit (0.7.0.1)
Expand Down Expand Up @@ -231,7 +230,7 @@ GEM
bigdecimal
rexml
crass (1.0.6)
d3-rails (5.9.2)
d3-rails (7.8.5)
railties (>= 3.1)
database_cleaner (1.8.5)
date (3.3.4)
Expand All @@ -256,8 +255,8 @@ GEM
multipart-post (~> 2)
faraday-net_http (3.0.2)
ffi (1.14.2)
globalid (1.1.0)
activesupport (>= 5.0)
globalid (1.2.1)
activesupport (>= 6.1)
gyoku (1.3.1)
builder (>= 2.1.2)
hashdiff (1.1.0)
Expand Down Expand Up @@ -301,7 +300,7 @@ GEM
net-smtp
makara (0.4.1)
activerecord (>= 3.0.0)
marcel (1.0.2)
marcel (1.0.4)
matrix (0.4.2)
method_source (1.1.0)
mime-types (3.3.1)
Expand All @@ -320,19 +319,17 @@ GEM
multipart-post (2.4.1)
mustermann (1.1.2)
ruby2_keywords (~> 0.0.1)
neat (4.0.0)
thor (~> 0.19)
net-imap (0.4.10)
net-imap (0.4.14)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.4.0.1)
net-smtp (0.5.0)
net-protocol
newrelic_rpm (6.14.0)
nio4r (2.7.0)
nio4r (2.7.3)
nokogiri (1.15.6)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
Expand All @@ -346,7 +343,7 @@ GEM
parallel (1.20.1)
parser (3.0.0.0)
ast (~> 2.4.1)
pg (0.21.0)
pg (1.1.4)
pkcs11 (0.3.3)
pry (0.13.1)
coderay (~> 1.1)
Expand All @@ -366,20 +363,20 @@ GEM
rack
rack-test (2.1.0)
rack (>= 1.3)
rails (6.0.6.1)
actioncable (= 6.0.6.1)
actionmailbox (= 6.0.6.1)
actionmailer (= 6.0.6.1)
actionpack (= 6.0.6.1)
actiontext (= 6.0.6.1)
actionview (= 6.0.6.1)
activejob (= 6.0.6.1)
activemodel (= 6.0.6.1)
activerecord (= 6.0.6.1)
activestorage (= 6.0.6.1)
activesupport (= 6.0.6.1)
bundler (>= 1.3.0)
railties (= 6.0.6.1)
rails (6.1.7.4)
actioncable (= 6.1.7.4)
actionmailbox (= 6.1.7.4)
actionmailer (= 6.1.7.4)
actionpack (= 6.1.7.4)
actiontext (= 6.1.7.4)
actionview (= 6.1.7.4)
activejob (= 6.1.7.4)
activemodel (= 6.1.7.4)
activerecord (= 6.1.7.4)
activestorage (= 6.1.7.4)
activesupport (= 6.1.7.4)
bundler (>= 1.15.0)
railties (= 6.1.7.4)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
Expand All @@ -389,12 +386,12 @@ GEM
loofah (~> 2.21)
nokogiri (~> 1.14)
rails_stdout_logging (0.0.5)
railties (6.0.6.1)
actionpack (= 6.0.6.1)
activesupport (= 6.0.6.1)
railties (6.1.7.4)
actionpack (= 6.1.7.4)
activesupport (= 6.1.7.4)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rake (>= 12.2)
thor (~> 1.0)
rainbow (3.0.0)
rake (13.2.1)
rb-fsevent (0.10.4)
Expand Down Expand Up @@ -511,33 +508,31 @@ GEM
tilt (~> 2.0)
single_cov (1.6.0)
socksify (1.7.1)
sprockets (3.7.2)
sprockets (3.7.3)
base64
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets-rails (3.5.1)
actionpack (>= 6.1)
activesupport (>= 6.1)
sprockets (>= 3.0.0)
statsd-instrument (3.7.0)
strscan (3.1.0)
systemu (2.6.5)
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
ref
thor (0.20.3)
thread_safe (0.3.6)
thor (1.3.1)
tilt (2.0.11)
timecop (0.9.2)
timeout (0.4.1)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.11)
thread_safe (~> 0.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
tzinfo-data (1.2020.6)
tzinfo (>= 1.0.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (1.5.0)
uuid (2.3.9)
macaddr (~> 1.0)
Expand Down Expand Up @@ -611,12 +606,12 @@ DEPENDENCIES
newrelic_rpm
nokogiri (>= 1.10.5)
omniauth-saml-va!
pg (~> 0.18)
pg (~> 1.1.0)
pry
pry-byebug
puma (= 5.6.4)
rack-cors (>= 1.0.4)
rails (= 6.0.6.1)
rails (= 6.1.7.4)
rails_stdout_logging
rb-readline
redis-namespace
Expand Down Expand Up @@ -644,7 +639,6 @@ DEPENDENCIES
timecop
turbolinks
tzinfo-data
uglifier (>= 1.3.0)
uswds-rails!
wannabe_bool
webdrivers
Expand All @@ -653,4 +647,4 @@ DEPENDENCIES
zero_downtime_migrations

BUNDLED WITH
2.4.19
2.4.17
10 changes: 0 additions & 10 deletions app/assets/stylesheets/_commons.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import 'bourbon';
@import 'neat';
@import 'uswds_rails_overrides/core/defaults';
@import 'uswds/all';
@import 'uswds_rails_overrides/all';
Expand Down Expand Up @@ -573,14 +571,6 @@ div {
}


//-----------------------------------*
// CSS based on Web Design Guidelines.
// - Uses Neat.bourbon.io as a grid
// - Uses patterns and components
// from refills.bourbon.io/unstyled/
//-----------------------------------*/


//===========================
// Form controls
// =========================*/
Expand Down
4 changes: 2 additions & 2 deletions bin/rails
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'
require_relative "../config/boot"
require "rails/commands"
4 changes: 2 additions & 2 deletions bin/rake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
require_relative '../config/boot'
require 'rake'
require_relative "../config/boot"
require "rake"
Rake.application.run
Loading

0 comments on commit a5c3f06

Please sign in to comment.