Skip to content

Commit

Permalink
Merge branch 'master' into arf.80297/ARP-OGC-number
Browse files Browse the repository at this point in the history
* master: (33 commits)
  [DBX-74810] Add flipper with LH BI api for 4142 (#16483)
  upadte param dig call (#16570)
  98 add code to poll average days (#16471)
  8147 claim model (#16525)
  Toxic Exposure: Save TE "Add Conditions" fields for future transformation (#16548)
  Revert "ClamAV in Containers (#15965)" (#16557)
  Dangerfile updates for db migration (#16511)
  API-35829-error_handling (#16522)
  add loggers to see what dd api call is doing in staging (#16539)
  8440: fix appointments contract schema (#16528)
  ClamAV in Containers (#15965)
  Protect against calling `.any?` on a non-array (#16547)
  BE | Ask VA Api: Refactor classes and specs (#16542)
  Added '10-10EZR' to the list of freeze schemas (#16478)
  Add prefill for 10-7959c (#16448)
  Bump shrine from 3.5.0 to 3.6.0 (#16532)
  change limit on place and location. update question number (#16537)
  Add words_to_remove for simple forms 21-0966 (#16477)
  updgrade sidekiq and super_diff (#16536)
  BE | Ask Va Api:  Update `Inquiries::Creator` `Correspondences::Creator` Error Handling (#16529)
  ...
  • Loading branch information
gabezurita committed Apr 30, 2024
2 parents e2b061b + fddead9 commit aedce15
Show file tree
Hide file tree
Showing 108 changed files with 3,318 additions and 773 deletions.
12 changes: 8 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ app/models/education_benefits_claim.rb @department-of-veterans-affairs/my-educat
app/models/education_benefits_submission.rb @department-of-veterans-affairs/my-education-benefits @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/education_stem_automated_decision.rb @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/eligible_data_class.rb @department-of-veterans-affairs/vfs-vaos @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/evss_claim_document.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/evss_claim_document.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/evss_claim.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/evss_claims_sync_status_tracker.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/evss_claims_sync_status_tracker.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/expiry_scanner.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/external_services_redis/status.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/models/facilities @department-of-veterans-affairs/vfs-facilities-frontend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -624,6 +624,7 @@ app/sidekiq/in_progress_form_cleaner.rb @department-of-veterans-affairs/vfs-auth
app/sidekiq/kms_key_rotation @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/sidekiq/lighthouse @department-of-veterans-affairs/backend-review-group
app/sidekiq/lighthouse/submit_career_counseling_job.rb @department-of-veterans-affairs/my-education-benefits @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/sidekiq/load_average_days_for_claim_completion_job.rb @department-of-veterans-affairs/benefits-microservices @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/sidekiq/mhv @department-of-veterans-affairs/vfs-mhv-medical-records @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/sidekiq/pager_duty @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/sidekiq/preneeds @department-of-veterans-affairs/mbs-core-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -692,6 +693,7 @@ config/form_profile_mappings/5655.yml @department-of-veterans-affairs/vsa-debt-r
config/form_profile_mappings/686C-674.yml @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
config/form_profile_mappings/FEEDBACK-TOOL.yml @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/my-education-benefits
config/form_profile_mappings/MDOT.yml @department-of-veterans-affairs/va-cto-health-products @department-of-veterans-affairs/backend-review-group
config/form_profile_mappings/10-7959c.yml @department-of-veterans-affairs/champva-engineering @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
config/freshclam.conf @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
config/health_care_application @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
config/initializers/01_redis.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -1252,7 +1254,7 @@ spec/sidekiq/evss/disability_compensation_form/submit_form526_spec.rb @departmen
spec/sidekiq/evss/disability_compensation_form/submit_form8940_spec.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/sidekiq/evss/disability_compensation_form/submit_uploads_spec.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/sidekiq/evss/disability_compensation_form/upload_bdd_instructions_spec.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/sidekiq/evss/document_upload_spec.rb @department-of-veterans-affairs/backend-review-group
spec/sidekiq/evss/document_upload_spec.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/sidekiq/evss/retrieve_claims_from_remote_job_spec.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/sidekiq/evss/update_claim_from_remote_job_spec.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/sidekiq/export_breaker_status_spec.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand All @@ -1271,6 +1273,7 @@ spec/sidekiq/in_progress_form_cleaner_spec.rb @department-of-veterans-affairs/vf
spec/sidekiq/kms_key_rotation @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/sidekiq/lighthouse @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/sidekiq/lighthouse/pension_benefit_intake_job_spec.rb @department-of-veterans-affairs/pensions @department-of-veterans-affairs/backend-review-group
spec/sidekiq/load_average_days_for_claim_completion_job_spec.rb @department-of-veterans-affairs/benefits-microservices @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/sidekiq/mhv @department-of-veterans-affairs/vfs-mhv-medical-records @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/sidekiq/pager_duty @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/sidekiq/preneeds @department-of-veterans-affairs/mbs-core-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -1535,7 +1538,7 @@ spec/requests/csrf_request_spec.rb @department-of-veterans-affairs/octo-identity
spec/requests/debts_spec.rb @department-of-veterans-affairs/vsa-debt-resolution @department-of-veterans-affairs/backend-review-group
spec/requests/decision_review_evidences_request_spec.rb @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/requests/disability_compensation_form_request_spec.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/requests/documents_spec.rb @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/requests/documents_spec.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/requests/education_benefits_claims_request_spec.rb @department-of-veterans-affairs/my-education-benefits @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/requests/evss_claims_async_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/requests/evss_claims_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -1884,6 +1887,7 @@ spec/support/vcr_cassettes/lighthouse/benefits_intake/200_lighthouse_intake_bulk
spec/support/vcr_cassettes/lighthouse/benefits_intake/200_lighthouse_intake_bulk_status_report_success.yml @department-of-veterans-affairs/platform-va-product-forms @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/support/vcr_cassettes/lighthouse/claims/200_response.yml @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/dbex-trex
spec/support/vcr_cassettes/lighthouse/direct_deposit @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/dbex-trex @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/support/vcr_cassettes/lighthouse/facilities_401.yml @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group @department-of-veterans-affairs/vfs-facilities-frontend
spec/support/vcr_cassettes/lighthouse/veteran_verification @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/dbex-trex @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/support/vcr_cassettes/mail_automation @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/support/vcr_cassettes/map @department-of-veterans-affairs/octo-identity
Expand Down
82 changes: 0 additions & 82 deletions .github/workflows/check-git-log.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: ruby/setup-ruby@22fdc77bf4148f810455b226c90fb81b5cbc00a7
- uses: ruby/setup-ruby@1198b074305f9356bd56dd4b311757cc0dab2f1c
with:
bundler-cache: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/income-limits-data-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
income_limits_data_sync:
runs-on: self-hosted
container:
image: public.ecr.aws/docker/library/ruby:3.2.2-bullseye
image: public.ecr.aws/docker/library/ruby:3.2.4-bullseye
env:
SSL_CERT_FILE: /etc/ssl/certs/ca-certificates.crt
NODE_EXTRA_CA_CERTS: /etc/ssl/certs/ca-certificates.crt
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.3
3.2.4
7 changes: 3 additions & 4 deletions Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,10 @@ module VSPDanger
- #{app_files.join "\n- "}
</details>
Database migrations do not run automatically with vets-api deployments. Application code must always be
backwards compatible with the DB, both before and after migrations have been run. For more info:
Application code must always be backwards compatible with the DB,
both before and after migrations have been run. For more info:
- [`vets-api` Database Migrations](https://depo-platform-documentation.scrollhelp.site/developer-docs/Vets-API-Database-Migrations.689832034.html)
- [`vets-api` Deployment Process](https://depo-platform-documentation.scrollhelp.site/infrastructure/Deployment-process.590970953.html)
- [vets-api Database Migrations](https://depo-platform-documentation.scrollhelp.site/developer-docs/Vets-API-Database-Migrations.689832034.html)
EMSG
end

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.2.3-slim-bookworm as rubyimg
FROM ruby:3.2.4-slim-bookworm as rubyimg

# XXX: using stretch here for pdftk dep, which is not availible after
# stretch (or in alpine) and is switched automatically to pdftk-java in buster
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-k8s
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.2.3-slim-bullseye AS rubyimg
FROM ruby:3.2.4-slim-bullseye AS rubyimg
FROM rubyimg AS modules

WORKDIR /tmp
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source 'https://rubygems.org'

ruby '~> 3.2.3'
ruby '~> 3.2.4'

# Modules
path 'modules' do
Expand Down
32 changes: 16 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
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.914.0)
aws-sdk-core (3.192.0)
aws-partitions (1.920.0)
aws-sdk-core (3.193.0)
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.79.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-kms (1.80.0)
aws-sdk-core (~> 3, >= 3.193.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.147.0)
aws-sdk-core (~> 3, >= 3.192.0)
aws-sdk-s3 (1.148.0)
aws-sdk-core (~> 3, >= 3.193.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sdk-sns (1.73.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-sns (1.74.0)
aws-sdk-core (~> 3, >= 3.193.0)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.8.0)
aws-eventstream (~> 1, >= 1.0.2)
Expand Down Expand Up @@ -365,7 +365,7 @@ GEM
docile (1.4.0)
dogstatsd-ruby (5.6.1)
domain_name (0.6.20240107)
down (5.4.1)
down (5.4.2)
addressable (~> 2.8)
drb (2.2.1)
dry-configurable (1.1.0)
Expand Down Expand Up @@ -693,7 +693,7 @@ GEM
os (1.1.4)
ox (2.14.18)
parallel (1.24.0)
parallel_tests (4.7.0)
parallel_tests (4.7.1)
parallel
parser (3.3.0.5)
ast (~> 2.4.1)
Expand Down Expand Up @@ -743,7 +743,7 @@ GEM
stringio
psych (5.1.2-java)
jar-dependencies (>= 0.1.7)
public_suffix (5.0.4)
public_suffix (5.0.5)
puma (6.4.2)
nio4r (~> 2.0)
puma (6.4.2-java)
Expand All @@ -753,7 +753,7 @@ GEM
raabro (1.4.0)
racc (1.7.3)
racc (1.7.3-java)
rack (2.2.8.1)
rack (2.2.9)
rack-attack (6.7.0)
rack (>= 1.0, < 4)
rack-cors (2.0.2)
Expand Down Expand Up @@ -959,10 +959,10 @@ GEM
shellany (0.0.1)
shoulda-matchers (6.2.0)
activesupport (>= 5.2.0)
shrine (3.5.0)
shrine (3.6.0)
content_disposition (~> 1.0)
down (~> 5.1)
sidekiq (7.2.2)
sidekiq (7.2.4)
concurrent-ruby (< 2)
connection_pool (>= 2.3.0)
rack (>= 2.2.4)
Expand Down Expand Up @@ -998,7 +998,7 @@ GEM
stringio (3.1.0)
strong_migrations (1.8.0)
activerecord (>= 5.2)
super_diff (0.12.0)
super_diff (0.12.1)
attr_extras (>= 6.2.4)
diff-lcs
patience_diff
Expand Down Expand Up @@ -1280,7 +1280,7 @@ DEPENDENCIES
yard

RUBY VERSION
ruby 3.2.3p157
ruby 3.2.4p170

BUNDLED WITH
2.4.9
22 changes: 22 additions & 0 deletions app/models/evss_claim_document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class EVSSClaimDocument < Common::Base

validates(:file_name, presence: true)
validate :known_document_type?
validate :content_type_matches_extension?
validate :unencrypted_pdf?
before_validation :normalize_text, :convert_to_unlocked_pdf, :normalize_file_name

Expand Down Expand Up @@ -81,6 +82,27 @@ def tracked_item_id=(num)

private

def content_type_matches_extension?
return unless file_obj

true_mime_type = MimeMagic.by_magic(File.open(file_obj.tempfile.path)).to_s

# MimeMagic cannot always determine the mime_type and will sometimes
# return ''. In those cases it makes sense to fall back to the content_type
# as passed in when the request is made
true_mime_type = file_obj.content_type if true_mime_type.empty?

assumed_mime_type = MimeMagic.by_extension(extension).to_s

errors.add(:base, I18n.t('errors.messages.uploads.content_type_mismatch')) if true_mime_type != assumed_mime_type
end

def extension
# Using file_name instead of file_path because the temp path doesn't include
# an extension
File.extname(file_name).downcase[1..] # Remove the leading dot
end

def known_document_type?
errors.add(:base, I18n.t('errors.messages.uploads.document_type_unknown')) unless description
end
Expand Down
3 changes: 2 additions & 1 deletion app/models/form_profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,14 @@ class FormProfile
coe: ['26-1880'],
adapted_housing: ['26-4555'],
intent_to_file: ['21-0966'],
ivc_champva: ['10-7959F-1']
ivc_champva: %w[10-7959F-1 10-7959C]
}.freeze

FORM_ID_TO_CLASS = {
'0873' => ::FormProfiles::VA0873,
'1010EZ' => ::FormProfiles::VA1010ez,
'10-10EZR' => ::FormProfiles::VA1010ezr,
'10-7959C' => ::FormProfiles::VHA107959c,
'10182' => ::FormProfiles::VA10182,
'20-0995' => ::FormProfiles::VA0995,
'20-0996' => ::FormProfiles::VA0996,
Expand Down
Loading

0 comments on commit aedce15

Please sign in to comment.