Skip to content

Commit

Permalink
fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-mcneil committed Oct 7, 2024
2 parents bc7e188 + f703394 commit bd2e8e9
Show file tree
Hide file tree
Showing 360 changed files with 11,250 additions and 129,860 deletions.
39 changes: 5 additions & 34 deletions .github/CODEOWNERS

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ GIT

GIT
remote: https://github.com/department-of-veterans-affairs/vets-json-schema
revision: deface2de95675b0cf5bcd27f0c91714327dbd86
revision: 998cfd9d48db75a5533e33785d6523933f7e9b36
branch: master
specs:
vets_json_schema (24.2.8)
vets_json_schema (24.2.9)
multi_json (~> 1.0)
script_utils (= 0.0.4)

Expand Down Expand Up @@ -243,21 +243,21 @@ GEM
attr_extras (7.1.0)
awesome_print (1.9.2)
aws-eventstream (1.3.0)
aws-partitions (1.978.0)
aws-sdk-core (3.209.0)
aws-partitions (1.984.0)
aws-sdk-core (3.209.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.94.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.162.0)
aws-sdk-core (~> 3, >= 3.205.0)
aws-sdk-s3 (1.167.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sdk-sns (1.85.0)
aws-sdk-core (~> 3, >= 3.205.0)
aws-sdk-sns (1.88.0)
aws-sdk-core (~> 3, >= 3.207.0)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.10.0)
aws-eventstream (~> 1, >= 1.0.2)
Expand Down Expand Up @@ -600,7 +600,7 @@ GEM
jsonapi-serializer (2.2.0)
activesupport (>= 4.2)
jwe (0.4.0)
jwt (2.8.2)
jwt (2.9.3)
base64
kms_encrypted (1.6.0)
activesupport (>= 6.1)
Expand Down Expand Up @@ -1022,7 +1022,7 @@ GEM
stringio (3.1.1)
strong_migrations (2.0.0)
activerecord (>= 6.1)
super_diff (0.12.1)
super_diff (0.13.0)
attr_extras (>= 6.2.4)
diff-lcs
patience_diff
Expand Down
19 changes: 18 additions & 1 deletion app/controllers/concerns/form_attachment_create.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,28 @@ module FormAttachmentCreate
include SentryLogging

def create
debug_timestamp = Time.current.iso8601
if Flipper.enabled?(:hca_log_form_attachment_create)
log_message_to_sentry(
'begin form attachment creation',
:info,
file_data_present: filtered_params[:file_data].present?,
klass: filtered_params[:file_data]&.class&.name,
debug_timestamp:
)
end

validate_file_upload_class!
save_attachment_to_cloud!
save_attachment_to_db!

render json: serializer_klass.new(form_attachment)
serialized = serializer_klass.new(form_attachment)

if Flipper.enabled?(:hca_log_form_attachment_create)
log_message_to_sentry('finish form attachment creation', :info, serialized: serialized.present?, debug_timestamp:)
end

render json: serialized
end

private
Expand Down
7 changes: 3 additions & 4 deletions app/controllers/v0/backend_statuses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ def index
render json: BackendStatusesSerializer.new(backend_statuses, options)
end

# TO-DO: After transition of Post-911 GI Bill to 24/7 availability, confirm show action
# and related logic can be completely removed
#
# GET /v0/backend_statuses/:service
def show
render json: BackendStatusSerializer.new(backend_status)
Expand Down Expand Up @@ -46,9 +49,5 @@ def validate_service
def recognized_service?
BackendServices.all.include?(backend_service)
end

def backend_status_is_available
backend_service == BackendServices::GI_BILL_STATUS
end
end
end
2 changes: 1 addition & 1 deletion app/controllers/v0/health_care_applications_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def lighthouse_facilities_service
end

