Skip to content

Commit

Permalink
Merge pull request #20378 from department-of-veterans-affairs/hotfix/…
Browse files Browse the repository at this point in the history
…APPEALS-37287-test-fix

hotfix/APPEALS-37500
  • Loading branch information
raymond-hughes authored Jan 2, 2024
2 parents e5e92f2 + de39b2e commit cf83707
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 52 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/make-docs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Make-docs-to-webpage

# Trigger running when a PR is closed
# Trigger whenever changes are made to the master branch
on:
pull_request:
types: [ closed ]
push:
branches:
- master

jobs:
make_docs:
Expand All @@ -13,13 +14,21 @@ jobs:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11
image: postgres:14.8
env:
POSTGRES_DB: caseflow_certification_test
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
ports: ["5432:5432"]
redis:
image: redis:2.8.23
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports: ["6379:6379"]

steps:
- name: Debugging info
Expand All @@ -31,7 +40,7 @@ jobs:
env
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

# Since installing a client to Oracle DB is a pain and setting up the VACOLS DB is not necessary, let's skip it.
- name: Remove references to VACOLS Oracle DB
Expand Down Expand Up @@ -111,7 +120,7 @@ jobs:
# and https://github.com/Andrew-Chen-Wang/github-wiki-action/blob/master/entrypoint.sh
# and https://github.community/t/how-to-updade-repo-wiki-from-github-actions/121151/7
- name: Checkout branch main-gh-pages
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: main-gh-pages
path: main-gh-pages_checkout
Expand Down Expand Up @@ -140,17 +149,17 @@ jobs:
git add .
if git diff-index --quiet HEAD; then
echo "::set-output name=changes_docs::false"
echo "name=changes_docs::false" >> $GITHUB_OUTPUT
echo "::group::No changes to make_docs"
ls -alR schema/make_docs
echo "::endgroup::"
else
echo "::set-output name=changes_docs::true"
echo "name=changes_docs::true" >> $GITHUB_OUTPUT
echo "::group::Committing changes locally"
git config --local user.email "$WIKI_COMMIT_USER_EMAIL"
git config --local user.name "$WIKI_COMMIT_USER_NAME"
git commit -m "$WIKI_COMMIT_MESSAGE"
git commit -m "$WIKI_COMMIT_MESSAGE" && git push
echo "::endgroup::"
fi
78 changes: 36 additions & 42 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ jobs:
POSTGRES_DB: caseflow_certification_test

ports:
- 5432:5432
- 5432:5432

options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

redis:
image: redis:4.0.10
ports:
- 6379:6379
- 6379:6379

facols_db:
image: 008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/facols:latest
credentials:
username: AWS
password: ${{ secrets.ECR_PASSWORD }}
ports:
- 1521:1521
- 1521:1521

strategy:
fail-fast: false
Expand All @@ -59,32 +59,32 @@ jobs:
password: ${{ secrets.ECR_PASSWORD }}

env:
DBUS_SESSION_BUS_ADDRESS: /dev/null
RAILS_ENV: test
NODE_ENV: test
BUNDLE_PATH: vendor/bundle
COVERAGE_DIR: /home/circleci/coverage-${{matrix.ci_node_index}} #circleci is the USER
POSTGRES_HOST: postgres
POSTGRES_USER: root
POSTGRES_PASSWORD: password
KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES: true
KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC }}
KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }}
KNAPSACK_PRO_LOG_LEVEL: info
KNAPSACK_PRO_FIXED_QUEUE_SPLIT: true
WD_INSTALL_DIR: .webdrivers
CI: true
REDIS_URL_CACHE: redis://redis:6379/0/cache/
TEST_VACOLS_HOST: facols_db
DBUS_SESSION_BUS_ADDRESS: /dev/null
RAILS_ENV: test
NODE_ENV: test
BUNDLE_PATH: vendor/bundle
COVERAGE_DIR: /home/circleci/coverage-${{matrix.ci_node_index}} #circleci is the USER
POSTGRES_HOST: postgres
POSTGRES_USER: root
POSTGRES_PASSWORD: password
KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES: true
KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: ${{ secrets.KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC }}
KNAPSACK_PRO_CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
KNAPSACK_PRO_CI_NODE_INDEX: ${{ matrix.ci_node_index }}
KNAPSACK_PRO_LOG_LEVEL: info
KNAPSACK_PRO_FIXED_QUEUE_SPLIT: true
WD_INSTALL_DIR: .webdrivers
CI: true
REDIS_URL_CACHE: redis://redis:6379/0/cache/
TEST_VACOLS_HOST: facols_db

steps:
- uses: actions/checkout@v3

# If we don't explicitly set this, the runner doesn't find the path when trying to save the cache
- name: Set yarn cache directory
id: set-yarn-cache-dir
run: mkdir -p ~/.cache/yarn && yarn config set cache-folder ~/.cache/yarn
run: mkdir -p ~/.cache/yarn && yarn config set cache-folder ~/.cache/yarn

- name: restore yarn cache
id: cache-yarn-cache
Expand Down Expand Up @@ -215,8 +215,7 @@ jobs:
# --tty forces Rspec to produce color
# circleci is the USER


