Skip to content

Commit

Permalink
Merge branch 'develop' into update-action/ponnia
Browse files Browse the repository at this point in the history
  • Loading branch information
Ponnia-M authored Apr 10, 2024
2 parents 37c1a85 + 6d22e47 commit 5960410
Show file tree
Hide file tree
Showing 556 changed files with 1,232 additions and 43,163 deletions.
6 changes: 1 addition & 5 deletions .github/actions/publish-images/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: Publish images to GHCR
description: Builds, tags, and publish VRO's Docker images

inputs:
image_prefix:
description: 'The prefix for the image name, e.g., "dev_" or "" (no prefix)'
type: string
default: 'dev_'
image_tag:
description: 'The tag for the image, e.g., first 7 of the commit hash'
type: string
Expand Down Expand Up @@ -62,7 +58,7 @@ runs:
# This IMG_TAG value will cause a new image to be publish (and scanned by SecRel)
IMG_TAG="${{ inputs.image_tag }}"
IMG_NAME="${{ inputs.image_prefix }}$(getVarValue "${PREFIX}" _IMG)"
IMG_NAME="$(getVarValue "${PREFIX}" _IMG)"
echo "::group::Push image $IMG_NAME $IMG_TAG"
GHCR_PATH="ghcr.io/${{ github.repository }}/${IMG_NAME}"
if [ "$(imageTagExists "$IMG_NAME" "$IMG_TAG")" == "200" ]; then
Expand Down
65 changes: 0 additions & 65 deletions .github/workflows/delete-published-dev-images.yml

This file was deleted.

10 changes: 4 additions & 6 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Dependabot auto-merge
on:
pull_request:
on: pull_request

permissions:
contents: write
Expand All @@ -9,17 +8,16 @@ permissions:
jobs:
dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]' && github.repository == 'department-of-veterans-affairs/abd-vro'

if: github.actor == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.ACCESS_TOKEN_PUSH_TO_DEVELOP }}"
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.ACCESS_TOKEN_PUSH_TO_DEVELOP}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
30 changes: 4 additions & 26 deletions .github/workflows/secrel.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "2. (Internal) SecRel workflow"
run-name: "SecRel ${{inputs.image_prefix}} (${{github.ref_name}}) ${{github.event.head_commit.message}}"
run-name: "SecRel (${{github.ref_name}}) ${{github.event.head_commit.message}}"

on:
# Trigger on every code push to main and develop branches
Expand All @@ -12,14 +12,6 @@ on:
# Allow manual runs
workflow_dispatch:
inputs:
image_prefix:
description: 'Image prefix for the chosen branch. Choose `(no prefix)` to create non-dev images for deployment to sandbox, prod-test, and prod.'
required: true
default: 'dev_'
type: choice
options:
- "dev_"
- "(no prefix)"
run_tests:
description: "Run Gradle tests?"
required: true
Expand Down Expand Up @@ -70,43 +62,31 @@ jobs:
run-secrel: ${{ steps.image-props.outputs.run_secrel }}
runs-on: ubuntu-latest
steps:
- name: "Determine image prefix and tag"
- name: "Determine image tag"
id: image-props
run: |
# Set defaults
IMG_TAG=${GITHUB_SHA:0:7}
IMG_PREFIX="dev_"
RUN_GRADLE_TESTS="true"
RUN_SECREL="true"
# Override some defaults depending on the branch/ref_name
echo "ref_name: ${{ github.ref_name }}"
case "${{ github.ref_name }}" in
main) IMG_PREFIX=""
;;
develop) # To reduce workflow runtime, don't run tests
RUN_GRADLE_TESTS=false
# To reduce SecRel scans, only published changed images
;;
esac
# If workflow was manually dispatched, override settings
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
[ "${{ inputs.image_prefix }}" == "(no prefix)" ] && IMG_PREFIX=""
RUN_GRADLE_TESTS=${{ inputs.run_tests }}
RUN_SECREL=${{ inputs.run_secrel }}
fi
{
echo "image_tag=${IMG_TAG}"
echo "image_prefix=${IMG_PREFIX}"
echo "run_tests=${RUN_GRADLE_TESTS}"
echo "run_secrel=${RUN_SECREL}"
} >> "$GITHUB_OUTPUT"
- name: "DEBUG"
run: |
echo "image_prefix: ${{ steps.image-props.outputs.image_prefix }}"
echo "image_tag: ${{ steps.image-props.outputs.image_tag }}"
echo "run_tests: ${{ steps.image-props.outputs.run_tests }}"
Expand All @@ -125,17 +105,15 @@ jobs:
slack-text: ":arrow_forward: \
<${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}|\
SecRel running (#${{ github.run_number }})>: \
Publishing images with prefix `${{ steps.image-props.outputs.image_prefix }}` \
and tag `${{ steps.image-props.outputs.image_tag }}` \
Publishing images with tag `${{ steps.image-props.outputs.image_tag }}` \
from ${{github.ref_type}} `${{github.ref_name}}`, \
caused by `${{github.event_name}}` triggered by `${{github.triggering_actor}}` \
(Run tests? ${{ steps.image-props.outputs.run_tests }})...\n"