def lighthouse_facilities_params
params.permit(
params.except(:format).permit(
:zip,
:state,
:lat,
Expand Down
1 change: 0 additions & 1 deletion app/controllers/v0/my_va/submission_statuses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module MyVA
class SubmissionStatusesController < ApplicationController
service_tag 'form-submission-statuses'
before_action :controller_enabled?
before_action { authorize :lighthouse, :access? }

def show
report = Forms::SubmissionStatuses::Report.new(
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/v0/profile/service_histories_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def get_military_info
handle_errors!(response.episodes)
report_results(response.episodes)

service_history_json = JSON.parse(response.episodes.to_json, symbolize_names: true)
service_history_json = JSON.parse(response.to_json, symbolize_names: true)
options = { is_collection: false }

render json: ServiceHistorySerializer.new(service_history_json, options), status: response.status
Expand Down
11 changes: 10 additions & 1 deletion app/controllers/v0/search_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true

require 'search/service'
require 'search_gsa/service'

module V0
class SearchController < ApplicationController
Expand All @@ -15,7 +16,7 @@ class SearchController < ApplicationController
# For example, the app/controllers/v0/prescriptions_controller.rb.
#
def index
response = Search::Service.new(query, page).results
response = search_service.results
options = { meta: { pagination: response.pagination } }

render json: SearchSerializer.new(response, options)
Expand All @@ -27,6 +28,14 @@ def search_params
params.permit(:query, :page)
end

def search_service
@search_service ||= if Flipper.enabled?(:search_use_v2_gsa)
SearchGsa::Service.new(query, page)
else
Search::Service.new(query, page)
end
end

# Returns a sanitized, permitted version of the passed query params.
#
# @return [String]
Expand Down
5 changes: 4 additions & 1 deletion app/controllers/v1/post911_gi_bill_statuses_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Post911GIBillStatusesController < ApplicationController
include SentryLogging
service_tag 'gibill-statement'

# TO-DO: Remove this action after transition of LTS to 24/7 availability
before_action :service_available?, only: :show

STATSD_GI_BILL_TOTAL_KEY = 'api.lighthouse.gi_bill_status.total'
Expand All @@ -35,8 +36,9 @@ def handle_error(e)
render json: { errors: e.errors }, status: status || :internal_server_error
end

# TO-DO: Remove this method after transition of LTS to 24/7 availability
def service_available?
unless BenefitsEducation::Service.within_scheduled_uptime?
unless Flipper.enabled?(:sob_updated_design) || BenefitsEducation::Service.within_scheduled_uptime?
StatsD.increment(STATSD_GI_BILL_FAIL_KEY, tags: ['error:scheduled_downtime'])
headers['Retry-After'] = BenefitsEducation::Service.retry_after_time
# 503 response
Expand Down Expand Up @@ -67,6 +69,7 @@ def user_json(user)
}.to_json
end

# TO-DO: Remove this method after transition of LTS to 24/7 availability
def skip_sentry_exception_types
super + [BenefitsEducation::OutsideWorkingHours]
end
Expand Down
10 changes: 7 additions & 3 deletions app/models/backend_status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

require 'backend_services'

# TO-DO: After transition of Post-911 GI Bill to 24/7 availability, confirm
# BackendStatus (singular) model and related logic can be removed
class BackendStatus
include ActiveModel::Serialization
include ActiveModel::Validations
Expand All @@ -18,16 +20,18 @@ def initialize(name:, service_id: nil)
end

def available?
gibs_service? ? BenefitsEducation::Service.within_scheduled_uptime? : true
service_subject_to_downtime? ? BenefitsEducation::Service.within_scheduled_uptime? : true
end

def uptime_remaining
gibs_service? ? BenefitsEducation::Service.seconds_until_downtime.to_i : 0
service_subject_to_downtime? ? BenefitsEducation::Service.seconds_until_downtime.to_i : 0
end

private

def gibs_service?
def service_subject_to_downtime?
return false if Flipper.enabled?(:sob_updated_design)

@name == BackendServices::GI_BILL_STATUS
end
end
130 changes: 0 additions & 130 deletions app/models/base_facility.rb

This file was deleted.

20 changes: 0 additions & 20 deletions app/models/drivetime_band.rb

This file was deleted.

6 changes: 0 additions & 6 deletions app/models/facilities/dod_facility.rb

This file was deleted.

Loading

0 comments on commit bd2e8e9

Please sign in to comment.