diff --git a/.github/scripts/compareDatabasesDown.sh b/.github/scripts/compareDatabasesDown.sh index e870c1d3f1..84e1197039 100755 --- a/.github/scripts/compareDatabasesDown.sh +++ b/.github/scripts/compareDatabasesDown.sh @@ -3,96 +3,27 @@ mkdir results mkdir comparison -PGCMPINPUT1=./pgdumpv1_0_1/AerieMerlinV1_0_1 PGCMPINPUT2=./pgdumpmigrateddown/AerieMerlinMigratedDown PGCLABEL1=AerieMerlinV1_0_1 PGCLABEL2=AerieMerlinMigratedDown PGCFULLOUTPUT=./comparison/fulloutputMerlin.txt PGCUNEXPLAINED=./comparison/unexplainedMerlin.txt PGCBADEXPLAIN=./comparison/badexplanationsMerlin.txt PGDB=postgres PGBINDIR=/usr/bin PGCEXPLANATIONS=./explanations_merlin ./pgcmp +PGCMPINPUT1=./pgdumpV2_7_0/AerieV2_7_0 \ +PGCMPINPUT2=./pgdumpmigrateddown/AerieMigratedDown \ +PGCLABEL1=AerieV2_7_0 \ +PGCLABEL2=AerieMigratedDown \ +PGCFULLOUTPUT=./comparison/fulloutput.txt \ +PGCUNEXPLAINED=./comparison/unexplained.txt \ +PGCBADEXPLAIN=./comparison/badexplanations.txt \ +PGDB=postgres \ +PGBINDIR=/usr/bin \ +PGCOMITSCHEMAS="('hdb_catalog'),('pg_catalog'),('information_schema')" \ +./pgcmp return_code=$? -if [ $return_code -ne 0 ]; then - echo "AerieMerlin comparison failed - return code=$return_code" - touch results/fulloutput - touch results/unexplained - touch results/badexplanations - touch results/perform-comparison.log - printf "==================\nAerieMerlin Results\n==================\n" >> results/fulloutput - printf "==================\nAerieMerlin Results\n==================\n" >> results/unexplained - printf "==================\nAerieMerlin Results\n==================\n" >> results/badexplanations - printf "==================\nAerieMerlin Results\n==================\n" >> results/perform-comparison.log - cat ./comparison/fulloutputMerlin.txt >> results/fulloutput - cat ./comparison/unexplainedMerlin.txt >> results/unexplained - cat ./comparison/badexplanationsMerlin.txt >> results/badexplanations - cat /tmp/perform-comparison.log >> results/perform-comparison.log -else - echo "AerieMerlin comparison succeeded" -fi - -PGCMPINPUT1=./pgdumpv1_0_1/AerieSchedulerV1_0_1 PGCMPINPUT2=./pgdumpmigrateddown/AerieSchedulerMigratedDown PGCLABEL1=AerieSchedulerV1_0_1 PGCLABEL2=AerieSchedulerMigratedDown PGCFULLOUTPUT=./comparison/fulloutputScheduler.txt PGCUNEXPLAINED=./comparison/unexplainedScheduler.txt PGCBADEXPLAIN=./comparison/badexplanationsScheduler.txt PGDB=postgres PGBINDIR=/usr/bin PGCEXPLANATIONS=./explanations ./pgcmp -retcode=$? -if [ $retcode -gt $return_code ]; then -return_code=$retcode -fi - -if [ $retcode -ne 0 ]; then - echo "AerieScheduler comparison failed - return code=$retcode" - touch results/fulloutput - touch results/unexplained - touch results/badexplanations - touch results/perform-comparison.log - printf "\n==================\nAerieScheduler Results\n==================\n" >> results/fulloutput - printf "\n==================\nAerieScheduler Results\n==================\n" >> results/unexplained - printf "\n==================\nAerieScheduler Results\n==================\n" >> results/badexplanations - printf "\n==================\nAerieScheduler Results\n==================\n" >> results/perform-comparison.log - cat ./comparison/fulloutputScheduler.txt >> results/fulloutput - cat ./comparison/unexplainedScheduler.txt >> results/unexplained - cat ./comparison/badexplanationsScheduler.txt >> results/badexplanations - cat /tmp/perform-comparison.log >> results/perform-comparison.log -else - echo "AerieScheduler comparison succeeded" -fi -PGCMPINPUT1=./pgdumpv1_0_1/AerieSequencingV1_0_1 PGCMPINPUT2=./pgdumpmigrateddown/AerieSequencingMigratedDown PGCLABEL1=AerieSequencingV1_0_1 PGCLABEL2=AerieSequencingMigratedDown PGCFULLOUTPUT=./comparison/fulloutputSequencing.txt PGCUNEXPLAINED=./comparison/unexplainedSequencing.txt PGCBADEXPLAIN=./comparison/badexplanationsSequencing.txt PGDB=postgres PGBINDIR=/usr/bin PGCEXPLANATIONS=./explanations ./pgcmp -retcode=$? -if [ $retcode -gt $return_code ]; then -return_code=$retcode -fi - -if [ $retcode -ne 0 ]; then - echo "AerieSequencing comparison failed - return code=$retcode" - touch results/fulloutput - touch results/unexplained - touch results/badexplanations - touch results/perform-comparison.log - printf "\n==================\nAerieSequencing Results\n==================\n" >> results/fulloutput - printf "\n==================\nAerieSequencing Results\n==================\n" >> results/unexplained - printf "\n==================\nAerieSequencing Results\n==================\n" >> results/badexplanations - printf "\n==================\nAerieSequencing Results\n==================\n" >> results/perform-comparison.log - cat ./comparison/fulloutputSequencing.txt >> results/fulloutput - cat ./comparison/unexplainedSequencing.txt >> results/unexplained - cat ./comparison/badexplanationsSequencing.txt >> results/badexplanations - cat /tmp/perform-comparison.log >> results/perform-comparison.log -else - echo "AerieSequencing comparison succeeded" -fi - -PGCMPINPUT1=./pgdumpv1_0_1/AerieUIV1_0_1 PGCMPINPUT2=./pgdumpmigrateddown/AerieUIMigratedDown PGCLABEL1=AerieUIV1_0_1 PGCLABEL2=AerieUIMigratedDown PGCFULLOUTPUT=./comparison/fulloutputUI.txt PGCUNEXPLAINED=./comparison/unexplainedUI.txt PGCBADEXPLAIN=./comparison/badexplanationsUI.txt PGDB=postgres PGBINDIR=/usr/bin PGCEXPLANATIONS=./explanations ./pgcmp -retcode=$? -if [ $retcode -gt $return_code ]; then -return_code=$retcode -fi - -if [ $retcode -ne 0 ]; then - echo "AerieUI comparison failed - return code=$retcode" - touch results/fulloutput - touch results/unexplained - touch results/badexplanations - touch results/perform-comparison.log - printf "\n==================\nAerieUI Results\n==================\n" >> results/fulloutput - printf "\n==================\nAerieUI Results\n==================\n" >> results/unexplained - printf "\n==================\nAerieUI Results\n==================\n" >> results/badexplanations - printf "\n==================\nAerieUI Results\n==================\n" >> results/perform-comparison.log - cat ./comparison/fulloutputUI.txt >> results/fulloutput - cat ./comparison/unexplainedUI.txt >> results/unexplained - cat ./comparison/badexplanationsUI.txt >> results/badexplanations - cat /tmp/perform-comparison.log >> results/perform-comparison.log +if [ $return_code -ne 0 ]; then + echo "Database schema comparison failed - return code=$return_code" + mv ./comparison/fulloutput.txt results/fulloutput + mv ./comparison/unexplained.txt results/unexplained + mv ./comparison/badexplanations.txt results/badexplanations + mv /tmp/perform-comparison.log results/perform-comparison.log else - echo "AerieUI comparison succeeded" + echo "Database schema comparison succeeded" fi exit $return_code diff --git a/.github/scripts/compareDatabasesUp.sh b/.github/scripts/compareDatabasesUp.sh index d936abaa8b..2cf967f46d 100755 --- a/.github/scripts/compareDatabasesUp.sh +++ b/.github/scripts/compareDatabasesUp.sh @@ -3,96 +3,27 @@ mkdir results mkdir comparison -PGCMPINPUT1=./pgdumpmigrated/AerieMerlinMigrated PGCMPINPUT2=./pgdumpraw/AerieMerlinRaw PGCLABEL1=AerieMerlinMigrated PGCLABEL2=AerieMerlinRaw PGCFULLOUTPUT=./comparison/fulloutputMerlin.txt PGCUNEXPLAINED=./comparison/unexplainedMerlin.txt PGCBADEXPLAIN=./comparison/badexplanationsMerlin.txt PGDB=postgres PGBINDIR=/usr/bin ./pgcmp +PGCMPINPUT1=./pgdumpmigrated/AerieMigrated \ +PGCMPINPUT2=./pgdumpraw/AerieRaw \ +PGCLABEL1=AerieMigrated \ +PGCLABEL2=AerieRaw \ +PGCFULLOUTPUT=./comparison/fulloutput.txt \ +PGCUNEXPLAINED=./comparison/unexplained.txt \ +PGCBADEXPLAIN=./comparison/badexplanations.txt \ +PGDB=postgres \ +PGBINDIR=/usr/bin \ +PGCOMITSCHEMAS="('hdb_catalog'),('pg_catalog'),('information_schema')" \ +./pgcmp return_code=$? -if [ $return_code -ne 0 ]; then - echo "AerieMerlin comparison failed - return code=$return_code" - touch results/fulloutput - touch results/unexplained - touch results/badexplanations - touch results/perform-comparison.log - printf "==================\nAerieMerlin Results\n==================\n" >> results/fulloutput - printf "==================\nAerieMerlin Results\n==================\n" >> results/unexplained - printf "==================\nAerieMerlin Results\n==================\n" >> results/badexplanations - printf "==================\nAerieMerlin Results\n==================\n" >> results/perform-comparison.log - cat ./comparison/fulloutputMerlin.txt >> results/fulloutput - cat ./comparison/unexplainedMerlin.txt >> results/unexplained - cat ./comparison/badexplanationsMerlin.txt >> results/badexplanations - cat /tmp/perform-comparison.log >> results/perform-comparison.log -else - echo "AerieMerlin comparison succeeded" -fi - -PGCMPINPUT1=./pgdumpmigrated/AerieSchedulerMigrated PGCMPINPUT2=./pgdumpraw/AerieSchedulerRaw PGCLABEL1=AerieSchedulerMigrated PGCLABEL2=AerieSchedulerRaw PGCFULLOUTPUT=./comparison/fulloutputScheduler.txt PGCUNEXPLAINED=./comparison/unexplainedScheduler.txt PGCBADEXPLAIN=./comparison/badexplanationsScheduler.txt PGDB=postgres PGBINDIR=/usr/bin ./pgcmp -retcode=$? -if [ $retcode -gt $return_code ]; then -return_code=$retcode -fi - -if [ $retcode -ne 0 ]; then - echo "AerieScheduler comparison failed - return code=$retcode" - touch results/fulloutput - touch results/unexplained - touch results/badexplanations - touch results/perform-comparison.log - printf "\n==================\nAerieScheduler Results\n==================\n" >> results/fulloutput - printf "\n==================\nAerieScheduler Results\n==================\n" >> results/unexplained - printf "\n==================\nAerieScheduler Results\n==================\n" >> results/badexplanations - printf "\n==================\nAerieScheduler Results\n==================\n" >> results/perform-comparison.log - cat ./comparison/fulloutputScheduler.txt >> results/fulloutput - cat ./comparison/unexplainedScheduler.txt >> results/unexplained - cat ./comparison/badexplanationsScheduler.txt >> results/badexplanations - cat /tmp/perform-comparison.log >> results/perform-comparison.log -else - echo "AerieScheduler comparison succeeded" -fi -PGCMPINPUT1=./pgdumpmigrated/AerieSequencingMigrated PGCMPINPUT2=./pgdumpraw/AerieSequencingRaw PGCLABEL1=AerieSequencingMigrated PGCLABEL2=AerieSequencingRaw PGCFULLOUTPUT=./comparison/fulloutputSequencing.txt PGCUNEXPLAINED=./comparison/unexplainedSequencing.txt PGCBADEXPLAIN=./comparison/badexplanationsSequencing.txt PGDB=postgres PGBINDIR=/usr/bin ./pgcmp -retcode=$? -if [ $retcode -gt $return_code ]; then -return_code=$retcode -fi - -if [ $retcode -ne 0 ]; then - echo "AerieSequencing comparison failed - return code=$retcode" - touch results/fulloutput - touch results/unexplained - touch results/badexplanations - touch results/perform-comparison.log - printf "\n==================\nAerieSequencing Results\n==================\n" >> results/fulloutput - printf "\n==================\nAerieSequencing Results\n==================\n" >> results/unexplained - printf "\n==================\nAerieSequencing Results\n==================\n" >> results/badexplanations - printf "\n==================\nAerieSequencing Results\n==================\n" >> results/perform-comparison.log - cat ./comparison/fulloutputSequencing.txt >> results/fulloutput - cat ./comparison/unexplainedSequencing.txt >> results/unexplained - cat ./comparison/badexplanationsSequencing.txt >> results/badexplanations - cat /tmp/perform-comparison.log >> results/perform-comparison.log -else - echo "AerieSequencing comparison succeeded" -fi - -PGCMPINPUT1=./pgdumpmigrated/AerieUIMigrated PGCMPINPUT2=./pgdumpraw/AerieUIRaw PGCLABEL1=AerieUIMigrated PGCLABEL2=AerieUIRaw PGCFULLOUTPUT=./comparison/fulloutputUI.txt PGCUNEXPLAINED=./comparison/unexplainedUI.txt PGCBADEXPLAIN=./comparison/badexplanationsUI.txt PGDB=postgres PGBINDIR=/usr/bin ./pgcmp -retcode=$? -if [ $retcode -gt $return_code ]; then -return_code=$retcode -fi - -if [ $retcode -ne 0 ]; then - echo "AerieUI comparison failed - return code=$retcode" - touch results/fulloutput - touch results/unexplained - touch results/badexplanations - touch results/perform-comparison.log - printf "\n==================\nAerieUI Results\n==================\n" >> results/fulloutput - printf "\n==================\nAerieUI Results\n==================\n" >> results/unexplained - printf "\n==================\nAerieUI Results\n==================\n" >> results/badexplanations - printf "\n==================\nAerieUI Results\n==================\n" >> results/perform-comparison.log - cat ./comparison/fulloutputUI.txt >> results/fulloutput - cat ./comparison/unexplainedUI.txt >> results/unexplained - cat ./comparison/badexplanationsUI.txt >> results/badexplanations - cat /tmp/perform-comparison.log >> results/perform-comparison.log +if [ $return_code -ne 0 ]; then + echo "Database schema comparison failed - return code=$return_code" + mv ./comparison/fulloutput.txt results/fulloutput + mv ./comparison/unexplained.txt results/unexplained + mv ./comparison/badexplanations.txt results/badexplanations + mv /tmp/perform-comparison.log results/perform-comparison.log else - echo "AerieUI comparison succeeded" + echo "Database schema comparison succeeded" fi exit $return_code diff --git a/.github/scripts/explanations b/.github/scripts/explanations deleted file mode 100644 index 2040ce85fe..0000000000 --- a/.github/scripts/explanations +++ /dev/null @@ -1,24 +0,0 @@ -schema migrations migrations missing in 1st DB From Migration 0 2 -function definition migrations migrations.migrations.mark_migration_applied(character varying) missing in 1st DB From Migration 0 3 -function definition migrations migrations.migrations.mark_migration_rolled_back(character varying) missing in 1st DB From Migration 0 3 -function permissions migrations migrations.mark_migration_applied(character varying)-role:aerie missing in 1st DB From Migration 0 3 -function permissions migrations migrations.mark_migration_rolled_back(character varying)-role:aerie missing in 1st DB From Migration 0 3 -function permissions migrations migrations.mark_migration_applied(character varying)-role:PUBLIC missing in 1st DB From Migration 0 3 -function permissions migrations migrations.mark_migration_rolled_back(character varying)-role:PUBLIC missing in 1st DB From Migration 0 3 -function owner migrations migrations.mark_migration_applied(character varying) missing in 1st DB From Migration 0 3 -function owner migrations migrations.mark_migration_rolled_back(character varying) missing in 1st DB From Migration 0 3 -function language migrations migrations.migrations.mark_migration_applied(character varying) missing in 1st DB From Migration 0 3 -table owner migrations migrations.schema_migrations missing in 1st DB From Migration 0 4 -column migrations migrations.schema_migrations.migration_id missing in 1st DB From Migration 0 4 -function language migrations migrations.migrations.mark_migration_rolled_back(character varying) missing in 1st DB From Migration 0 3 -function security type migrations migrations.migrations.mark_migration_applied(character varying) missing in 1st DB From Migration 0 3 -function security type migrations migrations.migrations.mark_migration_rolled_back(character varying) missing in 1st DB From Migration 0 3 -check constraint migrations migrations.schema_migrations:schema_migrations_pkey missing in 1st DB From Migration 0 3 -index migrations migrations.schema_migrations:schema_migrations_pkey missing in 1st DB From Migration 0 3 -data type migrations migrations.schema_migrations missing in 1st DB From Migration 0 3 -data type migrations migrations._schema_migrations missing in 1st DB From Migration 0 3 -table migrations migrations.schema_migrations missing in 1st DB From Migration 0 3 -function config migrations migrations.mark_migration_applied(character varying) missing in 1st DB From Migration 0 3 -function config migrations migrations.mark_migration_rolled_back(character varying) missing in 1st DB From Migration 0 3 -data type owner migrations migrations.schema_migrations missing in 1st DB From Migration 0 4 -data type owner migrations migrations._schema_migrations missing in 1st DB From Migration 0 4 diff --git a/.github/scripts/explanations_merlin_down b/.github/scripts/explanations_merlin_down deleted file mode 100644 index ae5219102a..0000000000 --- a/.github/scripts/explanations_merlin_down +++ /dev/null @@ -1,16 +0,0 @@ -function definition hdb_catalog hdb_catalog.hdb_catalog."notify_hasura_refreshResourceTypes_INSERT"() missing in 1st DB From_RefreshResourceTypes_Action 2 -function definition hdb_catalog hdb_catalog.hdb_catalog."notify_hasura_refreshResourceTypes_UPDATE"() missing in 1st DB From_RefreshResourceTypes_Action 2 -function permissions hdb_catalog hdb_catalog."notify_hasura_refreshResourceTypes_UPDATE"()-role:aerie missing in 1st DB From_RefreshResourceTypes_Action 2 -function permissions hdb_catalog hdb_catalog."notify_hasura_refreshResourceTypes_INSERT"()-role:aerie missing in 1st DB From_RefreshResourceTypes_Action 2 -function permissions hdb_catalog hdb_catalog."notify_hasura_refreshResourceTypes_UPDATE"()-role:PUBLIC missing in 1st DB From_RefreshResourceTypes_Action 2 -function permissions hdb_catalog hdb_catalog."notify_hasura_refreshResourceTypes_INSERT"()-role:PUBLIC missing in 1st DB From_RefreshResourceTypes_Action 2 -function owner hdb_catalog hdb_catalog."notify_hasura_refreshResourceTypes_UPDATE"() missing in 1st DB From_RefreshResourceTypes_Action 2 -function owner hdb_catalog hdb_catalog."notify_hasura_refreshResourceTypes_INSERT"() missing in 1st DB From_RefreshResourceTypes_Action 2 -function language hdb_catalog hdb_catalog.hdb_catalog."notify_hasura_refreshResourceTypes_INSERT"() missing in 1st DB From_RefreshResourceTypes_Action 2 -function language hdb_catalog hdb_catalog.hdb_catalog."notify_hasura_refreshResourceTypes_UPDATE"() missing in 1st DB From_RefreshResourceTypes_Action 2 -function security type hdb_catalog hdb_catalog.hdb_catalog."notify_hasura_refreshResourceTypes_INSERT"() missing in 1st DB From_RefreshResourceTypes_Action 2 -function security type hdb_catalog hdb_catalog.hdb_catalog."notify_hasura_refreshResourceTypes_UPDATE"() missing in 1st DB From_RefreshResourceTypes_Action 2 -trigger public public.mission_model."notify_hasura_refreshResourceTypes_INSERT"/"INSERT" missing in 1st DB From_RefreshResourceTypes_Action 2 -trigger public public.mission_model."notify_hasura_refreshResourceTypes_UPDATE"/"UPDATE" missing in 1st DB From_RefreshResourceTypes_Action 2 -function config hdb_catalog hdb_catalog."notify_hasura_refreshResourceTypes_UPDATE"() missing in 1st DB From_RefreshResourceTypes_Action 2 -function config hdb_catalog hdb_catalog."notify_hasura_refreshResourceTypes_INSERT"() missing in 1st DB From_RefreshResourceTypes_Action 2 diff --git a/.github/workflows/pgcmp.yml b/.github/workflows/pgcmp.yml index 1d2cf88740..abb7a6278f 100644 --- a/.github/workflows/pgcmp.yml +++ b/.github/workflows/pgcmp.yml @@ -4,16 +4,10 @@ on: pull_request: paths: - "deployment/hasura/migrations/**" - - "merlin-server/sql/**" - - "sequencing-server/sql/**" - - "scheduler-server/sql/**" - "deployment/postgres-init-db/sql/**" push: paths: - "deployment/hasura/migrations/**" - - "merlin-server/sql/**" - - "sequencing-server/sql/**" - - "scheduler-server/sql/**" - "deployment/postgres-init-db/sql/**" branches: - develop @@ -27,10 +21,10 @@ jobs: runs-on: ubuntu-latest environment: e2e-test steps: - - name: Checkout v1.0.1 + - name: Checkout v2.7.0 uses: actions/checkout@v4 with: - ref: "v1.0.1" + ref: "v2.7.0" - name: Clone PGCMP uses: actions/checkout@v4 with: @@ -46,12 +40,6 @@ jobs: sudo apt-get install --yes postgresql-client - name: Setup Hasura CLI run: sudo curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash - - name: Validate Gradle Wrapper - uses: gradle/wrapper-validation-action@v2 - - name: Distribute SQL and Assemble Java - uses: gradle/actions/setup-gradle@v3 - with: - arguments: distributeSQL - name: Start Postgres run: | docker compose up -d postgres hasura @@ -67,22 +55,23 @@ jobs: - name: Sleep for 1 Minute run: sleep 60s shell: bash - - name: Dump v1.0.1 Database + - name: Dump v2.7.0 Database env: AERIE_USERNAME: "${{secrets.AERIE_USERNAME}}" AERIE_PASSWORD: "${{secrets.AERIE_PASSWORD}}" run: | - mkdir pgdumpv1_0_1 - PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie_merlin PGCMPOUTPUT=./pgdumpv1_0_1/AerieMerlinV1_0_1 PGCLABEL=AerieMerlinV1_0_1 PGBINDIR=/usr/bin ./pgcmp/pgcmp-dump - PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie_scheduler PGCMPOUTPUT=./pgdumpv1_0_1/AerieSchedulerV1_0_1 PGCLABEL=AerieSchedulerV1_0_1 PGBINDIR=/usr/bin ./pgcmp/pgcmp-dump - PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie_sequencing PGCMPOUTPUT=./pgdumpv1_0_1/AerieSequencingV1_0_1 PGCLABEL=AerieSequencingV1_0_1 PGBINDIR=/usr/bin ./pgcmp/pgcmp-dump - PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie_ui PGCMPOUTPUT=./pgdumpv1_0_1/AerieUIV1_0_1 PGCLABEL=AerieUIV1_0_1 PGBINDIR=/usr/bin ./pgcmp/pgcmp-dump + mkdir pgdumpV2_7_0 + PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie \ + PGCMPOUTPUT=./pgdumpV2_7_0/AerieV2_7_0 \ + PGCLABEL=AerieV2_7_0 \ + PGBINDIR=/usr/bin \ + ./pgcmp/pgcmp-dump shell: bash - name: Share Database Dump uses: actions/upload-artifact@v4 with: - name: v1_0_1-db-dump - path: pgdumpv1_0_1 + name: v2_7_0-db-dump + path: pgdumpV2_7_0 retention-days: 1 - name: Checkout Latest uses: actions/checkout@v4 @@ -115,21 +104,17 @@ jobs: env: AERIE_USERNAME: "${{secrets.AERIE_USERNAME}}" AERIE_PASSWORD: "${{secrets.AERIE_PASSWORD}}" - - name: Clone PGCMP - uses: actions/checkout@v4 - with: - repository: cbbrowne/pgcmp - path: pgcmp - name: Dump Databases env: AERIE_USERNAME: "${{secrets.AERIE_USERNAME}}" AERIE_PASSWORD: "${{secrets.AERIE_PASSWORD}}" run: | mkdir pgdumpmigrated - PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie_merlin PGCMPOUTPUT=./pgdumpmigrated/AerieMerlinMigrated PGCLABEL=AerieMerlinMigrated PGBINDIR=/usr/bin ./pgcmp/pgcmp-dump - PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie_scheduler PGCMPOUTPUT=./pgdumpmigrated/AerieSchedulerMigrated PGCLABEL=AerieSchedulerMigrated PGBINDIR=/usr/bin ./pgcmp/pgcmp-dump - PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie_sequencing PGCMPOUTPUT=./pgdumpmigrated/AerieSequencingMigrated PGCLABEL=AerieSequencingMigrated PGBINDIR=/usr/bin ./pgcmp/pgcmp-dump - PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie_ui PGCMPOUTPUT=./pgdumpmigrated/AerieUIMigrated PGCLABEL=AerieUIMigrated PGBINDIR=/usr/bin ./pgcmp/pgcmp-dump + PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie \ + PGCMPOUTPUT=./pgdumpmigrated/AerieMigratedUp \ + PGCLABEL=AerieMigratedUp \ + PGBINDIR=/usr/bin \ + ./pgcmp/pgcmp-dump shell: bash - name: Share Database Dump uses: actions/upload-artifact@v4 @@ -158,12 +143,6 @@ jobs: run: | sudo apt-get update sudo apt-get install --yes postgresql-client - - name: Validate Gradle Wrapper - uses: gradle/wrapper-validation-action@v2 - - name: Distribute SQL - uses: gradle/actions/setup-gradle@v3 - with: - arguments: distributeSQL - name: Setup Python uses: actions/setup-python@v5 with: @@ -195,17 +174,18 @@ jobs: AERIE_USERNAME: "${{secrets.AERIE_USERNAME}}" AERIE_PASSWORD: "${{secrets.AERIE_PASSWORD}}" run: | - mkdir pgdumpraw - PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie_merlin PGCMPOUTPUT=./pgdumpraw/AerieMerlinRaw PGCLABEL=AerieMerlinRaw PGBINDIR=/usr/bin ./pgcmp/pgcmp-dump - PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie_scheduler PGCMPOUTPUT=./pgdumpraw/AerieSchedulerRaw PGCLABEL=AerieSchedulerRaw PGBINDIR=/usr/bin ./pgcmp/pgcmp-dump - PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie_sequencing PGCMPOUTPUT=./pgdumpraw/AerieSequencingRaw PGCLABEL=AerieSequencingRaw PGBINDIR=/usr/bin ./pgcmp/pgcmp-dump - PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie_ui PGCMPOUTPUT=./pgdumpraw/AerieUIRaw PGCLABEL=AerieUIRaw PGBINDIR=/usr/bin ./pgcmp/pgcmp-dump + mkdir pgdumpcurrent + PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie \ + PGCMPOUTPUT=./pgdumpcurrent/AerieCurrent \ + PGCLABEL=AerieCurrent \ + PGBINDIR=/usr/bin \ + ./pgcmp/pgcmp-dump shell: bash - name: Share Database Dump uses: actions/upload-artifact@v4 with: - name: raw-sql-db-dump - path: pgdumpraw + name: current-sql-db-dump + path: pgdumpcurrent retention-days: 1 - name: Migrate Latest to Base run: | @@ -226,10 +206,11 @@ jobs: AERIE_PASSWORD: "${{secrets.AERIE_PASSWORD}}" run: | mkdir pgdumpmigrateddown - PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie_merlin PGCMPOUTPUT=./pgdumpmigrateddown/AerieMerlinMigratedDown PGCLABEL=AerieMerlinMigratedDown PGBINDIR=/usr/bin ./pgcmp/pgcmp-dump - PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie_scheduler PGCMPOUTPUT=./pgdumpmigrateddown/AerieSchedulerMigratedDown PGCLABEL=AerieSchedulerMigratedDown PGBINDIR=/usr/bin ./pgcmp/pgcmp-dump - PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie_sequencing PGCMPOUTPUT=./pgdumpmigrateddown/AerieSequencingMigratedDown PGCLABEL=AerieSequencingMigratedDown PGBINDIR=/usr/bin ./pgcmp/pgcmp-dump - PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie_ui PGCMPOUTPUT=./pgdumpmigrateddown/AerieUIMigratedDown PGCLABEL=AerieUIMigratedDown PGBINDIR=/usr/bin ./pgcmp/pgcmp-dump + PGURI=postgres://"${AERIE_USERNAME}":"${AERIE_PASSWORD}"@localhost:5432/aerie \ + PGCMPOUTPUT=./pgdumpmigrateddown/AerieMigratedDown \ + PGCLABEL=AerieMigratedDown \ + PGBINDIR=/usr/bin \ + ./pgcmp/pgcmp-dump shell: bash - name: Share Database Dump uses: actions/upload-artifact@v4 @@ -263,7 +244,7 @@ jobs: sudo apt-get update sudo apt-get install --yes postgresql-client - name: Start Postgres - run: docker run -d -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust --name=postgres postgres:14.1 + run: docker run -d -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust --name=postgres postgres:14.8 - name: Sleep for 5 Seconds run: sleep 5s shell: bash @@ -274,8 +255,8 @@ jobs: path: pgcmp/pgdumpmigrated - uses: actions/download-artifact@v4 with: - name: raw-sql-db-dump - path: pgcmp/pgdumpraw + name: current-sql-db-dump + path: pgcmp/pgdumpcurrent - name: Compare Databases id: dbcmp run: | @@ -323,8 +304,8 @@ jobs: - name: Download Shared Dumps uses: actions/download-artifact@v4 with: - name: v1_0_1-db-dump - path: pgcmp/pgdumpv1_0_1 + name: v2_7_0-db-dump + path: pgcmp/pgdumpV2_7_0 - uses: actions/download-artifact@v4 with: name: migrated-down-db-dump @@ -333,8 +314,6 @@ jobs: id: dbcmp run: | cp ./.github/scripts/compareDatabasesDown.sh pgcmp/compareDatabases.sh - cp ./.github/scripts/explanations pgcmp/explanations - cat ./.github/scripts/explanations ./.github/scripts/explanations_merlin_down > pgcmp/explanations_merlin cd pgcmp ./compareDatabases.sh shell: bash