Skip to content

Commit

Permalink
Merge branch 'uat/FY23Q4.4.3' into uat4.4.3/APPEALS-28372
Browse files Browse the repository at this point in the history
  • Loading branch information
mikefinneran committed Sep 1, 2023
2 parents cb1146f + 245bf82 commit 31e4547
Show file tree
Hide file tree
Showing 373 changed files with 20,140 additions and 1,276 deletions.
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ plugins:
languages:
ruby:
javascript:
mass_threshold: 50
mass_threshold: 81
exclude_patterns:
- 'db/migrate/*'
- 'app/controllers/idt/api/v2/appeals_controller.rb'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ jobs:
run: |
./ci-bin/capture-log "DB=etl bundle exec rake db:create db:schema:load db:migrate"
./ci-bin/capture-log "bundle exec rake db:create db:schema:load db:migrate"
./ci-bin/capture-log "make -f Makefile.example external-db-create"
# added line to create external table(s) that are needed for tests

# We don't want to seed DBs here because DatabaseCleaner just truncates it anyway. The setup_vacols
# rake task needs to be run because it adds data to two tables that are ignored by DBCleaner
Expand Down
1 change: 1 addition & 0 deletions .reek.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ detectors:
- Reporter#percent
- SanitizedJsonConfiguration
- ScheduleHearingTaskPager#sorted_tasks
- UpdatePOAConcern
- VBMSCaseflowLogger#log
- LegacyDocket
UnusedParameters:
Expand Down
9 changes: 5 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ gem "acts_as_tree"
# amoeba gem for cloning appeals
gem "amoeba"
# BGS

gem "bgs", git: "https://github.com/department-of-veterans-affairs/ruby-bgs.git", ref: "7d7c67f7bad5e5aa03e257f0d8e57a4aa1a6cbbf"
gem "bgs", git: "https://github.com/department-of-veterans-affairs/ruby-bgs.git", ref: "5f47e7b2656ef347d314ef43c93d38a9f20816ec"
gem "ruby_claim_evidence_api", git: "https://github.com/department-of-veterans-affairs/ruby_claim_evidence_api.git", ref: "f8f528855d39a4349682e8b10c8e6fa17e22a950"
# Bootsnap speeds up app boot (and started to be a default gem in 5.2).
gem "bootsnap", require: false
gem "browser"
Expand Down Expand Up @@ -47,8 +47,8 @@ gem "paranoia", "~> 2.2"
gem "pdf-forms"
# Used in Caseflow Dispatch
gem "pdfjs_viewer-rails", git: "https://github.com/senny/pdfjs_viewer-rails.git", ref: "a4249eacbf70175db63b57e9f364d0a9a79e2b43"
#Used to build out PDF files on the backend
#https://github.com/pdfkit/pdfkit
# Used to build out PDF files on the backend
# https://github.com/pdfkit/pdfkit
gem "pdfkit"
gem "pg", platforms: :ruby
# Application server: Puma
Expand All @@ -61,6 +61,7 @@ gem "rails", "5.2.4.6"
gem "rainbow"
# React
gem "react_on_rails", "11.3.0"
gem "redis-mutex"
gem "redis-namespace"
gem "redis-rails", "~> 5.0.2"
gem "request_store"
Expand Down
67 changes: 44 additions & 23 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,26 @@ GIT

GIT
remote: https://github.com/department-of-veterans-affairs/ruby-bgs.git
revision: 7d7c67f7bad5e5aa03e257f0d8e57a4aa1a6cbbf
ref: 7d7c67f7bad5e5aa03e257f0d8e57a4aa1a6cbbf
revision: 5f47e7b2656ef347d314ef43c93d38a9f20816ec
ref: 5f47e7b2656ef347d314ef43c93d38a9f20816ec
specs:
bgs (0.2)
bgs (0.3)
httpclient
nokogiri (>= 1.11.0.rc4)
savon (~> 2.12)

GIT
remote: https://github.com/department-of-veterans-affairs/ruby_claim_evidence_api.git
revision: f8f528855d39a4349682e8b10c8e6fa17e22a950
ref: f8f528855d39a4349682e8b10c8e6fa17e22a950
specs:
ruby_claim_evidence_api (0.0.1)
activesupport
base64
faraday
httpi
railties

