Skip to content

Commit

Permalink
Merge branch 'master' into liz/add-better-error-handling
Browse files Browse the repository at this point in the history
  • Loading branch information
liztownd authored Dec 2, 2024
2 parents 6fb38fe + bbdab6b commit d3f6254
Show file tree
Hide file tree
Showing 49 changed files with 1,644 additions and 258 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ GEM
jruby-openssl (0.15.1-java)
json (2.7.5)
json (2.7.5-java)
json-schema (5.0.1)
json-schema (5.1.0)
addressable (~> 2.8)
json_schema (0.21.0)
json_schemer (2.3.0)
Expand Down Expand Up @@ -729,7 +729,7 @@ GEM
openssl (3.2.0-java)
jruby-openssl (~> 0.14)
operating_hours (0.1.0)
optimist (3.1.0)
optimist (3.2.0)
os (1.1.4)
ostruct (0.6.1)
ox (2.14.18)
Expand Down Expand Up @@ -1041,7 +1041,7 @@ GEM
stringio (3.1.2)
strong_migrations (2.0.2)
activerecord (>= 6.1)
super_diff (0.13.0)
super_diff (0.14.0)
attr_extras (>= 6.2.4)
diff-lcs
patience_diff
Expand Down
19 changes: 19 additions & 0 deletions app/controllers/v0/disability_compensation_forms_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def suggested_conditions
end

def submit_all_claim
temp_separation_location_fix if Flipper.enabled?(:disability_compensation_temp_separation_location_code_string,
@current_user)

saved_claim = SavedClaim::DisabilityCompensation::Form526AllClaim.from_hash(form_content)
saved_claim.save ? log_success(saved_claim) : log_failure(saved_claim)
submission = create_submission(saved_claim)
Expand Down Expand Up @@ -172,5 +175,21 @@ def missing_disabilities?(submission)
end
false
end

