From ba7b99e23eac325a0546a8a57612c3ad7259cdfd Mon Sep 17 00:00:00 2001 From: Austin Date: Tue, 8 Oct 2024 15:53:24 -0400 Subject: [PATCH] new commands and job --- .github/workflows/dbt_run_scheduled_core.yml | 44 ++++++++++++++++++++ data/github_actions__workflows.csv | 3 +- makefile | 15 +++++-- package-lock.yml | 2 +- 4 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/dbt_run_scheduled_core.yml diff --git a/.github/workflows/dbt_run_scheduled_core.yml b/.github/workflows/dbt_run_scheduled_core.yml new file mode 100644 index 0000000..946dc29 --- /dev/null +++ b/.github/workflows/dbt_run_scheduled_core.yml @@ -0,0 +1,44 @@ +name: dbt_run_scheduled_core +run-name: dbt_run_scheduled_core + +on: + workflow_dispatch: + branches: + - "main" + +env: + DBT_PROFILES_DIR: ./ + + ACCOUNT: "${{ vars.ACCOUNT }}" + ROLE: "${{ vars.ROLE }}" + USER: "${{ vars.USER }}" + PASSWORD: "${{ secrets.PASSWORD }}" + REGION: "${{ vars.REGION }}" + DATABASE: "${{ vars.DATABASE }}" + WAREHOUSE: "${{ vars.WAREHOUSE }}" + SCHEMA: "${{ vars.SCHEMA }}" + +concurrency: + group: ${{ github.workflow }} + +jobs: + run_dbt_jobs: + 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: | + dbt run -m "fsc_evm,tag:core" diff --git a/data/github_actions__workflows.csv b/data/github_actions__workflows.csv index bd7c35e..ac4a5db 100644 --- a/data/github_actions__workflows.csv +++ b/data/github_actions__workflows.csv @@ -1,2 +1,3 @@ workflow_name,workflow_schedule -dbt_run_streamline_chainhead,"23,53 * * * *" \ No newline at end of file +dbt_run_streamline_chainhead,"23,53 * * * *" +dbt_run_scheduled_core,"1,31 * * * *" \ No newline at end of file diff --git a/makefile b/makefile index d9bbb50..a3b4500 100644 --- a/makefile +++ b/makefile @@ -31,7 +31,16 @@ else dbt run-operation fsc_utils.create_gha_tasks --vars '{"START_GHA_TASKS":True}' -t $(DBT_TARGET) endif -run_regular_incremental: - dbt run -m "fsc_evm,tag:silver" "fsc_evm,tag:gold" -t $(DBT_TARGET) +deploy_new_github_action: + dbt seed -s github_actions__workflows -t $(DBT_TARGET) + dbt run -m "fsc_evm,tag:gha_tasks" --full-refresh -t $(DBT_TARGET) +ifeq ($(findstring dev,$(DBT_TARGET)),dev) + dbt run-operation fsc_utils.create_gha_tasks --vars '{"START_GHA_TASKS":False}' -t $(DBT_TARGET) +else + dbt run-operation fsc_utils.create_gha_tasks --vars '{"START_GHA_TASKS":True}' -t $(DBT_TARGET) +endif -.PHONY: deploy_streamline_functions deploy_streamline_tables deploy_streamline_requests deploy_github_actions cleanup_time run_regular_incremental \ No newline at end of file +regular_incremental: + dbt run -m "fsc_evm,tag:core" -t $(DBT_TARGET) + +.PHONY: deploy_streamline_functions deploy_streamline_tables deploy_streamline_requests deploy_github_actions cleanup_time regular_incremental deploy_new_github_action \ No newline at end of file diff --git a/package-lock.yml b/package-lock.yml index e035942..72600e9 100644 --- a/package-lock.yml +++ b/package-lock.yml @@ -10,7 +10,7 @@ packages: - package: get-select/dbt_snowflake_query_tags version: 2.5.0 - git: https://github.com/FlipsideCrypto/fsc-evm.git - revision: f6b48bfd29974280aea07f059105048a6bd9c2cb + revision: 5a0937104a665799d1bd011405b58ebb20be0719 - package: calogica/dbt_date version: 0.7.2 - git: https://github.com/FlipsideCrypto/livequery-models.git