Skip to content

Commit

Permalink
Merge branch 'master' into 99019-dr-logging-for-old-job-usage
Browse files Browse the repository at this point in the history
  • Loading branch information
dfong-adh authored Jan 2, 2025
2 parents 54d02c2 + a0c0220 commit 01deda7
Show file tree
Hide file tree
Showing 330 changed files with 17,667 additions and 7,915 deletions.
25 changes: 20 additions & 5 deletions .github/CODEOWNERS

Large diffs are not rendered by default.

18 changes: 15 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ on:
permissions:
contents: read
jobs:
compare_sha:
runs-on: ubuntu-latest
name: Compare sha
steps:
- name: Compare commit ids
run: |
echo "github.sha: ${{ github.sha }}"
echo "github.event.push.head_commit.id: ${{ github.event.push.head_commit.id }}"
echo "github.event.pull_request.merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}"
echo "github.event.head_commit.id: ${{ github.event.head_commit.id }}"
echo "github.event.workflow_run.head_commit.id: ${{ github.event.workflow_run.head_commit.id }}"
build_and_push:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Build and Push
Expand Down Expand Up @@ -39,7 +51,7 @@ jobs:
file: ./postman/Dockerfile
push: true
tags: |
${{ steps.login-ecr.outputs.registry }}/dsva/vets-api-postman:${{ github.sha }}
${{ steps.login-ecr.outputs.registry }}/dsva/vets-api-postman:${{ github.event.workflow_run.head_commit.id }}
- name: Build vets-api Docker Image
uses: docker/build-push-action@v6
env:
Expand All @@ -52,7 +64,7 @@ jobs:
context: .
push: true
tags: |
${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_REPOSITORY }}:${{ github.sha }}
${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_REPOSITORY }}:${{ github.event.workflow_run.head_commit.id }}
cache-from: type=registry,ref=$ECR_REGISTRY/$ECR_REPOSITORY
cache-to: type=inline
deploy:
Expand All @@ -63,7 +75,7 @@ jobs:
ecr_repository: "vets-api"
manifests_directory: "vets-api"
auto_deploy_envs: "dev staging prod sandbox"
commit_sha: ${{ github.sha }}
commit_sha: ${{ github.event.workflow_run.head_commit.id }}
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
11 changes: 11 additions & 0 deletions .github/workflows/code_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ permissions:
contents: read
checks: write
jobs:
compare_sha:
runs-on: ubuntu-latest
name: Compare sha
steps:
- name: Compare commit ids
run: |
echo "github.sha: ${{ github.sha }}"
echo "github.event.push.head_commit.id: ${{ github.event.push.head_commit.id }}"
echo "github.event.pull_request.merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}"
echo "github.event.head_commit.id: ${{ github.event.head_commit.id }}"
linting_and_security:
name: Linting and Security
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/danger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
bundler-cache: true

- name: Run Danger
run: bundle exec danger --head=${{ github.sha }} --base=${{ github.event.pull_request.base.sha }} --verbose
run: bundle exec danger --verbose

- name: Add Danger Label
uses: actions-ecosystem/action-remove-labels@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
auto_deploy_envs:
required: true
type: string
commit_sha: # #${{ github.sha }}
commit_sha: # #${{ github.event.workflow_run.head_commit.id }}
required: true
type: string
secrets:
Expand Down
4 changes: 2 additions & 2 deletions Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
require 'ostruct'

module VSPDanger
HEAD_SHA = `git rev-parse --abbrev-ref HEAD`.chomp.freeze
BASE_SHA = 'origin/master'
HEAD_SHA = ENV.fetch('GITHUB_HEAD_REF', '').empty? ? `git rev-parse --abbrev-ref HEAD`.chomp.freeze : "origin/#{ENV.fetch('GITHUB_HEAD_REF')}"
BASE_SHA = ENV.fetch('GITHUB_BASE_REF', '').empty? ? 'origin/master' : "origin/#{ENV.fetch('GITHUB_BASE_REF')}"