- name: "Publish ${{ steps.image-props.outputs.image_prefix }} images to GHCR"
- name: "Publish images to GHCR"
id: publish-images
uses: ./.github/actions/publish-images
with:
image_prefix: "${{ steps.image-props.outputs.image_prefix }}"
image_tag: "${{ steps.image-props.outputs.image_tag }}"
ghcr_username: ${{ github.actor }}
ghcr_password: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions api-gateway/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'

// Spring Cloud
implementation 'org.springframework.cloud:spring-cloud-starter-gateway:4.1.1'
implementation 'org.springframework.cloud:spring-cloud-starter-gateway:4.1.2'
if (osdetector.classifier == "osx-aarch_64") {
// Fix MacOS error: Unable to load io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider,
// which may result in incorrect DNS resolutions.
Expand All @@ -21,10 +21,10 @@ dependencies {

// Swagger UI for WebFlux
implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:${spring_doc_version}"
implementation 'io.netty:netty-codec-http2:4.1.107.Final'
implementation 'io.netty:netty-codec-http2:4.1.108.Final'

constraints {
// To address Snyk alert on DoS vulnerability
implementation 'org.springframework.boot:spring-boot-autoconfigure:3.2.3'
implementation 'org.springframework.boot:spring-boot-autoconfigure:3.2.4'
}
}
2 changes: 1 addition & 1 deletion db-init/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM flyway/flyway:10.10-alpine
FROM flyway/flyway:10.11-alpine

# hadolint ignore=DL3018
RUN <<EOR
Expand Down
2 changes: 1 addition & 1 deletion db-init/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'org.flywaydb.flyway' version '10.9.1'
id 'org.flywaydb.flyway' version '10.11.0'
id 'shared.docker.container-conventions'
id 'shared.java.vro-dep-constraints'
}
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt-get update && \
install_packages curl redis sudo && \
install_packages postgresql-client

RUN adduser --no-create-home --disabled-password tron
RUN adduser --disabled-password tron

USER tron

