Skip to content

Commit

Permalink
Merge branch 'master' into 78699_block_csp_acr
Browse files Browse the repository at this point in the history
  • Loading branch information
bramleyjl authored Apr 15, 2024
2 parents dd7ecaf + 9fbe39d commit 3db0969
Show file tree
Hide file tree
Showing 131 changed files with 1,262 additions and 812 deletions.
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,6 @@ rakelib/mockdata_synchronize.rake @department-of-veterans-affairs/octo-identity
rakelib/pension_burial.rake @department-of-veterans-affairs/mbs-core-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
rakelib/piilog_repl @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/va-api-engineers
rakelib/prod @department-of-veterans-affairs/vfs-vaos @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/va-api-engineers
rakelib/prod/user_credential.rake @department-of-veterans-affairs/octo-identity
rakelib/remove_va1995s_records.rake @department-of-veterans-affairs/govcio-vfep-codereviewers @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
rakelib/routes_csv.rake @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
rakelib/rswag.rake @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -1485,6 +1484,7 @@ spec/rakelib/form526_spec.rb @department-of-veterans-affairs/Benefits-Team-1 @de
spec/rakelib/piilog_repl @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/rakelib/piilog_repl/piilog_helpers_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/rakelib/vet360_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
rakelib/prod/user_credential.rake @department-of-veterans-affairs/octo-identity
spec/requests/admin_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/requests/appeals_request_spec.rb @department-of-veterans-affairs/backend-review-group
spec/requests/appointments_request_spec.rb @department-of-veterans-affairs/vfs-vaos @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -1798,7 +1798,7 @@ spec/support/vcr_cassettes/bgs @department-of-veterans-affairs/benefits-dependen
spec/support/vcr_cassettes/bgs/claims @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/support/vcr_cassettes/bgs/benefit_claim @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/support/vcr_cassettes/bid @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/support/vcr_cassettes/brd @department-of-veterans-affairs/lighthouse-dash @department-of-veterans-affairs/dbex-trex @department-of-veterans-affairs/Disability-Experience
spec/support/vcr_cassettes/brd @department-of-veterans-affairs/dbex-trex @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/backend-review-group
spec/support/vcr_cassettes/carma @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/support/vcr_cassettes/central_mail @department-of-veterans-affairs/lighthouse-banana-peels @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/support/vcr_cassettes/caseflow @department-of-veterans-affairs/lighthouse-banana-peels @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -1876,7 +1876,7 @@ spec/support/vcr_cassettes/slack/slack_bot_notify.yml @department-of-veterans-af
spec/support/vcr_cassettes/sm_client @department-of-veterans-affairs/vfs-mhv-secure-messaging @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/support/vcr_cassettes/spec/support @department-of-veterans-affairs/octo-identity
spec/support/vcr_cassettes/staccato @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/support/vcr_cassettes/token_validation @department-of-veterans-affairs/lighthouse-dash @department-of-veterans-affairs/lighthouse-banana-peels @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/support/vcr_cassettes/token_validation @department-of-veterans-affairs/lighthouse-banana-peels @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/spupport/vcr_cassettes/user/get_facilities_empty.yml @department-of-veterans-affairs/vfs-facilities-frontend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/support/vcr_cassettes/va_forms @department-of-veterans-affairs/platform-va-product-forms @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/support/vcr_cassettes/va_notify @department-of-veterans-affairs/va-notify-write @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down
4 changes: 3 additions & 1 deletion .github/scripts/check_codeowners.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ HEAD_SHA=$(git rev-parse HEAD)
BASE_SHA=$(git rev-parse origin/master)

# Get the list of changed files between the base and head commits
IFS=$'\n' # Change IFS to split only on newlines
CHANGED_FILES=$(git diff --name-only --diff-filter=AMR ${BASE_SHA}...${HEAD_SHA})
echo "Changed files: $CHANGED_FILES"

Expand All @@ -37,7 +38,7 @@ check_in_codeowners() {
return 1
}

for FILE in "${CHANGED_FILES}"; do
for FILE in ${CHANGED_FILES}; do
# Ignore files starting with a dot
if [[ $FILE == .* ]]; then
echo "Ignoring file $FILE"
Expand All @@ -53,3 +54,4 @@ for FILE in "${CHANGED_FILES}"; do
done

echo "All changed files or their parent directories have a CODEOWNERS entry."
IFS=$' \t\n' # Reset IFS after the loop
2 changes: 2 additions & 0 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require 'ostruct'

