diff --git a/config/features.yml b/config/features.yml index 28bfd610610..1d75967a58b 100644 --- a/config/features.yml +++ b/config/features.yml @@ -1020,10 +1020,6 @@ features: actor_type: user description: Allows veterans to cancel VA appointments enable_in_development: true - va_online_scheduling_clinic_filtering: - actor_type: user - description: Allows clinic selection filtering by stop codes - enable_in_development: true va_online_scheduling_community_care: actor_type: user description: Allows veterans to submit requests for Community Care appointments diff --git a/lib/decision_review/utilities/pdf_validation/configuration.rb b/lib/decision_review/utilities/pdf_validation/configuration.rb index 80f93c24878..75961e382b0 100644 --- a/lib/decision_review/utilities/pdf_validation/configuration.rb +++ b/lib/decision_review/utilities/pdf_validation/configuration.rb @@ -4,7 +4,7 @@ module DecisionReview module PdfValidation class Configuration < DecisionReview::Configuration ## - # @return [String] Base path for decision review URLs. + # @return [String] Base path for PDF validation URL. # def base_path Settings.decision_review.pdf_validation.url @@ -17,6 +17,19 @@ def service_name 'DecisionReview::PDFValidation' end + ## + # @return [Hash] The basic headers required for any decision review API call. + # + def self.base_request_headers + # Can use regular Decision Reviews API key in lower environments + return super unless Rails.env.production? + + # Since we're using the `uploads/validate_document` endpoint under Benefits Intake API, + # we need to use their API key. This is pulled from BenefitsIntakeService::Configuration + api_key = Settings.benefits_intake_service.api_key || Settings.form526_backup.api_key + super.merge('apiKey' => api_key) + end + ## # Creates the a connection with parsing json and adding breakers functionality. # diff --git a/modules/claims_api/lib/bgs_service/local_bgs.rb b/modules/claims_api/lib/bgs_service/local_bgs.rb index 9e99d25c9cb..a86683900b3 100644 --- a/modules/claims_api/lib/bgs_service/local_bgs.rb +++ b/modules/claims_api/lib/bgs_service/local_bgs.rb @@ -33,8 +33,11 @@ def self.breakers_service url = Settings.bgs.url path = URI.parse(url).path host = URI.parse(url).host + port = URI.parse(url).port matcher = proc do |request_env| - request_env.url.host == host && request_env.url.path =~ /^#{path}/ + request_env.url.host == host && + request_env.url.port == port && + request_env.url.path =~ /^#{path}/ end Breakers::Service.new( diff --git a/modules/claims_api/spec/fixtures/test_client.p12 b/modules/claims_api/spec/fixtures/test_client.p12 index a253a22f3ed..48fde3d8efa 100644 Binary files a/modules/claims_api/spec/fixtures/test_client.p12 and b/modules/claims_api/spec/fixtures/test_client.p12 differ diff --git a/modules/vaos/app/services/vaos/v2/systems_service.rb b/modules/vaos/app/services/vaos/v2/systems_service.rb index 7b8da35423a..32503b2e1a1 100644 --- a/modules/vaos/app/services/vaos/v2/systems_service.rb +++ b/modules/vaos/app/services/vaos/v2/systems_service.rb @@ -3,8 +3,6 @@ module VAOS module V2 class SystemsService < VAOS::SessionService - STOP_CODE_FILTERS = :va_online_scheduling_clinic_filtering - def get_facility_clinics(location_id:, clinical_service: nil, clinic_ids: nil, @@ -21,11 +19,9 @@ def get_facility_clinics(location_id:, 'pageNumber' => page_number }.compact - # 'clinicalService' is used to retrieve clinics for appointment scheduling, + # 'clinicalService' is used when retrieving clinics for appointment scheduling, # triggering stop code filtering to avoid displaying unavailable clinics. - if url_params['clinicalService'].present? && Flipper.enabled?(STOP_CODE_FILTERS, user) - url_params.merge!('enableStopCodeFilter' => true) - end + url_params.merge!('enableStopCodeFilter' => true) if url_params['clinicalService'].present? response = perform(:get, url, url_params, headers) response.body[:data].map { |clinic| OpenStruct.new(clinic) } diff --git a/modules/vba_documents/app/sidekiq/vba_documents/upload_processor.rb b/modules/vba_documents/app/sidekiq/vba_documents/upload_processor.rb index 43a35c36ffb..6909fec42f0 100644 --- a/modules/vba_documents/app/sidekiq/vba_documents/upload_processor.rb +++ b/modules/vba_documents/app/sidekiq/vba_documents/upload_processor.rb @@ -21,8 +21,6 @@ class UploadProcessor sidekiq_options unique_for: 30.days def perform(guid, caller_data, retries = 0) - return if cancelled? - response = nil brt = Benchmark.realtime do # @retries variable used via the CentralMail::Utilities which is included via VBADocuments::UploadValidations @@ -46,20 +44,6 @@ def perform(guid, caller_data, retries = 0) response&.success? ? true : false end - def cancelled? - Sidekiq.redis do |c| - if c.respond_to? :exists? - c.exists?("cancelled-#{jid}") - else - c.exists("cancelled-#{jid}") - end - end - end - - def self.cancel!(jid) - Sidekiq.redis { |c| c.setex("cancelled-#{jid}", 86_400, 1) } - end - private # rubocop:disable Metrics/MethodLength diff --git a/modules/vba_documents/spec/request/v1/uploads_request_spec.rb b/modules/vba_documents/spec/request/v1/uploads_request_spec.rb index aec54da50f3..7553ff67406 100644 --- a/modules/vba_documents/spec/request/v1/uploads_request_spec.rb +++ b/modules/vba_documents/spec/request/v1/uploads_request_spec.rb @@ -135,7 +135,6 @@ @md = JSON.parse(valid_metadata) @upload_submission = VBADocuments::UploadSubmission.new @upload_submission.update(status: 'uploaded') - allow_any_instance_of(VBADocuments::UploadProcessor).to receive(:cancelled?).and_return(false) allow_any_instance_of(Tempfile).to receive(:size).and_return(1) # must be > 0 or submission will error w/DOC107 allow(VBADocuments::MultipartParser).to receive(:parse) { { 'metadata' => @md.to_json, 'content' => valid_doc } diff --git a/modules/vba_documents/spec/request/v2/uploads_request_spec.rb b/modules/vba_documents/spec/request/v2/uploads_request_spec.rb index 4a4e2646cb9..5d74d97bdbd 100644 --- a/modules/vba_documents/spec/request/v2/uploads_request_spec.rb +++ b/modules/vba_documents/spec/request/v2/uploads_request_spec.rb @@ -202,7 +202,6 @@ @md = JSON.parse(valid_metadata) @upload_submission = VBADocuments::UploadSubmission.new @upload_submission.update(status: 'uploaded') - allow_any_instance_of(VBADocuments::UploadProcessor).to receive(:cancelled?).and_return(false) allow_any_instance_of(Tempfile).to receive(:size).and_return(1) # must be > 0 or submission will error w/DOC107 allow(VBADocuments::MultipartParser).to receive(:parse) { { 'metadata' => @md.to_json, 'content' => valid_doc } diff --git a/modules/vba_documents/spec/sidekiq/upload_processor_spec.rb b/modules/vba_documents/spec/sidekiq/upload_processor_spec.rb index c032d7aa89c..5c6294272eb 100644 --- a/modules/vba_documents/spec/sidekiq/upload_processor_spec.rb +++ b/modules/vba_documents/spec/sidekiq/upload_processor_spec.rb @@ -72,7 +72,6 @@ end before do - allow_any_instance_of(described_class).to receive(:cancelled?).and_return(false) allow_any_instance_of(Tempfile).to receive(:size).and_return(1) # must be > 0 or submission will error w/DOC107 objstore = instance_double(VBADocuments::ObjectStore) version = instance_double(Aws::S3::ObjectVersion)