From dac65daaf5f64f7e2ea17959a7af27aa98fc6e1f Mon Sep 17 00:00:00 2001 From: drethereum Date: Mon, 11 Nov 2024 15:01:40 -0700 Subject: [PATCH] decoder workflows --- .../dbt_run_scheduled_decoded_logs.yml | 45 +++++++++++++++++ ...heduled_decoded_logs_history_user_abis.yml | 45 +++++++++++++++++ ...bt_run_streamline_decoded_logs_history.yml | 49 +++++++++++++++++++ data/github_actions__workflows.csv | 7 +++ 4 files changed, 146 insertions(+) create mode 100644 .github/workflows/dbt_run_scheduled_decoded_logs.yml create mode 100644 .github/workflows/dbt_run_scheduled_decoded_logs_history_user_abis.yml create mode 100644 .github/workflows/dbt_run_streamline_decoded_logs_history.yml diff --git a/.github/workflows/dbt_run_scheduled_decoded_logs.yml b/.github/workflows/dbt_run_scheduled_decoded_logs.yml new file mode 100644 index 0000000..9b5c274 --- /dev/null +++ b/.github/workflows/dbt_run_scheduled_decoded_logs.yml @@ -0,0 +1,45 @@ +name: dbt_run_scheduled_decoded_logs +run-name: dbt_run_scheduled_decoded_logs + +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: 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 diff --git a/.github/workflows/dbt_run_scheduled_decoded_logs_history_user_abis.yml b/.github/workflows/dbt_run_scheduled_decoded_logs_history_user_abis.yml new file mode 100644 index 0000000..7576bb6 --- /dev/null +++ b/.github/workflows/dbt_run_scheduled_decoded_logs_history_user_abis.yml @@ -0,0 +1,45 @@ +name: dbt_run_scheduled_decoded_logs_history_user_abis +run-name: dbt_run_scheduled_decoded_logs_history_user_abis + +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: Kick off decoded logs history, if there are new ABIs from users + run: | + dbt run-operation fsc_evm.run_decoded_logs_history \ 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 new file mode 100644 index 0000000..baec4d0 --- /dev/null +++ b/.github/workflows/dbt_run_streamline_decoded_logs_history.yml @@ -0,0 +1,49 @@ +name: dbt_run_streamline_decoded_logs_history +run-name: dbt_run_streamline_decoded_logs_history + +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: Update complete table + run: | + dbt run -m "fsc_evm,tag:streamline_decoded_logs_complete" + + - name: Decode historical logs + run: | + dbt run-operation fsc_evm.decoded_logs_history --vars '{"STREAMLINE_INVOKE_STREAMS":True}' \ No newline at end of file diff --git a/data/github_actions__workflows.csv b/data/github_actions__workflows.csv index 2940a92..089cbfc 100644 --- a/data/github_actions__workflows.csv +++ b/data/github_actions__workflows.csv @@ -2,3 +2,10 @@ workflow_name,workflow_schedule dbt_run_streamline_chainhead,"24,54 * * * *" dbt_run_scheduled_main,"2,32 * * * *" dbt_run_streamline_history,"12 * * * *" +dbt_run_scheduled_decoded_logs,"9,39 * * * *" +dbt_test_intraday,"40 */4 * * *" +dbt_test_daily,"23 8 * * *" +dbt_test_monthly,"6 7 28 * *" +dbt_run_scheduled_abis,"12 */12 * * *" +dbt_run_streamline_decoded_logs_history,"6 22 * * 6" +dbt_run_scheduled_decoded_logs_history_user_abis,"39 23 * * *"