Skip to content

Commit

Permalink
remove all references to 2022 data migration from v2
Browse files Browse the repository at this point in the history
  • Loading branch information
BearHanded committed Aug 21, 2023
1 parent 3ddf57a commit 8b536f2
Show file tree
Hide file tree
Showing 15 changed files with 5 additions and 323 deletions.
10 changes: 1 addition & 9 deletions .env_example
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,4 @@ princeApiPath=placeholder
warmupSchedule="60 minutes"
warmupConcurrency=5
iamPath=/
iamPermissionsBoundary="bound"
runV2DataMigration=false

# -- SET THESE TO JUNK IF NOT RUNNING MIGRATION
postgresDatabase=placeholder
postgresHost=placeholder
postgresUser=placeholder
postgresPassword=placeholder
# --
iamPermissionsBoundary="bound"
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,6 @@ There are two mechanisms for seeding data.
- This is useful for deploying data such as section base templates, and keeping it up to date with the code base.
- Adding specific test seed data to environments may be useful for things like cypress tests. This can be accomplished with the test-tables directory, referencing the same seed-local tables if desired.

### V2 Data Migration

The data migration for v2 -> v3 is controlled via ssm parameters, and can be kicked off in an env on deploy by setting /configuration/{env}/runV2DataMigration. If you have access to the v2 databases.
, it can also be run to write v2 data into the local database by setting the runV2DataMigration env flag to true, and invoking the function with:

```aws lambda invoke /dev/null \
--endpoint-url http://localhost:3003 \
--function-name database-local-dataMigration
```

### Local Development Random Info

Local dev is configured in typescript project in `./src`. The entrypoint is `./src/dev.ts`, it manages running the moving pieces locally: the API, the database, the filestore, and the frontend.
Expand Down
18 changes: 0 additions & 18 deletions services/database/handlers/dataMigration/dataMigration.js

This file was deleted.

101 changes: 0 additions & 101 deletions services/database/handlers/dataMigration/services/migrationRunner.js

This file was deleted.

12 changes: 0 additions & 12 deletions services/database/handlers/dataMigration/tables/acs.js

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions services/database/handlers/dataMigration/tables/fmap.js

This file was deleted.

12 changes: 0 additions & 12 deletions services/database/handlers/dataMigration/tables/index.js

This file was deleted.

18 changes: 0 additions & 18 deletions services/database/handlers/dataMigration/tables/section.js

This file was deleted.

11 changes: 0 additions & 11 deletions services/database/handlers/dataMigration/tables/sectionBase.js

This file was deleted.

11 changes: 0 additions & 11 deletions services/database/handlers/dataMigration/tables/state.js

This file was deleted.

19 changes: 0 additions & 19 deletions services/database/handlers/dataMigration/tables/stateStatus.js

This file was deleted.

21 changes: 0 additions & 21 deletions services/database/handlers/dataMigration/tables/uploads.js

This file was deleted.

28 changes: 0 additions & 28 deletions services/database/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,10 @@ custom:
sources: [./data/seed/seed-section-base.json]
- table: ${self:custom.stageEnrollmentCountsTableName}
sources: [./data/seed-local/seed-stg-enrollment-counts.json]
# Disabling migration handler to unattach from v2 security group for teardown. Remove this and dataMigration folder in future
# dataMigrationEnabled: ${env:runV2DataMigration, ssm:/configuration/${self:custom.stage}/runV2DataMigration, "false"}
# dataMigrationEnvMap:
# production: prod
# val: staging
# main: master
# default: master
# dataMigrationEnv: ${self:custom.dataMigrationEnvMap.${self:custom.stage}, self:custom.dataMigrationEnvMap.default}
dataMigrationEnabled: false
scripts:
hooks:
deploy:finalize: |
serverless invoke --stage ${self:custom.stage} --function seed
if [ ${self:custom.dataMigrationEnabled} = "true" ];
then
serverless invoke --stage ${self:custom.stage} --function dataMigration
fi
dynamodb:
stages:
- local
Expand Down Expand Up @@ -105,21 +92,6 @@ provider:
Resource: "*"

functions:
# Disabling migration handler to unattach from v2 security group for teardown. Remove this and dataMigration folder in future
# dataMigration:
# handler: handlers/dataMigration/dataMigration.handler
# environment:
# postgresDb: ${env:postgresDatabase, ssm:/${self:custom.dataMigrationEnv}/postgres_db}
# postgresHost: ${env:postgresHost, ssm:/${self:custom.dataMigrationEnv}/postgres_host}
# postgresUser: ${env:postgresUser, ssm:/${self:custom.dataMigrationEnv}/postgres_user}
# postgresPassword: ${env:postgresPassword, ssm:/${self:custom.dataMigrationEnv}/custom/postgres_custom_password, ssm:/${self:custom.dataMigrationEnv}/postgres_password}
# dynamoPrefix: ${self:custom.stage}
# timeout: 120
# vpc:
# securityGroupIds:
# - ${env:runV2DataMigration, ssm:/configuration/${self:custom.stage}/migrationSecurityGroup, ssm:/configuration/default/migrationSecurityGroup}
# subnetIds:
# - ${env:runV2DataMigration, ssm:/configuration/${self:custom.stage}/migrationSubnet, ssm:/configuration/default/migrationSubnet}
seed:
handler: handlers/seed/seed.handler
environment:
Expand Down
17 changes: 4 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8850,19 +8850,10 @@ loader-runner@^4.2.0:
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1"
integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==

loader-utils@^1.2.3:
version "1.4.2"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.2.tgz#29a957f3a63973883eb684f10ffd3d151fec01a3"
integrity sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==
dependencies:
big.js "^5.2.2"
emojis-list "^3.0.0"
json5 "^1.0.1"

loader-utils@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.2.tgz#d6e3b4fb81870721ae4e0868ab11dd638368c129"
integrity sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==
loader-utils@^1.2.3, loader-utils@^2.0.0, loader-utils@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c"
integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==
dependencies:
big.js "^5.2.2"
emojis-list "^3.0.0"
Expand Down

0 comments on commit 8b536f2

Please sign in to comment.