# TEMPORARY
# Turn separation location into string
# 11/18/2024 BRD EVSS -> Lighthouse migration caused separation location to turn into an integer,
# while SavedClaim (vets-json-schema) is expecting a string
def temp_separation_location_fix
if form_content.is_a?(Hash) && form_content['form526'].is_a?(Hash)
separation_location_code = form_content.dig('form526', 'serviceInformation', 'separationLocation',
'separationLocationCode')
unless separation_location_code.nil?
form_content['form526']['serviceInformation']['separationLocation']['separationLocationCode'] =
separation_location_code.to_s
end
end
end
# END TEMPORARY
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def get_docs(submission_id, uuid)
if parsed_forms[form_type_key].present?
file_type_and_file_objs << {
type: actual_form_types,
file: process_0781(uuid, FORM_ID_0781, parsed_forms[form_type_key],
file: process_0781(uuid, actual_form_types, parsed_forms[form_type_key],
upload: false)
}
end
Expand Down
7 changes: 7 additions & 0 deletions config/betamocks/services_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,13 @@
- :name: "GIDS"
:base_uri: <%= "#{URI(Settings.gids.url).host}:#{URI(Settings.gids.url).port}" %>
:endpoints:
- :method: :get
:path: "/gids/v0/institution_programs"
:file_path: "gids/programs"
# Mock only enabled when filtering by flight programs, see: lib/gi/search_client.rb
:cache_multiple_responses:
:uid_location: query
:uid_locator: type
- :method: :get
:path: "/gids/v1/lce"
:file_path: "gids/lce"
Expand Down
14 changes: 11 additions & 3 deletions config/features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ features:
actor_type: user
description: Enables the endpoints of the accredited representative portal
enable_in_development: true
aedp_vadx:
actor_type: user
description: Enables the VADX experimental features in the AEDP application
enable_in_development: true
all_claims_add_disabilities_enhancement:
actor_type: user
description: Enables enhancement to the 21-526EZ "Add Disabilities" page being implemented by the Conditions Team.
Expand Down Expand Up @@ -166,9 +170,6 @@ features:
champva_unique_temp_file_names:
actor_type: user
description: Enables unique temp file names for CHAMPVA PDF files
champva_file_recreate:
actor_type: user
description: Enhances file creation reliability by adding retry functionality in the vets-api tmp folder
champva_failure_email_job_enabled:
actor_type: user
description: Enables sending failure notification emails for IVC CHAMPVA form submissions that lack a Pega status
Expand Down Expand Up @@ -530,6 +531,9 @@ features:
actor_type: user
description: enables sending flashes to BGS for disability_compensation submissions.
enable_in_development: true
disability_compensation_temp_separation_location_code_string:
actor_type: user
description: enables forcing separation location code to be a string in submit_all_claim endpoint.
disability_compensation_form4142_supplemental:
actor_type: user
description: Use Lighthouse API to submit supplemental Form 21-4142 from Form 526EZ submissions
Expand Down Expand Up @@ -1046,6 +1050,10 @@ features:
actor_type: user
description: Enables/disables filter feature for medications list
enable_in_development: true
mhv_medications_display_grouping:
actor_type: user
description: Enables/disables grouping medications related work
enable_in_development: true
mobile_allergy_intolerance_model:
actor_type: user
description: For mobile app, enalbes use of strict models for parsing allergy intolerance
Expand Down
7 changes: 6 additions & 1 deletion config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ gids:
url: https://dev.va.gov/gids
open_timeout: 1
read_timeout: 1
search:
use_mocks: false
lce:
use_mocks: false

Expand Down Expand Up @@ -1288,6 +1290,8 @@ vanotify:
form21_674_action_needed_email: form21_674_action_needed_email_template_id
form21_0966_confirmation_email: form21_0966_confirmation_email_template_id
form21_0966_error_email: form21_0966_error_email_template_id
form21_0966_received_email: form21_0966_received_email_template_id
form21_0966_itf_api_received_email: form21_0966_itf_api_received_email_template_id
form21_0972_confirmation_email: form21_0972_confirmation_email_template_id
form21_0972_error_email: form21_0972_error_email_template_id
form21_0972_received_email: form21_0972_received_email_template_id
Expand Down Expand Up @@ -1845,6 +1849,7 @@ vaos:
client_assertion_type: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"
audience_claim_url: "https://login.wellhive.com/oauth2/default/v1/token"
access_token_url: "https://login.wellhive.com/oauth2/default/v1/token"
api_url: "https://api.wellhive.com/care-navigation/v1"
api_url: "https://api.wellhive.com"
base_path: "care-navigation/v1"
scopes: "care-nav"

90 changes: 90 additions & 0 deletions config/settings/production.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,92 @@
betamocks:
recording: false
central_mail:
upload:
enabled: true
check_in:
authentication:
retry_attempt_expiry: 604800
chip_api_v2:
mock: false
timeout: 30
lorota_v2:
mock: false
travel_reimbursement_api:
redis_token_expiry: 3540
clamav:
mock: false
coverband:
github_organization: department-of-veterans-affairs
decision_review:
mock: false
pdf_validation:
enabled: true
dogstatsd:
enabled: true
evss:
s3:
uploads_enabled: true
expiry_scanner:
slack:
channel_id: C24RH0W11
flipper:
github_organization: department-of-veterans-affairs
mute_logs: false
form_10_10cg:
poa:
s3:
enabled: true
form526_backup:
submission_method: single
google_analytics_cvu:
type: service_account
hca:
ca: []
lighthouse:
benefits_intake:
path: /services/vba_documents
use_mocks: false
version: v1
veteran_verification:
form526:
use_mocks: false
maintenance:
services:
bgs: P5Q2OCZ
modules_appeals_api:
legacy_appeals_enabled: true
schema_dir: config/schemas
mvi:
pii_logging: false
session_cookie:
secure: true
sidekiq_admin_panel: false
sidekiq:
github_organization: department-of-veterans-affairs
va_profile:
contact_information:
cache_enabled: true
enabled: true
mock: false
timeout: 30
demographics:
cache_enabled: false
enabled: true
mock: false
timeout: 30
military_personnel:
cache_enabled: false
enabled: true
mock: false
timeout: 30
veteran_status:
mock: false
vba_documents:
enable_validate_document_endpoint: true
s3:
enabled: true
slack:
daily_notification_hour: 7
in_flight_notification_hung_time_in_days: 14
renotification_in_minutes: 1440
update_stalled_notification_in_minutes: 180
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class SeparationLocation
include ActiveModel::Serialization
include Virtus.model

attribute :code, Integer
attribute :code, String
attribute :description, String
end

Expand Down
4 changes: 4 additions & 0 deletions lib/gi/search_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ def get_institution_search_results_v0(params = {})
end

def get_institution_program_search_results_v0(params = {})
# Mock response if querying for flight school programs
# TO-DO: Remove after flight school program data becomes accessible
config.instance_variable_set(:@program_type_flight, true) if params[:type] == 'FLGT'

response = perform(:get, 'v0/institution_programs', params)
gids_response(response)
end
Expand Down
9 changes: 9 additions & 0 deletions lib/gi/search_configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,14 @@ module GI
class SearchConfiguration < GI::Configuration
self.read_timeout = Settings.gids.search&.read_timeout || 4
self.open_timeout = Settings.gids.search&.open_timeout || 4

# Mock response if querying for flight school programs
# TO-DO: Remove after flight school program data becomes accessible
def use_mocks?
return false unless instance_variable_defined?(:@program_type_flight)

querying_by_flight = remove_instance_variable(:@program_type_flight)
(querying_by_flight && Settings.gids.search.use_mocks) || false
end
end
end
Loading

0 comments on commit d3f6254

Please sign in to comment.