# Artifacts --- circleci is the USER
# Artifacts --- circleci is the USER
- run: (cd /home/circleci && tar -zcvf coverage-${{matrix.ci_node_index}}.tar.gz coverage-${{matrix.ci_node_index}})
- uses: actions/upload-artifact@v3
if: success()
Expand Down Expand Up @@ -246,25 +245,23 @@ jobs:
with:
path: ./log/bullet-${{matrix.ci_node_index}}.log



caseflow_jest_job:
# This job will run the jest, change the value below to false if you wish to turn it off.
if: true
runs-on: ubuntu-latest
container:
image: 008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/gaimg-ruby:2.7.3-ga-browsers
credentials:
username: AWS
password: ${{ secrets.ECR_PASSWORD }}
username: AWS
password: ${{ secrets.ECR_PASSWORD }}
env:
DBUS_SESSION_BUS_ADDRESS: /dev/null
RAILS_ENV: test
NODE_ENV: test
JEST_DIR: /home/circleci/test-results/jest #circleci is the USER
TEST_REPORTER: jest-junit
JEST_JUNIT_OUTPUT_DIR: /home/circleci/test-results/jest #circleci is the USER
COVERAGE_DIR: /home/circleci/coverage #circleci is the USER
DBUS_SESSION_BUS_ADDRESS: /dev/null
RAILS_ENV: test
NODE_ENV: test
JEST_DIR: /home/circleci/test-results/jest #circleci is the USER
TEST_REPORTER: jest-junit
JEST_JUNIT_OUTPUT_DIR: /home/circleci/test-results/jest #circleci is the USER
COVERAGE_DIR: /home/circleci/coverage #circleci is the USER

steps:
- name: Install Chrome
Expand Down Expand Up @@ -302,23 +299,21 @@ jobs:
with:
path: ./all_logs.log



caseflow_lint_job:
# This job will run the security lint checker, change the value below to false if you wish to turn it off.
if: true
runs-on: ubuntu-latest
container:
image: 008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/gaimg-ruby:2.7.3-ga-browsers
credentials:
username: AWS
password: ${{ secrets.ECR_PASSWORD }}
username: AWS
password: ${{ secrets.ECR_PASSWORD }}

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: '0'
fetch-depth: "0"

- name: Install Ruby Dependencies
run: |
Expand All @@ -336,10 +331,9 @@ jobs:
# DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}

- name: Lint
run: ./ci-bin/capture-log "bundle exec rake lint"
run: ./ci-bin/capture-log "bundle exec rake lint"
if: ${{ always() }}

# - name: Security
# run: ./ci-bin/capture-log "bundle exec rake security"
# if: ${{ always() }}

28 changes: 28 additions & 0 deletions app/models/serializers/work_queue/appeal_search_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,38 @@ class WorkQueue::AppealSearchSerializer
object.claimant&.name
end

attribute :appellant_first_name do |object|
object.claimant&.first_name
end

attribute :appellant_middle_name do |object|
object.claimant&.middle_name
end

attribute :appellant_last_name do |object|
object.claimant&.last_name
end

attribute :appellant_suffix do |object|
object.claimant&.suffix
end

attribute :appellant_date_of_birth do |object|
object.claimant&.date_of_birth
end

attribute :appellant_address do |object|
object.claimant&.address
end

attribute :appellant_phone_number do |object|
object.claimant&.unrecognized_claimant? ? object.claimant&.phone_number : nil
end

attribute :appellant_email_address do |object|
object.claimant&.email_address
end

attribute :veteran_death_date

attribute :veteran_file_number
Expand Down
9 changes: 9 additions & 0 deletions client/app/queue/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,18 @@ export const prepareAppealForSearchStore = (appeals) => {
issues: prepareAppealIssuesForStore(appeal),
decisionIssues: appeal.attributes.decision_issues,
appellantFullName: appeal.attributes.appellant_full_name,
appellantFirstName: appeal.attributes.appellant_first_name,
appellantMiddleName: appeal.attributes.appellant_middle_name,
appellantLastName: appeal.attributes.appellant_last_name,
appellantSuffix: appeal.attributes.appellant_suffix,
appellantDateOfBirth: appeal.attributes.appellant_date_of_birth,
appellantAddress: appeal.attributes.appellant_address,
appellantEmailAddress: appeal.attributes.appellant_email_address,
appellantPhoneNumber: appeal.attributes.appellant_phone_number,
contestedClaim: appeal.attributes.contested_claim,
assignedToLocation: appeal.attributes.assigned_to_location,
veteranGender: appeal.attributes.veteran_gender,
veteranAddress: appeal.attributes.veteran_address,
veteranParticipantId: appeal.attributes.veteran_participant_id,
externalId: appeal.attributes.external_id,
status: appeal.attributes.status,
Expand Down
4 changes: 3 additions & 1 deletion lib/tasks/support/jailer_polymorphic_associations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ def polymorphic_types_hash
"EndProductUpdate.original_decision_review_type" => [SupplementalClaim, HigherLevelReview],
"JobNote.job_type" => [SupplementalClaim, HigherLevelReview],
"hearing_type" => [Hearing, LegacyHearing],
"assigned_to_type" => [User, Organization]
"assigned_to_type" => [User, Organization],
"CaseflowStuckRecord.stuck_record_type" => [PriorityEndProductSyncQueue],
"VbmsCommunicationPackage.document_mailable_via_pacman_type" => [DecisionDocument, VbmsUploadedDocument]
}.freeze
end

Expand Down

0 comments on commit cf83707

Please sign in to comment.