Skip to content

Commit

Permalink
Remove dead rate refactor code (#2088)
Browse files Browse the repository at this point in the history
* remove feature flag from resolvers
* remove feature flag from indexresolvers
* remove hpp db methods
* remove old sha fetching fixing code
* get rid of the pb migrator
  • Loading branch information
macrael authored Dec 1, 2023
1 parent 1e28117 commit cd53419
Show file tree
Hide file tree
Showing 67 changed files with 3,990 additions and 9,483 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/deploy-app-to-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ jobs:
- name: Generate Code
run: npx lerna run generate

- name: Compile proto migration files
run: npx lerna run build --scope=app-proto

- name: upload app web gen directory
uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
run: PRISMA_CLI_BINARY_TARGETS=rhel-openssl-1.0.x yarn install --prefer-offline --frozen-lockfile --cache-folder ${{ steps.yarn-cache-dir-path.outputs.dir }}

- name: Generate protos
run: npx lerna run generate --scope=app-proto && npx lerna run build --scope=app-proto
run: npx lerna run generate --scope=app-proto

# Generate Prisma Client and binary that can run in a lambda environment
- name: Prepare prisma client
Expand Down
31 changes: 3 additions & 28 deletions docs/technical-design/database-diagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,7 @@ State {
Int latestStateSubmissionNumber
String stateCode
}
HealthPlanPackageTable {
String stateCode
String id
}
HealthPlanRevisionTable {
DateTime createdAt
String pkgID
String formDataProto
DateTime submittedAt
DateTime unlockedAt
String unlockedBy
String unlockedReason
String submittedBy
String submittedReason
String id
}
Question {
String pkgID
DateTime createdAt
Expand Down Expand Up @@ -66,24 +51,15 @@ QuestionResponseDocument {
String id
}
State ||--o{ HealthPlanPackageTable : stateCode
HealthPlanPackageTable ||--o{ HealthPlanRevisionTable : pkgID
HealthPlanPackageTable ||--o{ Question : pkgID
State ||--o{ ContractTable : stateCode
ContractTable ||--o{ Question : pkgID
User ||--o{ Question : addedByUserID
User ||--o{ QuestionReponse : addedByUserID
Question ||--o{ QuestionDocument : questionID
Question ||--o{ QuestionReponse: questionID
QuestionReponse ||--o{ QuestionResponseDocument: questionResponseID
User }o--o{ State : ""
```

## Contract & Rates DB

This is the db diagram for the contracts and rates work, still disconnected from the rest of the db.

```mermaid
erDiagram
ContractTable {
String id
Expand Down Expand Up @@ -155,5 +131,4 @@ User {
String id
}
```
135 changes: 0 additions & 135 deletions docs/technical-design/future-designs/qa-db.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/technical-design/howto-migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This type of migration is run as standalone lambda that developers must manually
1. Start the app.
1. When the app is running, connect to the local database so that you can inspect the changes you're making. Use the DATABASE_URL from your .envrc.local file to connect to the database interface of your choice. You can connect via the terminal, or an app like TablePlus, dBeaver, Postico, DataGrip, etc.
1. Run some Cypress tests to populate the database. The CMSWorkflow tests are a good choice, since they create two entries which contain rates, one of which has a revision.
1. Verify that in the local database you can see entries in the HealthPlanPackageTable and HealthPlanRevisionTable.
1. Verify that in the local database you can see entries in the ContractTable and ContractRevisionTable.
1. Now you're ready to run your lambda. In a different terminal instance, run `DIRENV ALLOW` again.
1. Navigate to `services/app-api`.
1. Run `npx serverless invoke local --function `name_of_your_lambda``. You should see it build with webpack, then run. Any log statements you've put in your code will display in this window.
Expand Down
2 changes: 0 additions & 2 deletions services/app-api/scripts/prepare-prisma-layer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ function preparePrismaLayer() {
mkdir -p lambda-layers-prisma-client-migration/nodejs/node_modules/@prisma/engines
mkdir -p lambda-layers-prisma-client-migration/nodejs/node_modules/prisma
mkdir -p lambda-layers-prisma-client-migration/nodejs/prisma
mkdir -p lambda-layers-prisma-client-migration/nodejs/protoMigrator
mkdir -p lambda-layers-prisma-client-migration/nodejs/dataMigrations
mkdir -p lambda-layers-prisma-client-migration/nodejs/gen

Expand Down Expand Up @@ -43,7 +42,6 @@ function preparePrismaLayer() {
rsync -av prisma/ lambda-layers-prisma-client-engine/nodejs/prisma

echo "Copy proto migration files to layer..."
rsync -av ../app-proto/build/ lambda-layers-prisma-client-migration/nodejs/protoMigrator
rsync -av ../app-proto/gen/ lambda-layers-prisma-client-migration/nodejs/gen
rsync -av ../../node_modules/uuid/ lambda-layers-prisma-client-migration/nodejs/node_modules/uuid

Expand Down
33 changes: 0 additions & 33 deletions services/app-api/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,39 +152,6 @@ functions:
email_submit:
handler: src/handlers/email_submit.main

add_sha:
handler: src/handlers/add_sha.main
layers:
- !Ref PrismaClientEngineLambdaLayer
- arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-9-1:1
timeout: 300
vpc:
securityGroupIds:
- ${self:custom.sgId}
subnetIds: ${self:custom.privateSubnets}

proto_to_db:
handler: src/handlers/proto_to_db.main
layers:
- !Ref PrismaClientEngineLambdaLayer
- arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-9-1:1
timeout: 300
vpc:
securityGroupIds:
- ${self:custom.sgId}
subnetIds: ${self:custom.privateSubnets}

migrate_rate_documents:
handler: src/handlers/migrate_rate_documents.main
layers:
- !Ref PrismaClientEngineLambdaLayer
- arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-nodejs-amd64-ver-1-9-1:1
timeout: 300
vpc:
securityGroupIds:
- ${self:custom.sgId}
subnetIds: ${self:custom.privateSubnets}

health:
handler: src/handlers/health_check.main
events:
Expand Down
99 changes: 0 additions & 99 deletions services/app-api/src/handlers/add_sha.test.ts

This file was deleted.

Loading

0 comments on commit cd53419

Please sign in to comment.