Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main -> Val #2114

Merged
merged 52 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
2f14557
Upgrade to AWS SDK v3 (#2080)
benmartin-coforma Mar 7, 2024
90a60dc
Consolidate CommonQuestions - CombinedRates (#2096)
ailZhou Mar 11, 2024
324cbfc
Bump jose from 4.13.0 to 4.15.5 (#2099)
dependabot[bot] Mar 13, 2024
7f914e2
cmdct-3400 tiny text change (#2103)
britt-mo Mar 13, 2024
4912b14
Enable automerge for bot generated dependency fixes (#2108)
berryd Mar 13, 2024
bf7a619
cmdct-3402 text change for FUM-HH 2024 (#2105)
britt-mo Mar 14, 2024
998d3c8
cmdct-3403 text change to OUD-HH (#2106)
britt-mo Mar 14, 2024
11e7e65
cmdct-3404 changes to IU-HH 2024 (#2107)
britt-mo Mar 14, 2024
ff28f71
cmdct-3383 text change CCP-AD 2024 (#2110)
britt-mo Mar 14, 2024
76ba903
text change CCS-AD 2024 (#2111)
britt-mo Mar 14, 2024
c70b583
cmdct-3385 text change CDF-AD (#2112)
britt-mo Mar 14, 2024
25e6e93
cmdct-3401 - COL-HH text changes (#2104)
britt-mo Mar 14, 2024
cc6b53a
cmdct-3386 text changes COL-AD 2024 (#2113)
britt-mo Mar 14, 2024
5b22ca0
Ghost push snyk fix (hopefully)
berryd Mar 15, 2024
fdc7152
Bump follow-redirects from 1.15.4 to 1.15.6 in /services/ui-src (#2121)
dependabot[bot] Mar 15, 2024
8597d6b
Bump follow-redirects from 1.15.4 to 1.15.6 (#2122)
dependabot[bot] Mar 15, 2024
218c6ea
Bump follow-redirects from 1.15.4 to 1.15.6 in /services/app-api (#2120)
dependabot[bot] Mar 15, 2024
c5aea51
Remove unnecessary step which breaks job (#2125)
berryd Mar 18, 2024
34c4055
updates to HBD-AD 2024 (#2123)
britt-mo Mar 18, 2024
0d09a04
FUM-AD Content Change (#2128)
ailZhou Mar 18, 2024
e07f0dd
cmdct-3394 text update to OUD-AD 2024 (#2124)
britt-mo Mar 18, 2024
df8da55
NCIDDS-AD to NCIIDD-AD (#2126)
ailZhou Mar 18, 2024
64691f9
PPC-AD to PPC2-AD (#2127)
ailZhou Mar 18, 2024
6c90a28
MSC-AD Auto Complete (#2117)
ailZhou Mar 19, 2024
011a895
FVA-AD Removal (#2115)
ailZhou Mar 19, 2024
e756459
Cmdct 3387x (#2131)
britt-mo Mar 19, 2024
07415da
Consolidate CommonQuestions - DateRange (#2102)
ailZhou Mar 19, 2024
c92c7aa
Consolidate CommonQuestions - DefinitionsOfPopulation (#2109)
ailZhou Mar 19, 2024
6612bc3
Consolidate CommonQuestions - DataSource (#2100)
ailZhou Mar 20, 2024
cafbdf0
QMR VPN Deploy Workflow refactor for consistency (#2137)
dwhitestratiform Mar 21, 2024
371df12
Run a11y tests in parallel to speed up pipeline (#2139)
dwhitestratiform Mar 22, 2024
0f3dbbe
changing branch name in deploy step (#2141)
dwhitestratiform Mar 22, 2024
f147517
Export Fix - Component & Cypress (#2140)
ailZhou Mar 22, 2024
2a22d71
relocate NotCollectingOMS (#2136)
britt-mo Mar 25, 2024
0a42b37
Consolidate CommonQuestions - MeasureSpecification (#2130)
ailZhou Mar 25, 2024
75467ad
[CMDCT-3440] Tealium correct param (#2143)
BearHanded Mar 25, 2024
af554ba
Removing Dependabot in favor of Snyk (#2144)
dwhitestratiform Mar 25, 2024
7c7af0c
[QMR] Cypress Test Refactor 1/x - Adult Measures (#2101)
ajaitasaini Mar 27, 2024
59d6b54
Bump webpack-dev-middleware from 5.3.0 to 5.3.4 in /services/ui-src (…
dependabot[bot] Mar 27, 2024
09c1783
Consolidate DataSourceCahps Questions (#2147)
keeysnc Mar 27, 2024
5e43043
Consolidate CommonQuestions - DeviationFromMeasureSpecifications (#2145)
ailZhou Mar 27, 2024
6f372d7
[Snyk] Upgrade @aws-sdk/client-cognito-identity-provider from 3.523.0…
mdct-github-service-account Mar 27, 2024
85ec899
Auotmate resource auditing for account (#2148)
berryd Mar 28, 2024
6c83219
Update audit-account.yml (#2152)
berryd Mar 28, 2024
d036ec0
redirect to the index when routing without error warning (#2134)
BearHanded Mar 29, 2024
81dfeed
Cmdct 3352x - StatusOfData refactor (#2150)
britt-mo Mar 29, 2024
1298c5f
Remove the rateReadOnly prop from PerformanceMeasure; it is unused (#…
benmartin-coforma Mar 29, 2024
46a1e1f
Patch workflow to avoid failing when zero results are returned by rep…
berryd Mar 29, 2024
c946c5b
Fix a typo in deploy.yml (#2156)
benmartin-coforma Mar 29, 2024
b5ff990
Update users.json (#2157)
davidkoger Apr 1, 2024
7455733
Change styles and DOMPurify config to make PDFs look better (#2142)
benmartin-coforma Apr 1, 2024
c862fce
Update PULL_REQUEST_TEMPLATE.md
braxex Apr 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/setBranchName.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ GITHUB_REFNAME="${1}"
[ -z "${GITHUB_REFNAME}" ] && echo "Error setting branch name. No input given." && exit 1

case ${GITHUB_REFNAME} in
$([[ "$GITHUB_REFNAME" =~ ^dependabot/.* ]] && echo ${GITHUB_REFNAME}))
echo ${GITHUB_REFNAME} | md5sum | head -c 10 | sed 's/^/x/'
;;
$([[ "$GITHUB_REFNAME" =~ ^snyk-* ]] && echo ${GITHUB_REFNAME}))
echo ${GITHUB_REFNAME##*-} | head -c 10 | sed 's/^/s/'
;;
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/dependabot-auto-approve.yml

This file was deleted.

157 changes: 92 additions & 65 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- "*"
- "dependabot/**"
- "!skipci*"

concurrency:
Expand All @@ -28,20 +27,10 @@ jobs:
SLS_DEPRECATION_DISABLE: "*" # Turn off deprecation warnings in the pipeline
steps:
- uses: actions/checkout@v4
- name: set branch_name # Some integrations (Dependabot & Snyk) build very long branch names. This is a switch to make long branch names shorter.
- name: set branch_name # Some integrations (Snyk) build very long branch names. This is a switch to make long branch names shorter.
run: |
BRANCH_NAME=$(./.github/setBranchName.sh ${{ github.ref_name }})
echo "branch_name=${BRANCH_NAME}" >> $GITHUB_ENV
- name: "Setup jq"
uses: dcarbone/install-jq-action@v2.1.0
with:
version: "${{ inputs.version }}"
force: "${{ inputs.force }}"
- name: "Check jq"
# language=sh
run: |
which jq
jq --version
- name: Validate branch name
run: ./.github/branchNameValidation.sh $STAGE_PREFIX$branch_name
- name: set branch specific variable names
Expand Down Expand Up @@ -86,72 +75,48 @@ jobs:
application_endpoint: ${{ steps.endpoint.outputs.application_endpoint}}
BRANCH_SPECIFIC_VARNAME_AWS_DEFAULT_REGION: ${{ steps.set_names.outputs.BRANCH_SPECIFIC_VARNAME_AWS_DEFAULT_REGION }}
BRANCH_SPECIFIC_VARNAME_AWS_OIDC_ROLE_TO_ASSUME: ${{ steps.set_names.outputs.BRANCH_SPECIFIC_VARNAME_AWS_OIDC_ROLE_TO_ASSUME }}
# run e2e tests after deploy completes
e2e-tests-init:
name: Initialize End To End Tests
if: ${{ github.ref_name != 'master' && github.ref_name != 'val' && github.ref_name != 'prod' }}
needs:
- deploy

register-runner:
name: Register GitHub Runner
if: ${{ github.ref_name != 'master' && github.ref_name != 'val' && github.ref_name != 'production' }}
runs-on: ubuntu-latest
needs: deploy
env:
SLS_DEPRECATION_DISABLE: "*" # Turn off deprecation warnings in the pipeline
steps:
- name: Verify Endpoint
if: ${{ needs.deploy.outputs.application_endpoint == ''}}
run: |
echo "No endpoint set, Check if the deploy workflow was successful."
exit 1
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: set branch_name
run: |
BRANCH_NAME=$(./.github/setBranchName.sh ${{ github.ref_name }})
echo "branch_name=${BRANCH_NAME}" >> $GITHUB_ENV

- name: set branch specific variable names
id: set_names
run: ./.github/build_vars.sh set_names

- name: set variable values
id: set_values
run: ./.github/build_vars.sh set_values
env:
AWS_DEFAULT_REGION: ${{ secrets[env.BRANCH_SPECIFIC_VARNAME_AWS_DEFAULT_REGION] || secrets.AWS_DEFAULT_REGION }}
AWS_OIDC_ROLE_TO_ASSUME: ${{ secrets[env.BRANCH_SPECIFIC_VARNAME_AWS_OIDC_ROLE_TO_ASSUME] || secrets.AWS_OIDC_ROLE_TO_ASSUME }}
INFRASTRUCTURE_TYPE: ${{ secrets[env.BRANCH_SPECIFIC_VARNAME_INFRASTRUCTURE_TYPE] || secrets.INFRASTRUCTURE_TYPE || 'development' }}
STAGE_PREFIX: ${{ secrets.STAGE_PREFIX }}
COGNITO_TEST_USERS_PASSWORD: ${{ secrets[env.BRANCH_SPECIFIC_VARNAME_COGNITO_TEST_USERS_PASSWORD] || secrets.COGNITO_TEST_USERS_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Combine yarn.lock files to single file
run: find services -maxdepth 3 -name yarn.lock | xargs cat yarn.lock > combined-yarn.txt
- name: cache service dependencies
uses: actions/cache@v3
with:
path: |
services/app-api/node_modules
services/uploads/node_modules
services/ui/node_modules
services/ui-auth/node_modules
services/ui-src/node_modules
node_modules
key: ${{ runner.os }}-${{ hashFiles('combined-yarn.txt') }}

- name: Configure AWS credentials for GitHub Actions
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.AWS_OIDC_ROLE_TO_ASSUME }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: set path
run: |
echo "PATH=$(pwd)/node_modules/.bin/:$PATH" >> $GITHUB_ENV
- name: Get Runner IP
id: get-ip
role-to-assume: ${{ secrets[env.BRANCH_SPECIFIC_VARNAME_AWS_OIDC_ROLE_TO_ASSUME] || secrets.AWS_OIDC_ROLE_TO_ASSUME }}
aws-region: ${{ secrets[env.BRANCH_SPECIFIC_VARNAME_AWS_DEFAULT_REGION] || secrets.AWS_DEFAULT_REGION }}

- name: output account id
id: output_account_id
run: |
#!/bin/bash
# Get the IP address of the runner
IP_ADDRESS=$(curl https://api.ipify.org)
echo "Runner IP address: $IP_ADDRESS"
# Store the IP address as an output variable
echo "RUNNER_IP=$IP_ADDRESS/32" >> $GITHUB_OUTPUT
AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
echo "Current Account ID: ${AWS_ACCOUNT_ID}"

- name: Get Github Actions CIDR Blocks
id: get-gha-cidrs
shell: bash
Expand All @@ -162,18 +127,22 @@ jobs:
IPV4_CIDR_ARR=($(echo $GHA_RESP | jq -r '.actions | .[]' | grep -v ':'))
GHA_CIDRS_IPV4=$(echo $(IFS=" "; echo ${IPV4_CIDR_ARR[*]}))
echo "GHA_CIDRS_IPV4=$GHA_CIDRS_IPV4" >> $GITHUB_OUTPUT

- name: Generate IP Set Name
id: gen-ip-set-name
run: |
#!/bin/bash
STAGE_GH_IPSET_NAME=$STAGE_PREFIX$branch_name-gh-ipset
echo "Github IP Set name: $STAGE_GH_IPSET_NAME"
echo "STAGE_GH_IPSET_NAME=$STAGE_GH_IPSET_NAME" >> $GITHUB_OUTPUT
- name: Fetch AWS IP set Metadata

- name: Fetch AWS IP Set Metadata
id: fetch-ip-set-info
run: |
#!/bin/bash
# Fetch AWS IP set ARNs using AWS CLI and store them in a variable
AWS_IP_SET_INFO=$(aws wafv2 list-ip-sets --scope=CLOUDFRONT)
echo "Outputting AWS IP Set Info: ${AWS_IP_SET_INFO}"
# Store the IP set ARNs in an output variable using GITHUB_OUTPUT
IPSET_NAME=${{ steps.gen-ip-set-name.outputs.STAGE_GH_IPSET_NAME }}
IPSET=$(jq '.IPSets | map(select(.Name == "'${IPSET_NAME}'")) | .[]' <<< ${AWS_IP_SET_INFO})
Expand All @@ -184,17 +153,78 @@ jobs:
echo "IPSET_ARN=$IPSET_ARN" >> $GITHUB_OUTPUT
echo "IPSET_NAME=$IPSET_NAME" >> $GITHUB_OUTPUT
echo "IPSET_ID=$IPSET_ID" >> $GITHUB_OUTPUT

- name: Update IP Set
id: update-ip-set
run: ./.github/waf-controller.sh set ${{ steps.fetch-ip-set-info.outputs.IPSET_NAME }} ${{ steps.fetch-ip-set-info.outputs.IPSET_ID }} ${{ steps.get-gha-cidrs.outputs.GHA_CIDRS_IPV4 }}
env:
AWS_RETRY_MODE: adaptive
AWS_MAX_ATTEMPTS: 10

outputs:
application_endpoint: ${{ needs.deploy.outputs.application_endpoint }}
ipset_name: ${{ steps.fetch-ip-set-info.outputs.IPSET_NAME }}
ipset_id: ${{ steps.fetch-ip-set-info.outputs.IPSET_ID }}

e2e-tests-init:
name: Initialize End To End Tests
if: ${{ always() && !cancelled() && needs.deploy.result == 'success' && github.ref_name != 'master' && github.ref_name != 'val' && github.ref_name != 'prod' }}
needs:
- deploy
- register-runner
runs-on: ubuntu-latest
steps:
- name: Verify Endpoint
if: ${{ needs.deploy.outputs.application_endpoint == ''}}
run: |
echo "No endpoint set, Check if the deploy workflow was successful."
exit 1
- uses: actions/checkout@v4
- name: set branch_name
run: |
BRANCH_NAME=$(./.github/setBranchName.sh ${{ github.ref_name }})
echo "branch_name=${BRANCH_NAME}" >> $GITHUB_ENV
- name: set branch specific variable names
id: set_names
run: ./.github/build_vars.sh set_names
- name: set variable values
id: set_values
run: ./.github/build_vars.sh set_values
env:
AWS_DEFAULT_REGION: ${{ secrets[env.BRANCH_SPECIFIC_VARNAME_AWS_DEFAULT_REGION] || secrets.AWS_DEFAULT_REGION }}
AWS_OIDC_ROLE_TO_ASSUME: ${{ secrets[env.BRANCH_SPECIFIC_VARNAME_AWS_OIDC_ROLE_TO_ASSUME] || secrets.AWS_OIDC_ROLE_TO_ASSUME }}
INFRASTRUCTURE_TYPE: ${{ secrets[env.BRANCH_SPECIFIC_VARNAME_INFRASTRUCTURE_TYPE] || secrets.INFRASTRUCTURE_TYPE || 'development' }}
STAGE_PREFIX: ${{ secrets.STAGE_PREFIX }}
COGNITO_TEST_USERS_PASSWORD: ${{ secrets[env.BRANCH_SPECIFIC_VARNAME_COGNITO_TEST_USERS_PASSWORD] || secrets.COGNITO_TEST_USERS_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Combine yarn.lock files to single file
run: find services -maxdepth 3 -name yarn.lock | xargs cat yarn.lock > combined-yarn.txt
- name: cache service dependencies
uses: actions/cache@v3
with:
path: |
services/app-api/node_modules
services/uploads/node_modules
services/ui/node_modules
services/ui-auth/node_modules
services/ui-src/node_modules
node_modules
key: ${{ runner.os }}-${{ hashFiles('combined-yarn.txt') }}
- name: Configure AWS credentials for GitHub Actions
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.AWS_OIDC_ROLE_TO_ASSUME }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: set path
run: |
echo "PATH=$(pwd)/node_modules/.bin/:$PATH" >> $GITHUB_ENV
outputs:
application_endpoint: ${{ needs.deploy.outputs.application_endpoint }}

setup-tests:
name: "Setup End To End Tests"
uses: ./.github/workflows/cypress-workflow.yml
Expand Down Expand Up @@ -283,10 +313,6 @@ jobs:
name: Accessibility Tests
needs:
- e2e-tests-init
- e2e-feature-tests
- child-e2e-measure-tests
- adult-e2e-measure-tests
- health-home-e2e-measure-tests
uses: ./.github/workflows/cypress-workflow.yml
with:
test-path: "a11y"
Expand All @@ -301,7 +327,7 @@ jobs:

cleanup:
name: Deslist GHA Runner CIDR Blocks
if: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/val' && github.ref != 'refs/heads/prod' }}
if: ${{ github.ref_name != 'master' && github.ref_name != 'val' && github.ref_name != 'prod' }}
runs-on: ubuntu-latest
needs:
- e2e-tests-init
Expand All @@ -310,6 +336,7 @@ jobs:
- adult-e2e-measure-tests
- health-home-e2e-measure-tests
- deploy
- register-runner
- a11y-tests
env:
SLS_DEPRECATION_DISABLE: "*" # Turn off deprecation warnings in the pipeline
Expand All @@ -322,7 +349,7 @@ jobs:
aws-region: ${{ secrets[env.BRANCH_SPECIFIC_VARNAME_AWS_DEFAULT_REGION] || secrets.AWS_DEFAULT_REGION }}
- name: clean-up-iplist
id: reset-ip-set
run: ./.github/waf-controller.sh set ${{ needs.e2e-tests-init.outputs.ipset_name }} ${{ needs.e2e-tests-init.outputs.ipset_id }} '[]'
run: ./.github/waf-controller.sh set ${{ needs.register-runner.outputs.ipset_name }} ${{ needs.register-runner.outputs.ipset_id }} '[]'
env:
AWS_RETRY_MODE: adaptive
AWS_MAX_ATTEMPTS: 10
2 changes: 1 addition & 1 deletion .github/workflows/destroy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Destroy

on:
on:
delete:
workflow_dispatch:
inputs:
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/snyk-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Adapted from https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions
name: Snyk auto-merge
on:
pull_request:
Expand All @@ -9,21 +8,17 @@ permissions:
contents: write

jobs:
dependabot:
snyk:
runs-on: ubuntu-latest
if: ${{ github.actor == 'mdct-github-service-account' }}
steps:
- name: Snyk Gather Metadata
id: metadata
uses: dependabot/fetch-metadata@v1
- name: Approve a PR
- name: Auto-approve Snyk PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Enable auto-merge for Snyk PRs
if: ${{ steps.metadata.outputs.update-type != 'version-update:semver-major'}}
run: gh pr merge --auto --merge "$PR_URL"
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,6 @@ The Kafka Queues we link to are in the BigMac account and are currently not bein

`postKafkaData`: Fires when an update to the database happens and syncs kafka to reflect the current state of the database.

`forceKafkaSync`: This can be manually triggered to force kafka to reflect the current state of the database.

### Utilities

---
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"@types/yargs": "^15.0.10",
"@typescript-eslint/eslint-plugin": "5.18.0",
"@typescript-eslint/parser": "5.18.0",
"aws-sdk": "^2.1310.0",
"dotenv": "^8.2.0",
"eslint": "^7.32.0",
"eslint-config-airbnb": "^18.2.1",
Expand Down
5 changes: 3 additions & 2 deletions services/app-api/handlers/banners/fetch.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import handler from "../../libs/handler-lib";
import dynamoDb from "../../libs/dynamodb-lib";
import { Errors, StatusCodes } from "../../utils/constants/constants";
import { Banner } from "../../types";

export const fetchBanner = handler(async (event, _context) => {
if (!event?.pathParameters?.bannerId!) {
Expand All @@ -12,8 +13,8 @@ export const fetchBanner = handler(async (event, _context) => {
key: event?.pathParameters?.bannerId!,
},
};
const response = await dynamoDb.get(params);
const response = await dynamoDb.get<Banner>(params);

const status = StatusCodes.SUCCESS;
return { status: status, body: response };
return { status: status, body: { Item: response } };
});
Loading
Loading