Skip to content

Commit

Permalink
Merge branch 'master' into API-34957-v1-error-formatter-update
Browse files Browse the repository at this point in the history
  • Loading branch information
rockwellwindsor-va committed Apr 16, 2024
2 parents fa55a47 + 9f5164e commit 63a9253
Show file tree
Hide file tree
Showing 513 changed files with 29,094 additions and 5,450 deletions.
19 changes: 9 additions & 10 deletions .github/CODEOWNERS

Large diffs are not rendered by default.

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
27 changes: 13 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ GIT

GIT
remote: https://github.com/department-of-veterans-affairs/vets-json-schema
revision: 7892dc348677325cc57712ff4a12d6a78f024315
revision: 0832461353f871b688b0c231ecf9bdbfb1f9145a
branch: master
specs:
vets_json_schema (21.5.5)
vets_json_schema (22.0.3)
multi_json (~> 1.0)
script_utils (= 0.0.4)

Expand Down 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 @@ -660,7 +660,7 @@ GEM
nio4r (2.7.0)
nio4r (2.7.0-java)
no_proxy_fix (0.1.2)
nokogiri (1.16.3)
nokogiri (1.16.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nori (2.6.0)
Expand Down Expand Up @@ -692,7 +692,7 @@ GEM
os (1.1.4)
ox (2.14.18)
parallel (1.24.0)
parallel_tests (4.6.0)
parallel_tests (4.6.1)
parallel
parser (3.3.0.5)
ast (~> 2.4.1)
Expand Down Expand Up @@ -890,7 +890,7 @@ GEM
rswag-ui (2.13.0)
actionpack (>= 3.1, < 7.2)
railties (>= 3.1, < 7.2)
rubocop (1.62.1)
rubocop (1.63.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -913,7 +913,7 @@ GEM
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (2.28.0)
rubocop-rspec (2.29.1)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
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.1)
sentry-ruby (5.17.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
shellany (0.0.1)
Expand Down Expand Up @@ -1283,4 +1283,3 @@ RUBY VERSION

BUNDLED WITH
2.4.9

15 changes: 15 additions & 0 deletions app/controllers/v0/average_days_for_claim_completion_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

module V0
class AverageDaysForClaimCompletionController < ApplicationController
service_tag 'average-days-to-completion'
skip_before_action :authenticate, only: :index

def index
rtn = AverageDaysForClaimCompletion.order('created_at DESC').first
render json: {
average_days: rtn.present? ? rtn.average_days : -1.0
}
end
end
end
28 changes: 28 additions & 0 deletions app/controllers/v0/burial_claims_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ module V0
class BurialClaimsController < ClaimsBaseController
service_tag 'burial-application'

def show
submission_attempt = determine_submission_attempt
if submission_attempt
state = submission_attempt.aasm_state == 'failure' ? 'failure' : 'success'
render(json: { data: { attributes: { state: } } })
elsif central_mail_submission
render(json: central_mail_submission)
else
Rails.logger.error("ActiveRecord::RecordNotFound: Claim submission not found for claim_id: #{params[:id]}")
render(json: { data: { attributes: { state: 'not found' } } }, status: :not_found)
end
rescue => e
Rails.logger.error(e.to_s)
render(json: { data: { attributes: { state: 'error processing request' } } }, status: :unprocessable_entity)
end

def create
PensionBurial::TagSentry.tag_sentry

Expand Down Expand Up @@ -37,5 +53,17 @@ def short_name
def claim_class
SavedClaim::Burial
end

private

def determine_submission_attempt
claim = claim_class.find_by(guid: params[:id])
form_submission = claim&.form_submissions&.last
form_submission&.form_submission_attempts&.last
end

def central_mail_submission
CentralMailSubmission.joins(:central_mail_claim).find_by(saved_claims: { guid: params[:id] })
end
end
end
4 changes: 1 addition & 3 deletions app/controllers/v0/decision_review_evidences_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ class DecisionReviewEvidencesController < ApplicationController
def save_attachment_to_cloud!
common_log_params = {
key: :evidence_upload_to_s3,
# Will have to update this when NOD and SC using same LH API version. The beginning of that work is ticketed in
# https://github.com/department-of-veterans-affairs/va.gov-team/issues/66514.
form_id: get_form_id_from_request_headers,
user_uuid: current_user.uuid,
downstream_system: 'AWS S3',
Expand All @@ -41,7 +39,7 @@ def get_form_id_from_request_headers
# - vets-website/src/platform/startup/setup.js (setUpCommonFunctionality)
# - vets-website/src/platform/startup/index.js (startApp)
source_app_name = request.headers['Source-App-Name']
# The higher-level review form (966) is not included in this list because it does permit evidence uploads.
# The higher-level review form (996) is not included in this list because it does not permit evidence uploads.
form_id = {
'10182-board-appeal' => '10182',
'995-supplemental-claim' => '995'
Expand Down
163 changes: 0 additions & 163 deletions app/controllers/v0/financial_status_reports_controller.rb

This file was deleted.

Loading

0 comments on commit 63a9253

Please sign in to comment.