Skip to content

Commit

Permalink
Merge branch 'main' into wml-add-rate-refactor-tech-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
macrael committed Jul 19, 2023
2 parents c70bea2 + b059461 commit eeaea28
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy-app-to-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,10 @@ jobs:
run: |
./scripts/invoke-migrate-lambda.sh app-api-$STAGE_NAME-migrate \$LATEST "Migration of the database failed."
- name: invoke proto_to_db lambda
- name: invoke proto_to_db lambda -- (rates refactor migrate)
id: invoke-proto_to_db
working-directory: services/app-api
continue-on-error: true
env:
STAGE_NAME: ${{ inputs.stage_name }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ jobs:
needs.api-unit-tests.result == 'success' &&
needs.build-prisma-client-lambda-layer.result == 'success' &&
needs.begin-deployment.result == 'success'
uses: Enterprise-CMCS/managed-care-review/.github/workflows/deploy-app-to-env.yml@ma_3212_migration_lambda
uses: Enterprise-CMCS/managed-care-review/.github/workflows/deploy-app-to-env.yml@mt-sha-to-main
with:
environment: dev
stage_name: ${{ needs.begin-deployment.outputs.stage-name }}
Expand Down
9 changes: 6 additions & 3 deletions services/app-api/src/handlers/proto_to_db.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Handler } from 'aws-lambda'
import { Handler, APIGatewayProxyResultV2 } from 'aws-lambda'
import { initTracer, initMeter } from '../../../uploads/src/lib/otel'
import { configurePostgres } from './configuration'
import { NewPostgresStore } from '../postgres/postgresStore'
Expand Down Expand Up @@ -47,7 +47,10 @@ export const getRevisions = async (
return result
}

export const main: Handler = async (event, context) => {
export const main: Handler = async (
event,
context
): Promise<APIGatewayProxyResultV2> => {
// Check on the values for our required config
const stageName = process.env.stage ?? 'stageNotSet'
const serviceName = `proto_to_db_lambda-${stageName}`
Expand Down Expand Up @@ -78,5 +81,5 @@ export const main: Handler = async (event, context) => {
message: 'Lambda function executed successfully',
packageId: pkgID,
}),
}
} as APIGatewayProxyResultV2
}

0 comments on commit eeaea28

Please sign in to comment.