From 8bab4c47e47a131817e46be00f7b15ad9e358d14 Mon Sep 17 00:00:00 2001 From: Joel Labes Date: Sat, 4 Dec 2021 16:16:01 +1300 Subject: [PATCH] Breaking v1 change --- .circleci/config.yml | 42 +++++++++---------- CHANGELOG.md | 11 +++++ dbt_project.yml | 10 ++--- integration_tests/dbt_project.yml | 8 ++-- .../{data => seeds}/event/sp_event.csv | 0 .../{data => seeds}/event/sp_event_update.csv | 0 .../expected/snowplow_page_views_expected.csv | 0 .../expected/snowplow_sessions_expected.csv | 0 .../{data => seeds}/web_page/sp_web_page.csv | 0 .../web_page/sp_web_page_update.csv | 0 packages.yml | 2 +- {data => seeds}/country_codes.csv | 0 {data => seeds}/snowplow_seeds.yml | 0 13 files changed, 42 insertions(+), 31 deletions(-) rename integration_tests/{data => seeds}/event/sp_event.csv (100%) rename integration_tests/{data => seeds}/event/sp_event_update.csv (100%) rename integration_tests/{data => seeds}/expected/snowplow_page_views_expected.csv (100%) rename integration_tests/{data => seeds}/expected/snowplow_sessions_expected.csv (100%) rename integration_tests/{data => seeds}/web_page/sp_web_page.csv (100%) rename integration_tests/{data => seeds}/web_page/sp_web_page_update.csv (100%) rename {data => seeds}/country_codes.csv (100%) rename {data => seeds}/snowplow_seeds.yml (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml index d238ea9..89495ec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,7 +24,7 @@ jobs: python3 -m venv dbt_venv . 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 @@ -39,11 +39,11 @@ jobs: command: | . dbt_venv/bin/activate cd integration_tests - dbt deps --target postgres - dbt seed --target postgres --full-refresh - dbt run --target postgres --full-refresh --vars 'update: false' - dbt run --target postgres --vars 'update: true' - dbt test --target postgres + dbt --warn-error deps --target postgres + dbt --warn-error seed --target postgres --full-refresh + dbt --warn-error run --target postgres --full-refresh --vars 'update: false' + dbt --warn-error run --target postgres --vars 'update: true' + dbt --warn-error test --target postgres - run: name: "Run Tests - Redshift" @@ -51,11 +51,11 @@ jobs: . dbt_venv/bin/activate echo `pwd` cd integration_tests - dbt deps --target redshift - dbt seed --target redshift --full-refresh - dbt run --target redshift --full-refresh --vars 'update: false' - dbt run --target redshift --vars 'update: true' - dbt test --target redshift + dbt --warn-error deps --target redshift + dbt --warn-error seed --target redshift --full-refresh + dbt --warn-error run --target redshift --full-refresh --vars 'update: false' + dbt --warn-error run --target redshift --vars 'update: true' + dbt --warn-error test --target redshift - run: name: "Run Tests - Snowflake" @@ -63,11 +63,11 @@ jobs: . dbt_venv/bin/activate echo `pwd` cd integration_tests - dbt deps --target snowflake - dbt seed --target snowflake --full-refresh - dbt run --target snowflake --full-refresh --vars 'update: false' - dbt run --target snowflake --vars 'update: true' - dbt test --target snowflake + dbt --warn-error deps --target snowflake + dbt --warn-error seed --target snowflake --full-refresh + dbt --warn-error run --target snowflake --full-refresh --vars 'update: false' + dbt --warn-error run --target snowflake --vars 'update: true' + dbt --warn-error test --target snowflake - run: name: "Run Tests - BigQuery" @@ -78,11 +78,11 @@ jobs: . dbt_venv/bin/activate echo `pwd` cd integration_tests - dbt deps --target bigquery - dbt seed --target bigquery --full-refresh - dbt run --target bigquery --full-refresh --vars 'update: false' - dbt run --target bigquery --vars 'update: true' - dbt test --target bigquery + dbt --warn-error deps --target bigquery + dbt --warn-error seed --target bigquery --full-refresh + dbt --warn-error run --target bigquery --full-refresh --vars 'update: false' + dbt --warn-error run --target bigquery --vars 'update: true' + dbt --warn-error test --target bigquery - save_cache: key: deps1-{{ .Branch }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 3076ecf..918de25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,13 @@ +# snowplow 0.14.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` + # snowplow v0.13.3 🚨 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. \ No newline at end of file diff --git a/dbt_project.yml b/dbt_project.yml index 90fc7cd..3d52a81 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -4,15 +4,15 @@ name: 'snowplow' version: '0.13.0' config-version: 2 -source-paths: ["models"] +model-paths: ["models"] target-path: "target" -clean-targets: ["target"] +clean-targets: ["target", "dbt_packages"] test-paths: ["test"] -analysis-paths: ["analysis"] -data-paths: ["data"] +analysis-paths: ["analyses"] +seed-paths: ["seeds"] macro-paths: ["macros"] -require-dbt-version: [">=0.20.0", "<1.1.0"] +require-dbt-version: [">=1.0.0", "<2.0.0"] vars: #'snowplow:events': TABLE OR {{ REF() }} diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 005da92..a86e34f 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -5,16 +5,16 @@ config-version: 2 profile: 'integration_tests' -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" quoting: identifier: false diff --git a/integration_tests/data/event/sp_event.csv b/integration_tests/seeds/event/sp_event.csv similarity index 100% rename from integration_tests/data/event/sp_event.csv rename to integration_tests/seeds/event/sp_event.csv diff --git a/integration_tests/data/event/sp_event_update.csv b/integration_tests/seeds/event/sp_event_update.csv similarity index 100% rename from integration_tests/data/event/sp_event_update.csv rename to integration_tests/seeds/event/sp_event_update.csv diff --git a/integration_tests/data/expected/snowplow_page_views_expected.csv b/integration_tests/seeds/expected/snowplow_page_views_expected.csv similarity index 100% rename from integration_tests/data/expected/snowplow_page_views_expected.csv rename to integration_tests/seeds/expected/snowplow_page_views_expected.csv diff --git a/integration_tests/data/expected/snowplow_sessions_expected.csv b/integration_tests/seeds/expected/snowplow_sessions_expected.csv similarity index 100% rename from integration_tests/data/expected/snowplow_sessions_expected.csv rename to integration_tests/seeds/expected/snowplow_sessions_expected.csv diff --git a/integration_tests/data/web_page/sp_web_page.csv b/integration_tests/seeds/web_page/sp_web_page.csv similarity index 100% rename from integration_tests/data/web_page/sp_web_page.csv rename to integration_tests/seeds/web_page/sp_web_page.csv diff --git a/integration_tests/data/web_page/sp_web_page_update.csv b/integration_tests/seeds/web_page/sp_web_page_update.csv similarity index 100% rename from integration_tests/data/web_page/sp_web_page_update.csv rename to integration_tests/seeds/web_page/sp_web_page_update.csv diff --git a/packages.yml b/packages.yml index 5302a1f..538aeec 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"] diff --git a/data/country_codes.csv b/seeds/country_codes.csv similarity index 100% rename from data/country_codes.csv rename to seeds/country_codes.csv diff --git a/data/snowplow_seeds.yml b/seeds/snowplow_seeds.yml similarity index 100% rename from data/snowplow_seeds.yml rename to seeds/snowplow_seeds.yml