From 106ebd43c4c5b64b606849ffd30080a40f88d569 Mon Sep 17 00:00:00 2001 From: Joel Labes Date: Sat, 4 Dec 2021 15:33:35 +1300 Subject: [PATCH 1/4] Breaking v1 changes --- .circleci/config.yml | 66 +++++++++--------- CHANGELOG.md | 10 +++ {analysis => analyses}/periscope/README.md | 0 .../periscope/dashboard.png | Bin .../periscope/deployments.sql | 0 {analysis => analyses}/periscope/models.sql | 0 .../periscope/models_out_of_sla.sql | 0 .../periscope/models_summary.sql | 0 dbt_project.yml | 10 +-- packages.yml | 2 +- 10 files changed, 49 insertions(+), 39 deletions(-) rename {analysis => analyses}/periscope/README.md (100%) rename {analysis => analyses}/periscope/dashboard.png (100%) rename {analysis => analyses}/periscope/deployments.sql (100%) rename {analysis => analyses}/periscope/models.sql (100%) rename {analysis => analyses}/periscope/models_out_of_sla.sql (100%) rename {analysis => analyses}/periscope/models_summary.sql (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml index b3597cf..9b6cb7a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -41,15 +41,15 @@ jobs: command: | . dbt_venv/bin/activate cd integration_tests - dbt deps --target postgres - dbt run-operation drop_audit_schema --target postgres - dbt run --target postgres --full-refresh - dbt run --target postgres + dbt --warn-error deps --target postgres + dbt --warn-error run-operation drop_audit_schema --target postgres + dbt --warn-error run --target postgres --full-refresh + dbt --warn-error run --target postgres - dbt run-operation drop_audit_schema --target postgres - dbt run-operation create_legacy_audit_table --target postgres - dbt run --target postgres --full-refresh - dbt run --target postgres + dbt --warn-error run-operation drop_audit_schema --target postgres + dbt --warn-error run-operation create_legacy_audit_table --target postgres + dbt --warn-error run --target postgres --full-refresh + dbt --warn-error run --target postgres - run: name: "Run Tests - Redshift" @@ -57,15 +57,15 @@ jobs: . dbt_venv/bin/activate echo `pwd` cd integration_tests - dbt deps --target redshift - dbt run-operation drop_audit_schema --target redshift - dbt run --target redshift --full-refresh - dbt run --target redshift + dbt --warn-error deps --target redshift + dbt --warn-error run-operation drop_audit_schema --target redshift + dbt --warn-error run --target redshift --full-refresh + dbt --warn-error run --target redshift - dbt run-operation drop_audit_schema --target redshift - dbt run-operation create_legacy_audit_table --target redshift - dbt run --target redshift --full-refresh - dbt run --target redshift + dbt --warn-error run-operation drop_audit_schema --target redshift + dbt --warn-error run-operation create_legacy_audit_table --target redshift + dbt --warn-error run --target redshift --full-refresh + dbt --warn-error run --target redshift - run: name: "Run Tests - Snowflake" @@ -73,15 +73,15 @@ jobs: . dbt_venv/bin/activate echo `pwd` cd integration_tests - dbt deps --target snowflake - dbt run-operation drop_audit_schema --target snowflake - dbt run --target snowflake --full-refresh - dbt run --target snowflake + dbt --warn-error deps --target snowflake + dbt --warn-error run-operation drop_audit_schema --target snowflake + dbt --warn-error run --target snowflake --full-refresh + dbt --warn-error run --target snowflake - dbt run-operation drop_audit_schema --target snowflake - dbt run-operation create_legacy_audit_table --target snowflake - dbt run --target snowflake --full-refresh - dbt run --target snowflake + dbt --warn-error run-operation drop_audit_schema --target snowflake + dbt --warn-error run-operation create_legacy_audit_table --target snowflake + dbt --warn-error run --target snowflake --full-refresh + dbt --warn-error run --target snowflake - run: name: "Run Tests - BigQuery" @@ -92,15 +92,15 @@ jobs: . dbt_venv/bin/activate echo `pwd` cd integration_tests - dbt deps --target bigquery - dbt run-operation drop_audit_schema --target bigquery - dbt run --target bigquery --full-refresh - dbt run --target bigquery - - dbt run-operation drop_audit_schema --target bigquery - dbt run-operation create_legacy_audit_table --target bigquery - dbt run --target bigquery --full-refresh - dbt run --target bigquery + dbt --warn-error deps --target bigquery + dbt --warn-error run-operation drop_audit_schema --target bigquery + dbt --warn-error run --target bigquery --full-refresh + dbt --warn-error run --target bigquery + + dbt --warn-error run-operation drop_audit_schema --target bigquery + dbt --warn-error run-operation create_legacy_audit_table --target bigquery + dbt --warn-error run --target bigquery --full-refresh + dbt --warn-error run --target bigquery - save_cache: key: deps1-{{ .Branch }} diff --git a/CHANGELOG.md b/CHANGELOG.md index ad53b1e..8d3f61b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,12 @@ +# dbt-event-logging v0.6.0 +This release supports any version (minor and patch) of v1, which means far less need for compatibility releases in the future. + +## Under the hood +- Change `require-dbt-version` to `[">=1.0.0", "<2.0.0"]` +- Bump dbt-utils dependency +- Replace `source-paths` and `data-paths` with `model-paths` and `seed-paths` respectively +- Rename `data` and `analysis` directories to `seeds` and `analyses` respectively +- Replace `dbt_modules` with `dbt_packages` in `clean-targets` + # dbt-event-logging v0.5.1 🚨 This is a compatibility release in preparation for `dbt-core` v1.0.0 (🎉). Projects using this version with `dbt-core` v1.0.x can expect to see a deprecation warning. This will be resolved in the next minor release. diff --git a/analysis/periscope/README.md b/analyses/periscope/README.md similarity index 100% rename from analysis/periscope/README.md rename to analyses/periscope/README.md diff --git a/analysis/periscope/dashboard.png b/analyses/periscope/dashboard.png similarity index 100% rename from analysis/periscope/dashboard.png rename to analyses/periscope/dashboard.png diff --git a/analysis/periscope/deployments.sql b/analyses/periscope/deployments.sql similarity index 100% rename from analysis/periscope/deployments.sql rename to analyses/periscope/deployments.sql diff --git a/analysis/periscope/models.sql b/analyses/periscope/models.sql similarity index 100% rename from analysis/periscope/models.sql rename to analyses/periscope/models.sql diff --git a/analysis/periscope/models_out_of_sla.sql b/analyses/periscope/models_out_of_sla.sql similarity index 100% rename from analysis/periscope/models_out_of_sla.sql rename to analyses/periscope/models_out_of_sla.sql diff --git a/analysis/periscope/models_summary.sql b/analyses/periscope/models_summary.sql similarity index 100% rename from analysis/periscope/models_summary.sql rename to analyses/periscope/models_summary.sql diff --git a/dbt_project.yml b/dbt_project.yml index 7e3d44f..6c654bf 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -2,18 +2,18 @@ name: 'logging' version: '0.5.0' config-version: 2 -require-dbt-version: [">=0.20.0", "<1.1.0"] +require-dbt-version: [">=1.0.0", "<2.0.0"] -source-paths: ["models"] -analysis-paths: ["analysis"] +model-paths: ["models"] +analysis-paths: ["analyses"] test-paths: ["tests"] -data-paths: ["data"] +seed-paths: ["seeds"] macro-paths: ["macros"] target-path: "target" clean-targets: - "target" - - "dbt_modules" + - "dbt_packages" on-run-start: diff --git a/packages.yml b/packages.yml index fd4cb32..83da812 100644 --- a/packages.yml +++ b/packages.yml @@ -1,3 +1,3 @@ packages: - package: dbt-labs/dbt_utils - version: [">=0.7.0", "<0.8.0"] + version: [">=0.8.0", "<0.9.0"] From 8d5d9b37bbc1d81704129ecbdb863d8a3aa01726 Mon Sep 17 00:00:00 2001 From: Joel Labes Date: Sat, 4 Dec 2021 15:36:37 +1300 Subject: [PATCH 2/4] install all adapters instead of just dbt --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9b6cb7a..91ef5c5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,7 +25,7 @@ jobs: . dbt_venv/bin/activate pip install --upgrade pip setuptools - pip install --pre dbt + pip install --pre dbt-core dbt-postgres dbt-redshift dbt-snowflake dbt-bigquery mkdir -p ~/.dbt cp integration_tests/ci/sample.profiles.yml ~/.dbt/profiles.yml From fb93f5fcff64682f2b5c4fbfd02b0f6ee8386f8d Mon Sep 17 00:00:00 2001 From: Joel Labes Date: Sat, 4 Dec 2021 15:40:11 +1300 Subject: [PATCH 3/4] disable cache --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 91ef5c5..b732732 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,8 +15,8 @@ jobs: command: | echo $BIGQUERY_SERVICE_ACCOUNT_JSON > ${HOME}/bigquery-service-key.json - - restore_cache: - key: deps1-{{ .Branch }} + # - restore_cache: + # key: deps1-{{ .Branch }} - run: name: "Setup dbt" @@ -102,7 +102,7 @@ jobs: dbt --warn-error run --target bigquery --full-refresh dbt --warn-error run --target bigquery - - save_cache: - key: deps1-{{ .Branch }} - paths: - - "dbt_venv" + # - save_cache: + # key: deps1-{{ .Branch }} + # paths: + # - "dbt_venv" From 97aae67e76d90b77161df92dbfe435e98d083c52 Mon Sep 17 00:00:00 2001 From: Joel Labes Date: Sat, 4 Dec 2021 15:46:38 +1300 Subject: [PATCH 4/4] Re-enable cache once run succeeded --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b732732..91ef5c5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,8 +15,8 @@ jobs: command: | echo $BIGQUERY_SERVICE_ACCOUNT_JSON > ${HOME}/bigquery-service-key.json - # - restore_cache: - # key: deps1-{{ .Branch }} + - restore_cache: + key: deps1-{{ .Branch }} - run: name: "Setup dbt" @@ -102,7 +102,7 @@ jobs: dbt --warn-error run --target bigquery --full-refresh dbt --warn-error run --target bigquery - # - save_cache: - # key: deps1-{{ .Branch }} - # paths: - # - "dbt_venv" + - save_cache: + key: deps1-{{ .Branch }} + paths: + - "dbt_venv"