class Runner
def self.run
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ group :development, :test do
gem 'guard-rspec'
gem 'parallel_tests'
gem 'pry-byebug'
gem 'rack-test', '2.1.0', require: 'rack/test'
gem 'rack-test', '2.2.0', require: 'rack/test'
gem 'rack-vcr'
gem 'rainbow' # Used to colorize output for rake tasks
gem 'rspec-instrumentation-matcher'
Expand Down
62 changes: 30 additions & 32 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -272,16 +272,16 @@ GEM
bcp47 (0.3.3)
i18n
benchmark (0.4.0)
bigdecimal (3.1.8)
bigdecimal (3.1.8-java)
bigdecimal (3.1.9)
bigdecimal (3.1.9-java)
bindex (0.8.1)
blind_index (2.6.1)
activesupport (>= 7)
argon2-kdf (>= 0.2)
blueprinter (1.1.2)
bootsnap (1.18.4)
msgpack (~> 1.2)
brakeman (6.2.2)
brakeman (7.0.0)
racc
breakers (0.7.1)
faraday (>= 1.2.0, < 3.0)
Expand Down Expand Up @@ -375,7 +375,7 @@ GEM
libddwaf (~> 1.14.0.0.0)
msgpack
debase-ruby_core_source (3.3.1)
debug (1.9.2)
debug (1.10.0)
irb (~> 1.10)
reline (>= 0.3.8)
declarative (0.0.20)
Expand Down Expand Up @@ -543,7 +543,7 @@ GEM
ffi (~> 1)
ffi-compiler (~> 1)
rake (>= 13)
googleauth (1.12.0)
googleauth (1.12.2)
faraday (>= 1.0, < 3.a)
google-cloud-env (~> 2.2)
google-logging-utils (~> 0.1)
Expand Down Expand Up @@ -604,15 +604,15 @@ GEM
ruby-vips (>= 2.0.17, < 3)
io-console (0.8.0)
io-console (0.8.0-java)
irb (1.14.1)
irb (1.14.3)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
iso_country_codes (0.7.8)
jar-dependencies (0.5.0)
jar-dependencies (0.5.1)
jmespath (1.6.2)
jruby-openssl (0.15.1-java)
json (2.9.0)
json (2.9.0-java)
json (2.9.1)
json (2.9.1-java)
json-schema (5.1.0)
addressable (~> 2.8)
json_schema (0.21.0)
Expand Down Expand Up @@ -652,8 +652,8 @@ GEM
llhttp-ffi (0.5.0)
ffi-compiler (~> 1.0)
rake (~> 13.0)
lockbox (2.0.0)
logger (1.6.2)
lockbox (2.0.1)
logger (1.6.4)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand Down Expand Up @@ -705,11 +705,9 @@ GEM
nio4r (2.7.4-java)
nkf (0.2.0)
nkf (0.2.0-java)
nokogiri (1.16.8)
nokogiri (1.17.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.8-java)
racc (~> 1.4)
nori (2.7.1)
bigdecimal
notiffany (0.1.3)
Expand Down Expand Up @@ -766,8 +764,8 @@ GEM
ruby-rc4
ttfunk
pg (1.5.9)
pg_query (5.1.0)
google-protobuf (>= 3.22.3)
pg_query (6.0.0)
google-protobuf (>= 3.25.3)
pg_search (2.3.7)
activerecord (>= 6.1)
activesupport (>= 6.1)
Expand All @@ -793,10 +791,10 @@ GEM
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
pstore (0.1.3)
psych (5.2.1)
psych (5.2.2)
date
stringio
psych (5.2.1-java)
psych (5.2.2-java)
date
jar-dependencies (>= 0.1.7)
public_suffix (6.0.1)
Expand All @@ -819,7 +817,7 @@ GEM
rack (~> 2.2, >= 2.2.4)
rack-session (1.0.2)
rack (< 3)
rack-test (2.1.0)
rack-test (2.2.0)
rack (>= 1.3)
rack-timeout (0.7.0)
rack-vcr (0.1.6)
Expand All @@ -845,7 +843,7 @@ GEM
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.1)
rails-html-sanitizer (1.6.2)
loofah (~> 2.21)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rails-session_cookie (0.3.0)
Expand All @@ -868,16 +866,16 @@ GEM
rb-inotify (0.10.1)
ffi (~> 1.0)
rchardet (1.8.0)
rdoc (6.8.1)
rdoc (6.10.0)
psych (>= 4.0.0)
redis (5.3.0)
redis-client (>= 0.22.0)
redis-client (0.22.2)
connection_pool
redis-namespace (1.11.0)
redis (>= 4)
regexp_parser (2.9.3)
reline (0.5.12)
regexp_parser (2.10.0)
reline (0.6.0)
io-console (~> 0.5)
representable (3.2.0)
declarative (< 0.1.0)
Expand All @@ -886,8 +884,8 @@ GEM
request_store (1.7.0)
rack (>= 1.4)
require_all (3.0.0)
restforce (7.5.0)
faraday (>= 1.1.0, < 2.12.0)
restforce (8.0.0)
faraday (>= 1.1.0, < 3.0.0)
faraday-follow_redirects (<= 0.3.0, < 1.0.0)
faraday-multipart (>= 1.0.0, < 2.0.0)
faraday-net_http (< 4.0.0)
Expand Down Expand Up @@ -923,7 +921,7 @@ GEM
rspec-mocks (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-rails (7.0.1)
rspec-rails (7.1.0)
actionpack (>= 7.0)
activesupport (>= 7.0)
railties (>= 7.0)
Expand All @@ -938,7 +936,7 @@ GEM
rspec-expectations (~> 3.0)
rspec-mocks (~> 3.0)
sidekiq (>= 5, < 8)
rspec-support (3.13.1)
rspec-support (3.13.2)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rswag-specs (2.16.0)
Expand Down Expand Up @@ -967,7 +965,7 @@ GEM
rubocop-factory_bot (2.26.1)
rubocop (~> 1.61)
rubocop-junit-formatter (0.1.4)
rubocop-rails (2.27.0)
rubocop-rails (2.28.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.52.0, < 2.0)
Expand Down Expand Up @@ -1006,7 +1004,7 @@ GEM
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
script_utils (0.0.4)
securerandom (0.4.0)
securerandom (0.4.1)
seedbank (0.5.0)
rake (>= 10.0)
semantic_logger (4.16.0)
Expand Down Expand Up @@ -1053,7 +1051,7 @@ GEM
staccato (0.5.3)
statsd-instrument (3.9.7)
stringio (3.1.2)
strong_migrations (2.0.2)
strong_migrations (2.1.0)
activerecord (>= 6.1)
super_diff (0.14.0)
attr_extras (>= 6.2.4)
Expand All @@ -1067,7 +1065,7 @@ GEM
thread_safe (0.3.6-java)
tilt (2.3.0)
timecop (0.9.10)
timeout (0.4.2)
timeout (0.4.3)
trailblazer-option (0.1.2)
ttfunk (1.8.0)
bigdecimal (~> 3.1)
Expand Down Expand Up @@ -1275,7 +1273,7 @@ DEPENDENCIES
rack
rack-attack
rack-cors
rack-test (= 2.1.0)
rack-test (= 2.2.0)
rack-timeout
rack-vcr
rails (~> 7.2.2)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Vets API
This project provides common APIs for applications that live on VA.gov (formerly vets.gov APIs).
This project provides common APIs for applications that live on VA.gov (formerly vets.gov APIs).


[![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](https://www.rubydoc.info/github/department-of-veterans-affairs/vets-api)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/claims_base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def create

def show
submission = CentralMailSubmission.joins(:central_mail_claim).find_by(saved_claims: { guid: params[:id] })
render json: CentralMailSubmissionSerializer.new(submission)
render json: BenefitsIntakeSubmissionSerializer.new(submission)
end

private
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/concerns/exception_handling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def report_mapped_exception(exception, va_exception)
# Add additional user specific context to the logs
if exception.is_a?(Common::Exceptions::BackendServiceException) && current_user.present?
extra[:icn] = current_user.icn
extra[:mhv_correlation_id] = current_user.mhv_correlation_id
extra[:mhv_credential_uuid] = current_user.mhv_credential_uuid
end
va_exception_info = { va_exception_errors: va_exception.errors.map(&:to_hash) }
log_exception_to_sentry(exception, extra.merge(va_exception_info))
Expand Down
Loading

0 comments on commit 01deda7

Please sign in to comment.