Expand Down
2 changes: 1 addition & 1 deletion domain-cc/cc-app/src/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
black==23.1.0
black==24.3.0
bump-pydantic==0.8.0
flake8==6.0.0
isort==5.12.0
Expand Down
24 changes: 12 additions & 12 deletions domain-ee/ee-ep-merge-app/integration/test_merge_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async def test_completed_success(
cancel_claim_endpoint: MqEndpoint,
add_claim_note_endpoint: MqEndpoint,
):
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200])
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200, pending_claim_200])
get_claim_contentions_endpoint.set_responses([pending_contentions_200, ep400_contentions_200])
put_tsoj_endpoint.set_responses([response_200])
create_claim_contentions_endpoint.set_responses([response_201])
Expand All @@ -90,7 +90,7 @@ async def test_completed_success_with_duplicate_contention(
cancel_claim_endpoint: MqEndpoint,
add_claim_note_endpoint: MqEndpoint,
):
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200])
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200, pending_claim_200])
get_claim_contentions_endpoint.set_responses([pending_contentions_200, ep400_duplicate_contentions_200])
put_tsoj_endpoint.set_responses([response_200])
cancel_claim_endpoint.set_responses([response_200])
Expand All @@ -110,7 +110,7 @@ async def test_completed_no_ep400_contentions_on_first_attempt(
cancel_claim_endpoint: MqEndpoint,
add_claim_note_endpoint: MqEndpoint,
):
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200])
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200, pending_claim_200])
get_claim_contentions_endpoint.set_responses([pending_contentions_200, response_204, ep400_contentions_200])
put_tsoj_endpoint.set_responses([response_200])
create_claim_contentions_endpoint.set_responses([response_201])
Expand Down Expand Up @@ -279,7 +279,7 @@ async def test(
put_tsoj_endpoint: MqEndpoint,
update_claim_contentions_endpoint: MqEndpoint,
):
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200])
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200, pending_claim_200])
get_claim_contentions_endpoint.set_responses([pending_contentions_200, ep400_contentions_200])
put_tsoj_endpoint.set_responses([response_500])
update_claim_contentions_endpoint.set_responses([response_200])
Expand All @@ -296,7 +296,7 @@ async def test_error_at_remove_special_issue_fail_to_update_ep400_contentions(
put_tsoj_endpoint: MqEndpoint,
update_claim_contentions_endpoint: MqEndpoint,
):
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200])
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200, pending_claim_200])
get_claim_contentions_endpoint.set_responses([pending_contentions_200, ep400_contentions_200])
put_tsoj_endpoint.set_responses([response_500])
update_claim_contentions_endpoint.set_responses([response_500])
Expand All @@ -317,7 +317,7 @@ async def test(
create_claim_contentions_endpoint: MqEndpoint,
update_claim_contentions_endpoint: MqEndpoint,
):
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200])
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200, pending_claim_200])
get_claim_contentions_endpoint.set_responses([pending_contentions_200, ep400_contentions_200])
put_tsoj_endpoint.set_responses([response_200, response_200]) # Second response is to revert the tsoj
create_claim_contentions_endpoint.set_responses([response_500])
Expand All @@ -336,7 +336,7 @@ async def test_error_at_remove_special_issue_fail_to_update_ep400_contentions(
create_claim_contentions_endpoint: MqEndpoint,
update_claim_contentions_endpoint: MqEndpoint,
):
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200])
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200, pending_claim_200])
get_claim_contentions_endpoint.set_responses([pending_contentions_200, ep400_contentions_200])
put_tsoj_endpoint.set_responses([response_200, response_200])
create_claim_contentions_endpoint.set_responses([response_500])
Expand All @@ -355,7 +355,7 @@ async def test_error_at_revert_tsoj(
create_claim_contentions_endpoint: MqEndpoint,
update_claim_contentions_endpoint: MqEndpoint,
):
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200])
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200, pending_claim_200])
get_claim_contentions_endpoint.set_responses([pending_contentions_200, ep400_contentions_200])
put_tsoj_endpoint.set_responses([response_200, response_500]) # Note the 500 on second response
create_claim_contentions_endpoint.set_responses([response_500])
Expand All @@ -377,7 +377,7 @@ async def test(
create_claim_contentions_endpoint: MqEndpoint,
cancel_claim_endpoint: MqEndpoint,
):
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200])
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200, pending_claim_200])
get_claim_contentions_endpoint.set_responses([pending_contentions_200, ep400_contentions_200])
put_tsoj_endpoint.set_responses([response_200, response_200]) # Note the 200 to revert tsoj
create_claim_contentions_endpoint.set_responses([response_201])
Expand All @@ -396,7 +396,7 @@ async def test_error_at_revert_tsoj(
create_claim_contentions_endpoint: MqEndpoint,
cancel_claim_endpoint: MqEndpoint,
):
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200])
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200, pending_claim_200])
get_claim_contentions_endpoint.set_responses([pending_contentions_200, ep400_contentions_200])
put_tsoj_endpoint.set_responses([response_200, response_500]) # Note the 500 on second response
create_claim_contentions_endpoint.set_responses([response_201])
Expand All @@ -420,7 +420,7 @@ async def test(
add_claim_note_endpoint: MqEndpoint,
update_claim_contentions_endpoint: MqEndpoint,
):
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200])
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200, pending_claim_200])
get_claim_contentions_endpoint.set_responses([pending_contentions_200, ep400_contentions_200])
put_tsoj_endpoint.set_responses([response_200])
create_claim_contentions_endpoint.set_responses([response_201])
Expand All @@ -443,7 +443,7 @@ async def test_error_at_remove_special_issue_fail_to_update_ep400_contentions(
add_claim_note_endpoint: MqEndpoint,
update_claim_contentions_endpoint: MqEndpoint,
):
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200])
get_claim_endpoint.set_responses([pending_claim_200, ep400_claim_200, pending_claim_200])
get_claim_contentions_endpoint.set_responses([pending_contentions_200, ep400_contentions_200])
put_tsoj_endpoint.set_responses([response_200])
create_claim_contentions_endpoint.set_responses([response_201])
Expand Down
2 changes: 1 addition & 1 deletion domain-ee/ee-ep-merge-app/src/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
black==23.1.0
black==24.3.0
flake8==6.0.0
isort==5.12.0
pre-commit==3.1.1
1 change: 1 addition & 0 deletions domain-ee/ee-ep-merge-app/src/python_src/schema/claim.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ class ClaimDetail(BaseModel):
benefit_claim_type: BenefitClaimType | None = None
end_product_code: str | None = None
temp_station_of_jurisdiction: str | None = None
claim_lifecycle_status: str | None = None
2 changes: 2 additions & 0 deletions domain-ee/ee-ep-merge-app/src/python_src/schema/merge_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class JobState(StrEnum):
GET_PENDING_CLAIM_CONTENTIONS = auto()
GET_EP400_CLAIM = auto()
GET_EP400_CLAIM_CONTENTIONS = auto()
CHECK_PENDING_EP_IS_OPEN = auto()
SET_TEMP_STATION_OF_JURISDICTION = auto()
MERGE_CONTENTIONS = auto()
MOVE_CONTENTIONS_TO_PENDING_CLAIM = auto()
Expand All @@ -24,6 +25,7 @@ class JobState(StrEnum):
GET_PENDING_CLAIM_FAILED_REMOVE_SPECIAL_ISSUE = auto()
GET_EP400_CLAIM_FAILED_REMOVE_SPECIAL_ISSUE = auto()
GET_PENDING_CLAIM_CONTENTIONS_FAILED_REMOVE_SPECIAL_ISSUE = auto()
CHECK_PENDING_EP_IS_OPEN_FAILED_REMOVE_SPECIAL_ISSUE = auto()
SET_TEMP_STATION_OF_JURISDICTION_FAILED_REMOVE_SPECIAL_ISSUE = auto()
MOVE_CONTENTIONS_FAILED_REMOVE_SPECIAL_ISSUE = auto()
MOVE_CONTENTIONS_FAILED_REVERT_TEMP_STATION_OF_JURISDICTION = auto()
Expand Down
Loading

0 comments on commit 5960410

Please sign in to comment.