From 1f0c0e828da89ad81bdeff3bfabe911961360d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mayra=20Pe=C3=B1a?= Date: Mon, 11 Nov 2024 10:59:25 -0800 Subject: [PATCH] Clean up --- .github/workflows/push-to-main.yml | 11 +---------- automate/dbt/get_artifacts.sh | 9 +++------ transform/.dbt_coves/config.yml | 2 +- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/workflows/push-to-main.yml b/.github/workflows/push-to-main.yml index 3209e99..26d45b9 100644 --- a/.github/workflows/push-to-main.yml +++ b/.github/workflows/push-to-main.yml @@ -28,13 +28,11 @@ jobs: # Perform the deployment to Prod build: - # Need to make sure that when the PR was closed, it was actually merged. + # Need to make sure that when the PR was closed, it was actually merged. # if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' name: Deployment Script runs-on: ubuntu-latest - # outputs: - # manifest_found: ${{ steps.prod_manifest.outputs.manifest_found }} # Set environment variables in # https://github.com////settings/variables/actions @@ -84,23 +82,16 @@ jobs: id: prod-manifest run: "../automate/dbt/get_artifacts.sh" - - name: Debug output - run: "echo Manifest found: ${{ steps.prod-manifest.outputs.manifest_found }}" - # Runs blue green with no deferral - name: Run blue / green deployment if: ${{ steps.prod-manifest.outputs.manifest_found == 'false' }} id: run-blue-green - # env: - # MANIFEST_FOUND: ${{ steps.prod_manifest.outputs.manifest_found }} run: "dbt-coves blue-green" # Runs blue green with deferral - name: Run blue / green deployment with deferral if: ${{ steps.prod-manifest.outputs.manifest_found == 'true' }} id: run-blue-green-defer - # env: - # MANIFEST_FOUND: ${{ steps.prod_manifest.outputs.manifest_found }} run: "dbt-coves blue-green --defer" - name: Drop orphaned relations in db that are no longer in dbt diff --git a/automate/dbt/get_artifacts.sh b/automate/dbt/get_artifacts.sh index d6e1e7c..4b6fae6 100755 --- a/automate/dbt/get_artifacts.sh +++ b/automate/dbt/get_artifacts.sh @@ -21,9 +21,7 @@ then echo "Manifest not found in Snowflake stage, contact the Snowflake administrator to load a updated manifest to snowflake." # This is used by github actions # echo "::set-output name=manifest_found::false" - # echo "manifest_found=false" >> $GITHUB_OUTPUT - # Debugging statement - # echo "Wrote manifest_found=false to GITHUB_OUTPUT" + echo "manifest_found=false" >> $GITHUB_OUTPUT # This is used by Jenkins # echo "false" > temp_MANIFEST_FOUND.txt @@ -31,9 +29,8 @@ else echo "Updated manifest from production" # This is used by github actions - echo "::set-output name=manifest_found::true" - # echo "manifest_found=true" >> $GITHUB_OUTPUT - # echo "Wrote manifest_found=true to GITHUB_OUTPUT" + # echo "::set-output name=manifest_found::true" + echo "manifest_found=true" >> $GITHUB_OUTPUT # This is used by Jenkins # echo "true" > temp_MANIFEST_FOUND.txt diff --git a/transform/.dbt_coves/config.yml b/transform/.dbt_coves/config.yml index 6cc52f1..ca96109 100644 --- a/transform/.dbt_coves/config.yml +++ b/transform/.dbt_coves/config.yml @@ -78,7 +78,7 @@ blue_green: prod_db_env_var: DATACOVES__MAIN__DATABASE # This holds the name of the production database --- no default # staging_database: STAGING_DB # Optional name you want to give to the staging database --- no default # staging_suffix: STAGING # If not using staging_database above, {prod_db}_{staging_suffix} will be used --- default: STAGING - drop_staging_db_at_start: true # Start blue-green by dropping staging db --- default false + drop_staging_db_at_start: false # Start blue-green by dropping staging db --- default false drop_staging_db_on_failure: false # Drop staging db if blue-green fails --- default false keep_staging_db_on_success: false # Keep staging db if blue-green succeeds --- default false # dbt_selector: "-s personal_loans" # dbt build arguments --- no default