From 17f53d82dc667c0d99a9970d783d8b38d56b993b Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Wed, 13 Dec 2023 11:32:11 +0100 Subject: [PATCH] chore: Fix cost validate release, exclude seeds from zip (#431) --- .github/workflows/validate_transformation_release.yml | 1 + scripts/dbt-pack/src/index.js | 3 +++ transformations/aws/cost/dbt_project.yml | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate_transformation_release.yml b/.github/workflows/validate_transformation_release.yml index e5899e5cc..95bed93cd 100644 --- a/.github/workflows/validate_transformation_release.yml +++ b/.github/workflows/validate_transformation_release.yml @@ -127,6 +127,7 @@ jobs: run: | mkdir -p temp/build unzip -o ${{ needs.prepare.outputs.zipPath }} -d temp/build + cp -r ${{ needs.prepare.outputs.transformation_dir }}/seeds/ temp/build - name: Run Unpacked DBT Postgres if: needs.prepare.outputs.postgres == 'true' working-directory: ./temp/build diff --git a/scripts/dbt-pack/src/index.js b/scripts/dbt-pack/src/index.js index 7798d79fd..745ecacec 100644 --- a/scripts/dbt-pack/src/index.js +++ b/scripts/dbt-pack/src/index.js @@ -70,6 +70,9 @@ const addDependencies = (node, allNodes, allMacros, filesToPack) => { // Skip dbt internal macros return; } + if (node.resource_type !== "model" && node.resource_type !== "macro") { + return; + } filesToPack.add(node.original_file_path); const dependsOnNodes = node.depends_on?.nodes ?? []; for (const dependency of dependsOnNodes) { diff --git a/transformations/aws/cost/dbt_project.yml b/transformations/aws/cost/dbt_project.yml index 887e44e1c..b16f84a6d 100644 --- a/transformations/aws/cost/dbt_project.yml +++ b/transformations/aws/cost/dbt_project.yml @@ -12,7 +12,7 @@ profile: 'aws_cost' # These configurations specify where dbt should look for different types of files. # The `model-paths` config, for example, states that models in this project can be # found in the "models/" directory. You probably won't need to change these! -model-paths: ["models", "../models"] +model-paths: ["models"] analysis-paths: ["analyses"] test-paths: ["tests"] seed-paths: ["seeds"]