module VSPDanger
HEAD_SHA = `git rev-parse --abbrev-ref HEAD`.chomp.freeze
BASE_SHA = 'origin/master'
Expand Down
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@ GEM
attr_extras (7.1.0)
awesome_print (1.9.2)
aws-eventstream (1.3.0)
aws-partitions (1.903.0)
aws-sdk-core (3.191.5)
aws-partitions (1.913.0)
aws-sdk-core (3.191.6)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.78.0)
aws-sdk-kms (1.79.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.146.1)
Expand Down Expand Up @@ -474,7 +474,7 @@ GEM
rack (>= 1.4, < 4)
rack-protection (>= 1.5.3, <= 4.0.0)
sanitize (< 7)
foreman (0.87.2)
foreman (0.88.1)
formatador (1.1.0)
fugit (1.9.0)
et-orbi (~> 1, >= 1.2.7)
Expand Down Expand Up @@ -571,8 +571,8 @@ GEM
iso_country_codes (0.7.8)
jar-dependencies (0.4.1)
jmespath (1.6.2)
json (2.7.1)
json (2.7.1-java)
json (2.7.2)
json (2.7.2-java)
json-schema (4.3.0)
addressable (>= 2.8)
json_schemer (2.2.1)
Expand Down Expand Up @@ -952,7 +952,7 @@ GEM
rake (>= 10.0)
semantic_logger (4.15.0)
concurrent-ruby (~> 1.0)
sentry-ruby (5.17.2)
sentry-ruby (5.17.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
shellany (0.0.1)
Expand Down
29 changes: 28 additions & 1 deletion app/controllers/v0/health_care_applications_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require 'hca/service'
require 'bgs/service'
require 'pdf_fill/filler'
require 'lighthouse/facilities/v1/client'

module V0
class HealthCareApplicationsController < ApplicationController
Expand All @@ -11,7 +12,7 @@ class HealthCareApplicationsController < ApplicationController
service_tag 'healthcare-application'
FORM_ID = '1010ez'

skip_before_action(:authenticate, only: %i[create show enrollment_status healthcheck download_pdf])
skip_before_action(:authenticate, only: %i[create show enrollment_status healthcheck download_pdf facilities])

before_action :record_submission_attempt, only: :create
before_action :load_user, only: %i[create enrollment_status]
Expand Down Expand Up @@ -76,12 +77,38 @@ def download_pdf
send_data file_contents, filename: file_name_for_pdf, type: 'application/pdf', disposition: 'attachment'
end

def facilities
render(json: lighthouse_facilities_service.get_facilities(lighthouse_facilities_params))
end

private

def health_care_application
@health_care_application ||= HealthCareApplication.new(params.permit(:form))
end

def lighthouse_facilities_service
@lighthouse_facilities_service ||= Lighthouse::Facilities::V1::Client.new
end

def lighthouse_facilities_params
params.permit(
:zip,
:state,
:lat,
:long,
:radius,
:bbox,
:visn,
:type,
:services,
:mobile,
:page,
:per_page,
facilityIds: []
)
end

def file_name_for_pdf
veteran_name = health_care_application.parsed_form.try(:[], 'veteranFullName')
first_name = veteran_name.try(:[], 'first') || 'First'
Expand Down
11 changes: 11 additions & 0 deletions app/controllers/v0/profile/direct_deposits_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ class DirectDepositsController < ApplicationController
error = { status: exception.status_code, body: exception.errors.first }
response = Lighthouse::DirectDeposit::ErrorParser.parse(error)

# temporary - will be removed after direct deposit merge is complete
update_error_code_prefix(response) if single_form_enabled?

render status: response.status, json: response.body
end

Expand All @@ -41,6 +44,14 @@ def update

private

def single_form_enabled?
Flipper.enabled?(:profile_show_direct_deposit_single_form, @current_user)
end

def update_error_code_prefix(response)
response.code = response.code.sub('cnp.payment', 'direct.deposit')
end

def client
@client ||= DirectDeposit::Client.new(@current_user.icn)
end
Expand Down
3 changes: 1 addition & 2 deletions app/sidekiq/terms_of_use/sign_up_service_updater_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ module TermsOfUse
class SignUpServiceUpdaterJob
include Sidekiq::Job

sidekiq_options unique_for: 2.days
sidekiq_options retry: 15 # 2.1 days using exponential backoff
sidekiq_options retry: 5 # ~17 mins

sidekiq_retries_exhausted do |job, exception|
Rails.logger.warn(
Expand Down
15 changes: 15 additions & 0 deletions config/features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ features:
decision_review_delay_evidence:
actor_type: user
description: Ensures that NOD and SC evidence is not received in Central Mail before the appeal itself
decision_review_updated_pii_rules:
actor_type: user
description: Uses udpated rules for when to clear PII from appeals_api records
dependency_verification:
actor_type: user
description: Feature gates the dependency verification modal for updating the diaries service.
Expand Down Expand Up @@ -948,10 +951,18 @@ features:
actor_type: user
description: Displays an alert to users on 1990EZ intro page that the Backend Service is Down.
enable_in_development: false
show_meb_1990EZ_R6_maintenance_message:
actor_type: user
description: Displays an alert to users on 1990EZ intro page that the Backend Service is Down.
enable_in_development: false
show_meb_1990E_maintenance_alert:
actor_type: user
description: Displays an alert to users on 1990E intro page that the Backend Service is Down.
enable_in_development: false
show_meb_1990E_R6_maintenance_message:
actor_type: user
description: Displays an alert to users on 1990E intro page that the Backend Service is Down.
enable_in_development: false
show_meb_letters_maintenance_alert:
actor_type: user
description: Displays an alert to users on Letters Inbox page that the Backend Service is Down.
Expand All @@ -971,6 +982,10 @@ features:
actor_type: user
description: enables exclusion period checks
enable_in_development: false
meb_auto_populate_relinquishment_date:
actor_type: user
description: Flag to autofill datepicker for reliinquishment date
enable_in_development: true
show_forms_app:
actor_type: user
description: Enables the TOE form to be displayed.
Expand Down
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
get(:healthcheck)
get(:enrollment_status)
get(:rating_info)
get(:facilities)
post(:download_pdf)
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This migration comes from vye (originally 20240229184515)
class CreateAverageDaysForClaimCompletions < ActiveRecord::Migration[7.1]
def change
create_table :average_days_for_claim_completions do |t|
t.float average_days

t.timestamps
end
end
end
20 changes: 20 additions & 0 deletions db/migrate/20240411235242_create_pega_table.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
class CreatePegaTable < ActiveRecord::Migration[7.1]
def change
create_table :pega_tables do |t|
t.uuid :uuid
t.string :veteranfirstname
t.string :veteranmiddlename
t.string :veteranlastname
t.string :applicantfirstname
t.string :applicantmiddlename
t.string :applicantlastname
t.jsonb :response
t.string :filenumber
t.string :doctype
t.datetime :date_created
t.datetime :date_completed

t.timestamps
end
end
end
Loading

0 comments on commit 3db0969

Please sign in to comment.