GIT
remote: https://github.com/department-of-veterans-affairs/sniffybara.git
revision: 351560b5789ca638ba7c9b093c2bb1a9a6fda4b3
Expand Down Expand Up @@ -153,6 +165,7 @@ GEM
aws-sdk-core (= 2.10.112)
aws-sigv4 (1.0.2)
backport (1.2.0)
base64 (0.1.1)
benchmark-ips (2.7.2)
bootsnap (1.7.5)
msgpack (~> 1.0)
Expand Down Expand Up @@ -198,7 +211,7 @@ GEM
coderay (1.1.3)
colored2 (3.1.2)
colorize (0.8.1)
concurrent-ruby (1.1.8)
concurrent-ruby (1.2.2)
connection_pool (2.2.3)
cork (0.3.0)
colored2 (~> 3.1)
Expand Down Expand Up @@ -278,7 +291,7 @@ GEM
dry-logic (~> 1.0, >= 1.0.2)
ecma-re-validator (0.2.1)
regexp_parser (~> 1.2)
erubi (1.10.0)
erubi (1.12.0)
execjs (2.7.0)
factory_bot (5.2.0)
activesupport (>= 4.2.0)
Expand All @@ -287,7 +300,7 @@ GEM
railties (>= 4.2.0)
faker (2.15.1)
i18n (>= 1.6, < 2)
faraday (0.15.4)
faraday (0.17.6)
multipart-post (>= 1.2, < 3)
faraday-http-cache (2.4.1)
faraday (>= 0.8)
Expand Down Expand Up @@ -336,10 +349,10 @@ GEM
heapy (0.1.4)
holidays (6.6.1)
httpclient (2.8.3)
httpi (2.4.4)
httpi (2.5.0)
rack
socksify
i18n (1.8.10)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
i18n_data (0.10.0)
icalendar (2.6.1)
Expand Down Expand Up @@ -391,9 +404,9 @@ GEM
logstasher (2.1.5)
activesupport (>= 5.2)
request_store
loofah (2.9.1)
loofah (2.21.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
nokogiri (>= 1.12.0)
lumberjack (1.0.13)
mail (2.7.1)
mini_mime (>= 0.1.1)
Expand All @@ -412,14 +425,14 @@ GEM
nokogiri (~> 1)
rake
mini_mime (1.1.0)
mini_portile2 (2.7.1)
minitest (5.14.4)
mini_portile2 (2.8.4)
minitest (5.19.0)
moment_timezone-rails (0.5.0)
momentjs-rails (2.29.4.1)
railties (>= 3.1)
msgpack (1.4.2)
multi_json (1.12.2)
multipart-post (2.1.1)
multipart-post (2.3.0)
multiverse (0.2.2)
activerecord (>= 4.2)
activesupport (>= 4.2)
Expand All @@ -431,8 +444,8 @@ GEM
newrelic_rpm (6.5.0.357)
nio4r (2.5.8)
no_proxy_fix (0.1.2)
nokogiri (1.13.1)
mini_portile2 (~> 2.7.0)
nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nori (2.6.0)
notiffany (0.1.1)
Expand Down Expand Up @@ -467,12 +480,12 @@ GEM
public_suffix (4.0.6)
puma (5.6.4)
nio4r (~> 2.0)
racc (1.6.0)
rack (2.2.6.2)
racc (1.7.1)
rack (2.2.6.4)
rack-contrib (2.1.0)
rack (~> 2.0)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rack-test (2.1.0)
rack (>= 1.3)
rails (5.2.4.6)
actioncable (= 5.2.4.6)
actionmailer (= 5.2.4.6)
Expand All @@ -486,16 +499,18 @@ GEM
bundler (>= 1.3.0)
railties (= 5.2.4.6)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-erd (1.6.0)
activerecord (>= 4.2)
activesupport (>= 4.2)
choice (~> 0.2.0)
ruby-graphviz (~> 1.2)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (5.2.4.6)
actionpack (= 5.2.4.6)
activesupport (= 5.2.4.6)
Expand Down Expand Up @@ -523,6 +538,10 @@ GEM
redis-activesupport (5.0.4)
activesupport (>= 3, < 6)
redis-store (>= 1.3, < 2)
redis-classy (2.4.1)
redis-namespace (~> 1.0)
redis-mutex (4.0.2)
redis-classy (~> 2.0)
redis-namespace (1.6.0)
redis (>= 3.0.4)
redis-rack (2.0.4)
Expand Down Expand Up @@ -783,6 +802,7 @@ DEPENDENCIES
rainbow
rb-readline
react_on_rails (= 11.3.0)
redis-mutex
redis-namespace
redis-rails (~> 5.0.2)
request_store
Expand All @@ -798,6 +818,7 @@ DEPENDENCIES
ruby-debug-ide
ruby-oci8 (~> 2.2)
ruby-prof (~> 1.4)
ruby_claim_evidence_api!
sass-rails (~> 5.0)
scss_lint
sentry-raven
Expand Down
22 changes: 13 additions & 9 deletions MAC_M1.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ OpenSSL
---
1. Download [email protected] and openssl@3 from this [link](https://boozallen.sharepoint.com/teams/VABID/appeals/Documents/Forms/AllItems.aspx?id=%2Fteams%2FVABID%2Fappeals%2FDocuments%2FDevelopment%2FDeveloper%20Setup%20Resources%2FM1%20Mac%20Developer%20Setup&viewid=8a8eaf3e%2D2c12%2D4c87%2Db95f%2D4eab3428febd)
2. Open “Finder” and find the two folders under “Downloads”
3. Extract the `.tar.gz` files
3. Extract the `.tar.gz` or `.zip` archives
4. In each of the extracted folders:
1. Navigate to the `/usr/local/homebrew/Cellar` subfolder
2. Copy the openssl folder to your local machine's `/usr/local/homebrew/Cellar` folder
Expand Down Expand Up @@ -168,22 +168,26 @@ Run dev setup scripts in Caseflow repo
1. Open a **Rosetta** terminal and navigate to /usr/local, run the command ```sudo spctl --global-disable```
2. In the **Rosetta** terminal, install pyenv and the required python2 version:
1. `brew install pyenv`
2. `pyenv install 2.7.18`
3. In the caseflow directory, run `pyenv local 2.7.18` to set the version
2. `pyenv rehash`
3. `pyenv install 2.7.18`
4. In the caseflow directory, run `pyenv local 2.7.18` to set the version
3. In the **Rosetta** terminal navigate to caseflow folder:
1. set ```RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local/homebrew/Cellar/[email protected]"```
2. run `rbenv install 2.7.3`
3. run `gem install pg:1.1.4 -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/latest/bin/pg_config`
4. Install [email protected] by doing the following (these steps assume that vi/vim is the default editor):
1. set ```export RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local/homebrew/Cellar/[email protected]"```
2. run `rbenv install $(cat .ruby-version)`
3. run `rbenv rehash`
4. run `gem install bundler -v $(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)`
5. run `gem install pg:1.1.4 -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/latest/bin/pg_config`
6. Install [email protected] by doing the following (these steps assume that vi/vim is the default editor):
1. run `brew edit [email protected]`
2. go to line 21 in the editor by typing `:21`
Note: the line being removed is `disable! date: "2023-06-19", because: "depends on Python 2 to build"`
3. delete the line by pressing `d` twice
4. save and quit by typing `:x`
5. Configure build opts for gem `therubyracer`:
5. run `HOMEBREW_NO_INSTALL_FROM_API=1 brew install [email protected]`
7. Configure build opts for gem `therubyracer`:
1. `bundle config build.libv8 --with-system-v8`
2. `bundle config build.therubyracer --with-v8-dir=$(brew --prefix [email protected])`
6. run ```./scripts/dev_env_setup_step2.sh```
8. run ```./scripts/dev_env_setup_step2.sh```
If you get a permission error while running gem install or bundle install, **do not run using sudo.**
Set the permissions back to you for every directory under /.rbenv
* Enter command: `sudo chown -R <your name under /Users> /Users/<your name>/.rbenv`
Expand Down
31 changes: 30 additions & 1 deletion Makefile.example
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,44 @@ audit: ## Create caseflow_audit schema, tables, and triggers in postgres
bundle exec rails r db/scripts/audit/tables/create_vbms_distributions_audit.rb
bundle exec rails r db/scripts/audit/tables/create_vbms_distribution_destinations_audit.rb
bundle exec rails r db/scripts/audit/tables/create_vbms_uploaded_documents_audit.rb
bundle exec rails r db/scripts/audit/tables/create_priority_end_product_sync_queue_audit.rb
bundle exec rails r db/scripts/audit/functions/add_row_to_appeal_states_audit_table_function.rb
bundle exec rails r db/scripts/audit/functions/add_row_to_vbms_communication_packages_audit_table_function.rb
bundle exec rails r db/scripts/audit/functions/add_row_to_vbms_distributions_audit_table_function.rb
bundle exec rails r db/scripts/audit/functions/add_row_to_vbms_distribution_destinations_audit_table_function.rb
bundle exec rails r db/scripts/audit/functions/add_row_to_vbms_uploaded_documents_audit_table_function.rb
bundle exec rails r db/scripts/audit/functions/add_row_to_priority_end_product_sync_queue_audit_table_function.rb
bundle exec rails r db/scripts/audit/triggers/create_appeal_states_audit_trigger.rb
bundle exec rails r db/scripts/audit/triggers/create_vbms_communication_packages_audit_trigger.rb
bundle exec rails r db/scripts/audit/triggers/create_vbms_distributions_audit_trigger.rb
bundle exec rails r db/scripts/audit/triggers/create_vbms_distribution_destinations_audit_trigger.rb
bundle exec rails r db/scripts/audit/triggers/create_vbms_uploaded_documents_audit_trigger.rb
bundle exec rails r db/scripts/audit/triggers/create_priority_end_product_sync_queue_audit_trigger.rb

audit-remove: ## Remove caseflow_audit schema, tables and triggers in postgres
bundle exec rails r db/scripts/audit/remove_caseflow_audit_schema.rb

# The external-db make commands create/remove replicas (for local environment only) of external db tables that exist in Prod
# These tables should not be included as part of migrations
external-db-create: ## Creates external_vbms_ext_claim table
bundle exec rails r db/scripts/external/create_vbms_ext_claim_table.rb

external-db-remove: ## Remove external_vbms_ext_claim table
bundle exec rails r db/scripts/external/remove_vbms_ext_claim_table.rb

# This needs to be manually run after make reset/migrate in order for local tests involving external tables to pass.
# Otherwise the caseflow_certification_test schema will not create these tables and will error out.
external-db-create-test: ## Creates table in caseflow_certification_test DB for local RSPEC tests
bundle exec rails r -e test db/scripts/external/create_vbms_ext_claim_table.rb

remove-vbms-ext-claim-seeds: ## Drops audit tables, removes all PriorityEndProductSyncQueue, BatchProcess, and seed-vbms-ext-claim records, then rebuilds audit tables
make audit-remove
make external-db-create
bundle exec rails r db/scripts/external/remove_vbms_ext_claim_seeds.rb
make audit

reseed-vbms-ext-claim: remove-vbms-ext-claim-seeds seed-vbms-ext-claim ## Re-seeds database with records created from seed-vbms-ext-claim

c: ## Start rails console
bundle exec rails console

Expand All @@ -188,7 +212,7 @@ db-migrate: ## Migrate main Caseflow db
db-rollback: ## Rollback main Caseflow db
bundle exec rake db:rollback

migrate: etl-migrate etl-test-prepare db-migrate ## Migrate all Rails databases
migrate: external-db-remove etl-migrate etl-test-prepare db-migrate ## Migrate all non-external Rails databases

rollback: etl-rollback db-rollback ## Rollback all Rails databases

Expand All @@ -199,9 +223,14 @@ reset: reset-dbs seed-dbs enable-feature-flags ## Resets databases and enable fe

reset-dbs: ## Resets Caseflow and ETL database schemas
make audit-remove
make external-db-remove
DB=etl bundle exec rake db:drop db:create db:schema:load
bundle exec rake db:drop db:create db:schema:load
make audit
make external-db-create

seed-vbms-ext-claim: ## Seed only vbms_ext_claim
bundle exec rake db:seed:vbms_ext_claim

seed-dbs: ## Seed all databases
bundle exec rake local:vacols:seed
Expand Down
Loading

0 comments on commit 31e4547

Please sign in to comment.