diff --git a/.github/workflows/dbt_deploy_new_workflows.yml b/.github/workflows/dbt_deploy_new_workflows.yml index 6c44671..6b6cd38 100644 --- a/.github/workflows/dbt_deploy_new_workflows.yml +++ b/.github/workflows/dbt_deploy_new_workflows.yml @@ -42,4 +42,11 @@ jobs: - name: Deploy New Github Actions run: | - make deploy_new_github_action DBT_TARGET=prod \ No newline at end of file + make deploy_new_github_action DBT_TARGET=prod + + notify-failure: + needs: [run_dbt_jobs] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/dbt_docs_update.yml b/.github/workflows/dbt_docs_update.yml index d08538e..7d4e3fd 100644 --- a/.github/workflows/dbt_docs_update.yml +++ b/.github/workflows/dbt_docs_update.yml @@ -73,4 +73,11 @@ jobs: - name: push changes to docs run: | - git push -f --set-upstream origin docs \ No newline at end of file + git push -f --set-upstream origin docs + + notify-failure: + needs: [run_dbt_jobs] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/dbt_integration_test.yml b/.github/workflows/dbt_integration_test.yml index 1646d61..ec6a370 100644 --- a/.github/workflows/dbt_integration_test.yml +++ b/.github/workflows/dbt_integration_test.yml @@ -14,4 +14,11 @@ jobs: dbt test --selector 'integration_tests' environment: ${{ github.ref == 'refs/heads/main' && 'workflow_prod' || 'workflow_dev' }} warehouse: ${{ vars.WAREHOUSE }} - secrets: inherit \ No newline at end of file + secrets: inherit + + notify-failure: + needs: [called_workflow_template] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/dbt_run_adhoc.yml b/.github/workflows/dbt_run_adhoc.yml index 4fca74c..547eb05 100644 --- a/.github/workflows/dbt_run_adhoc.yml +++ b/.github/workflows/dbt_run_adhoc.yml @@ -63,4 +63,11 @@ jobs: dbt deps - name: Run DBT Jobs run: | - ${{ inputs.dbt_command }} \ No newline at end of file + ${{ inputs.dbt_command }} + + notify-failure: + needs: [run_dbt_jobs] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/dbt_run_deployment.yml b/.github/workflows/dbt_run_deployment.yml deleted file mode 100644 index d0735d8..0000000 --- a/.github/workflows/dbt_run_deployment.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: dbt_run_deployment -run-name: ${{ inputs.dbt_command }} - -on: - workflow_dispatch: - branches: - - "main" - inputs: - warehouse: - type: choice - description: Snowflake warehouse - required: true - options: - - DBT - - DBT_CLOUD - - DBT_EMERGENCY - default: DBT - dbt_command: - type: string - description: 'DBT Run Command' - required: true - -env: - DBT_PROFILES_DIR: ./ - DBT_VERSION: "${{ vars.DBT_VERSION }}" - ACCOUNT: "${{ vars.ACCOUNT }}" - ROLE: "${{ vars.ROLE }}" - USER: "${{ vars.USER }}" - PASSWORD: "${{ secrets.PASSWORD }}" - REGION: "${{ vars.REGION }}" - DATABASE: "${{ vars.DATABASE }}" - WAREHOUSE: "${{ inputs.WAREHOUSE }}" - SCHEMA: "${{ vars.SCHEMA }}" - -concurrency: - group: ${{ github.workflow }} - -jobs: - dbt: - runs-on: ubuntu-latest - environment: - name: workflow_prod - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: "3.10" - cache: "pip" - - - name: install dependencies - run: | - pip install -r requirements.txt - dbt deps - - name: Run DBT Jobs - run: | - ${{ inputs.dbt_command }} - - name: Run datashare model - run: | - cnt=$(dbt ls -m fsc_utils.datashare._datashare___create_gold | wc -l ); if [ $cnt -eq 1 ]; then dbt run -m fsc_utils.datashare._datashare___create_gold; fi; - dbt run-operation run_query --args "{sql: call admin.datashare.sp_grant_share_permissions('${{ env.DATABASE }}')}" - - name: Store logs - uses: actions/upload-artifact@v3 - with: - name: dbt-logs - path: | - logs - target \ No newline at end of file diff --git a/.github/workflows/dbt_run_dev_refresh.yml b/.github/workflows/dbt_run_dev_refresh.yml index b7198d3..ed3b791 100644 --- a/.github/workflows/dbt_run_dev_refresh.yml +++ b/.github/workflows/dbt_run_dev_refresh.yml @@ -43,6 +43,13 @@ jobs: run: | dbt run-operation fsc_evm.run_sp_create_prod_clone + notify-failure: + needs: [run_dbt_jobs_refresh] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + run_dbt_jobs_udfs: runs-on: ubuntu-latest needs: run_dbt_jobs_refresh @@ -65,4 +72,11 @@ jobs: - name: Run Recreate UDFs run: | dbt run-operation fsc_utils.create_evm_streamline_udfs --vars '{"UPDATE_UDFS_AND_SPS":True}' -t dev - dbt run -s livequery_models.deploy.core._live --vars '{"UPDATE_UDFS_AND_SPS":True}' -t dev \ No newline at end of file + dbt run -s livequery_models.deploy.core._live --vars '{"UPDATE_UDFS_AND_SPS":True}' -t dev + + notify-failure2: + needs: [run_dbt_jobs_udfs] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/dbt_run_full_observability.yml b/.github/workflows/dbt_run_full_observability.yml index dd4e8b7..e17d401 100644 --- a/.github/workflows/dbt_run_full_observability.yml +++ b/.github/workflows/dbt_run_full_observability.yml @@ -44,5 +44,9 @@ jobs: run: | dbt run --threads 2 --vars '{"OBSERV_FULL_TEST":True}' -m "fsc_evm,tag:observability" - - + notify-failure: + needs: [run_dbt_jobs] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/dbt_run_scheduled_abis.yml b/.github/workflows/dbt_run_scheduled_abis.yml index 7803318..f833bfe 100644 --- a/.github/workflows/dbt_run_scheduled_abis.yml +++ b/.github/workflows/dbt_run_scheduled_abis.yml @@ -47,3 +47,10 @@ jobs: - name: Kick off decoded logs history, if there are new ABIs from users run: | dbt run-operation fsc_evm.run_decoded_logs_history + + notify-failure: + needs: [run_dbt_jobs] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/dbt_run_scheduled_decoded_logs.yml b/.github/workflows/dbt_run_scheduled_decoded_logs.yml index 9b5c274..1eb8465 100644 --- a/.github/workflows/dbt_run_scheduled_decoded_logs.yml +++ b/.github/workflows/dbt_run_scheduled_decoded_logs.yml @@ -42,4 +42,11 @@ jobs: - name: Update the silver and gold tables with the latest decoded logs run: | - dbt run -m "fsc_evm,tag:bronze_decoded_logs" "fsc_evm,tag:silver_decoded_logs" "fsc_evm,tag:gold_decoded_logs" \ No newline at end of file + dbt run -m "fsc_evm,tag:bronze_decoded_logs" "fsc_evm,tag:silver_decoded_logs" "fsc_evm,tag:gold_decoded_logs" + + notify-failure: + needs: [run_dbt_jobs] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/dbt_run_scheduled_main.yml b/.github/workflows/dbt_run_scheduled_main.yml index 057792e..04ef203 100644 --- a/.github/workflows/dbt_run_scheduled_main.yml +++ b/.github/workflows/dbt_run_scheduled_main.yml @@ -51,3 +51,10 @@ jobs: - name: Get new contract ABIs run: | dbt run --vars '{"STREAMLINE_INVOKE_STREAMS":True}' -m "fsc_evm,tag:bronze_abis" "fsc_evm,tag:streamline_abis_realtime" "fsc_evm,tag:streamline_abis_complete" + + notify-failure: + needs: [run_dbt_jobs] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/dbt_run_scheduled_scores.yml b/.github/workflows/dbt_run_scheduled_scores.yml index b1e7429..844c122 100644 --- a/.github/workflows/dbt_run_scheduled_scores.yml +++ b/.github/workflows/dbt_run_scheduled_scores.yml @@ -41,4 +41,11 @@ jobs: dbt deps - name: Update scores run: | - dbt run -m "fsc_evm,tag:scores" --vars '{"INCLUDE_GAMING_METRICS": true}' \ No newline at end of file + dbt run -m "fsc_evm,tag:scores" --vars '{"INCLUDE_GAMING_METRICS": true}' + + notify-failure: + needs: [run_dbt_jobs] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/dbt_run_streamline_chainhead.yml b/.github/workflows/dbt_run_streamline_chainhead.yml index 2055baf..6243b08 100644 --- a/.github/workflows/dbt_run_streamline_chainhead.yml +++ b/.github/workflows/dbt_run_streamline_chainhead.yml @@ -46,4 +46,11 @@ jobs: - name: Run Chainhead Tests run: | - dbt test -m "fsc_evm,tag:chainhead" \ No newline at end of file + dbt test -m "fsc_evm,tag:chainhead" + + notify-failure: + needs: [run_dbt_jobs] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/dbt_run_streamline_decoded_logs_history.yml b/.github/workflows/dbt_run_streamline_decoded_logs_history.yml index baec4d0..eadf8c1 100644 --- a/.github/workflows/dbt_run_streamline_decoded_logs_history.yml +++ b/.github/workflows/dbt_run_streamline_decoded_logs_history.yml @@ -46,4 +46,11 @@ jobs: - name: Decode historical logs run: | - dbt run-operation fsc_evm.decoded_logs_history --vars '{"STREAMLINE_INVOKE_STREAMS":True}' \ No newline at end of file + dbt run-operation fsc_evm.decoded_logs_history --vars '{"STREAMLINE_INVOKE_STREAMS":True}' + + notify-failure: + needs: [run_dbt_jobs] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/dbt_run_streamline_history.yml b/.github/workflows/dbt_run_streamline_history.yml index 030eaf7..625234f 100644 --- a/.github/workflows/dbt_run_streamline_history.yml +++ b/.github/workflows/dbt_run_streamline_history.yml @@ -43,3 +43,10 @@ jobs: - name: Run History Models run: | dbt run --vars '{"STREAMLINE_INVOKE_STREAMS":True}' -m "fsc_evm,tag:streamline_core_complete" "fsc_evm,tag:streamline_core_history" "fsc_evm,tag:streamline_core_complete_receipts_by_hash" "fsc_evm,tag:streamline_core_history_receipts_by_hash" "fsc_evm,tag:streamline_core_complete_confirm_blocks" "fsc_evm,tag:streamline_core_history_confirm_blocks" + + notify-failure: + needs: [run_dbt_jobs] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/dbt_test_daily.yml b/.github/workflows/dbt_test_daily.yml index c52ef57..d79b1e5 100644 --- a/.github/workflows/dbt_test_daily.yml +++ b/.github/workflows/dbt_test_daily.yml @@ -46,4 +46,11 @@ jobs: - name: Run Daily Tests run: | - dbt test -m "fsc_evm,tag:daily_test" \ No newline at end of file + dbt test -m "fsc_evm,tag:daily_test" + + notify-failure: + needs: [run_dbt_jobs] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/dbt_test_intraday.yml b/.github/workflows/dbt_test_intraday.yml index 9b261b7..e3d1a56 100644 --- a/.github/workflows/dbt_test_intraday.yml +++ b/.github/workflows/dbt_test_intraday.yml @@ -46,4 +46,11 @@ jobs: - name: Run Recent Tests run: | - dbt test -m "fsc_evm,tag:recent_test" \ No newline at end of file + dbt test -m "fsc_evm,tag:recent_test" + + notify-failure: + needs: [run_dbt_jobs] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/dbt_test_monthly.yml b/.github/workflows/dbt_test_monthly.yml index b32e830..2761cef 100644 --- a/.github/workflows/dbt_test_monthly.yml +++ b/.github/workflows/dbt_test_monthly.yml @@ -46,4 +46,11 @@ jobs: - name: Run Full Tests run: | - dbt test -m "fsc_evm,tag:full_test" \ No newline at end of file + dbt test -m "fsc_evm,tag:full_test" + + notify-failure: + needs: [run_dbt_jobs] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/.github/workflows/dbt_test_tasks.yml b/.github/workflows/dbt_test_tasks.yml index 8adb7f5..04e910c 100644 --- a/.github/workflows/dbt_test_tasks.yml +++ b/.github/workflows/dbt_test_tasks.yml @@ -24,4 +24,11 @@ concurrency: jobs: called_workflow_template: uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt_test_tasks.yml@AN-4374/upgrade-dbt-1.7 - secrets: inherit \ No newline at end of file + secrets: inherit + + notify-failure: + needs: [called_workflow_template] + if: failure() + uses: FlipsideCrypto/fsc-evm/.github/workflows/slack_notify.yml@main + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} \ No newline at end of file diff --git a/packages.yml b/packages.yml index 475342b..407fb51 100644 --- a/packages.yml +++ b/packages.yml @@ -1,3 +1,3 @@ packages: - git: https://github.com/FlipsideCrypto/fsc-evm.git - revision: v3.29.0 + revision: v3.30.0