From 010bfd74a9a32aeefbd5f9306b2c609c4545befb Mon Sep 17 00:00:00 2001 From: shah Date: Wed, 23 Oct 2024 21:47:12 -0700 Subject: [PATCH 1/6] Debug vars --- .github/workflows/dbt_integration_test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/dbt_integration_test.yml b/.github/workflows/dbt_integration_test.yml index 1646d61..505aae1 100644 --- a/.github/workflows/dbt_integration_test.yml +++ b/.github/workflows/dbt_integration_test.yml @@ -7,8 +7,16 @@ on: concurrency: ${{ github.workflow }} jobs: + debug_vars: + runs-on: ubuntu-latest + environment: ${{ github.ref == 'refs/heads/main' && 'workflow_prod' || 'workflow_dev' }} + steps: + - name: Debug warehouse variable + run: echo "Warehouse value is '${{ vars.WAREHOUSE }}'" + called_workflow_template: uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt.yml@main + with: command: > dbt test --selector 'integration_tests' From 684114ed971cc343f172c5bf18ac27528244cbca Mon Sep 17 00:00:00 2001 From: shah Date: Wed, 23 Oct 2024 22:17:58 -0700 Subject: [PATCH 2/6] Debug env --- .github/workflows/dbt_integration_test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/dbt_integration_test.yml b/.github/workflows/dbt_integration_test.yml index 505aae1..690ca9b 100644 --- a/.github/workflows/dbt_integration_test.yml +++ b/.github/workflows/dbt_integration_test.yml @@ -6,6 +6,10 @@ on: concurrency: ${{ github.workflow }} +env: + WAREHOUSE: "${{ vars.WAREHOUSE }}" + + jobs: debug_vars: runs-on: ubuntu-latest From f662d0c2de98d83d4a1c0dd68a96d9feaa3ca5e2 Mon Sep 17 00:00:00 2001 From: shah Date: Wed, 23 Oct 2024 22:20:36 -0700 Subject: [PATCH 3/6] string quote vars.WAREHOUSE --- .github/workflows/dbt_integration_test.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/dbt_integration_test.yml b/.github/workflows/dbt_integration_test.yml index 690ca9b..2dba393 100644 --- a/.github/workflows/dbt_integration_test.yml +++ b/.github/workflows/dbt_integration_test.yml @@ -6,18 +6,7 @@ on: concurrency: ${{ github.workflow }} -env: - WAREHOUSE: "${{ vars.WAREHOUSE }}" - - jobs: - debug_vars: - runs-on: ubuntu-latest - environment: ${{ github.ref == 'refs/heads/main' && 'workflow_prod' || 'workflow_dev' }} - steps: - - name: Debug warehouse variable - run: echo "Warehouse value is '${{ vars.WAREHOUSE }}'" - called_workflow_template: uses: FlipsideCrypto/analytics-workflow-templates/.github/workflows/dbt.yml@main @@ -25,5 +14,5 @@ jobs: command: > dbt test --selector 'integration_tests' environment: ${{ github.ref == 'refs/heads/main' && 'workflow_prod' || 'workflow_dev' }} - warehouse: ${{ vars.WAREHOUSE }} + warehouse: "${{ vars.WAREHOUSE }}" secrets: inherit \ No newline at end of file From 1fded4fba65b640823615fd42b2752264852a942 Mon Sep 17 00:00:00 2001 From: shah Date: Wed, 23 Oct 2024 22:36:56 -0700 Subject: [PATCH 4/6] remove warehouse --- .github/workflows/dbt_integration_test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/dbt_integration_test.yml b/.github/workflows/dbt_integration_test.yml index 2dba393..ad90d32 100644 --- a/.github/workflows/dbt_integration_test.yml +++ b/.github/workflows/dbt_integration_test.yml @@ -14,5 +14,4 @@ jobs: command: > 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 From 3ffec930a065646b7088c1b872a7ab64277dba08 Mon Sep 17 00:00:00 2001 From: shah Date: Wed, 23 Oct 2024 22:41:01 -0700 Subject: [PATCH 5/6] single quote vars.WAREHOUSE --- .github/workflows/dbt_integration_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dbt_integration_test.yml b/.github/workflows/dbt_integration_test.yml index ad90d32..408d864 100644 --- a/.github/workflows/dbt_integration_test.yml +++ b/.github/workflows/dbt_integration_test.yml @@ -14,4 +14,5 @@ jobs: command: > 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 From 3c478d05ff795c2aa12a6fb3fa61881bb5b58804 Mon Sep 17 00:00:00 2001 From: shah Date: Wed, 23 Oct 2024 22:44:21 -0700 Subject: [PATCH 6/6] default vars.WAREHOUSE --- .github/workflows/dbt_integration_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dbt_integration_test.yml b/.github/workflows/dbt_integration_test.yml index 408d864..3825755 100644 --- a/.github/workflows/dbt_integration_test.yml +++ b/.github/workflows/dbt_integration_test.yml @@ -14,5 +14,5 @@ jobs: command: > dbt test --selector 'integration_tests' environment: ${{ github.ref == 'refs/heads/main' && 'workflow_prod' || 'workflow_dev' }} - warehouse: '${{ vars.WAREHOUSE }}' + warehouse: ${{ vars.WAREHOUSE != '' && vars.WAREHOUSE || 'DBT_CLOUD' }} secrets: inherit \ No newline at end of file