From 094f472b95b73066df0be3a6519d997f8737e771 Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez Date: Mon, 24 Apr 2023 10:48:14 -0700 Subject: [PATCH 1/3] testing --- .buildkite/scripts/run_models.sh | 3 +- .../maintainer_pull_request_template.md | 51 +++++++++++++++++++ .github/pull_request_template.md | 51 ++++++------------- CHANGELOG.md | 6 +++ 4 files changed, 75 insertions(+), 36 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md diff --git a/.buildkite/scripts/run_models.sh b/.buildkite/scripts/run_models.sh index ea3de4b..ea68415 100644 --- a/.buildkite/scripts/run_models.sh +++ b/.buildkite/scripts/run_models.sh @@ -18,4 +18,5 @@ cd integration_tests dbt deps dbt seed --target "$db" --full-refresh dbt run --target "$db" --full-refresh -dbt test --target "$db" \ No newline at end of file +dbt test --target "$db" +dbt run-operation fivetran_utils.drop_schemas_automation --target "$db" diff --git a/.github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md b/.github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md new file mode 100644 index 0000000..768ac3f --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md @@ -0,0 +1,51 @@ +## PR Overview +**This PR will address the following Issue/Feature:** + +**This PR will result in the following new package version:** + + +**Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:** + +## PR Checklist +### Basic Validation +Please acknowledge that you have successfully performed the following commands locally: +- [ ] dbt compile +- [ ] dbt run –full-refresh +- [ ] dbt run +- [ ] dbt test +- [ ] dbt run –vars (if applicable) + +Before marking this PR as "ready for review" the following have been applied: +- [ ] The appropriate issue has been linked and tagged +- [ ] You are assigned to the corresponding issue and this PR +- [ ] BuildKite integration tests are passing + +### Detailed Validation +Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review": +- [ ] You have validated these changes and assure this PR will address the respective Issue/Feature. +- [ ] You are reasonably confident these changes will not impact any other components of this package or any dependent packages. +- [ ] You have provided details below around the validation steps performed to gain confidence in these changes. + + +### Standard Updates +Please acknowledge that your PR contains the following standard updates: +- Package versioning has been appropriately indexed in the following locations: + - [ ] indexed within dbt_project.yml + - [ ] indexed within integration_tests/dbt_project.yml +- [ ] CHANGELOG has individual entries for each respective change in this PR + +- [ ] README updates have been applied (if applicable) + +- [ ] DECISIONLOG updates have been updated (if applicable) +- [ ] Appropriate yml documentation has been added (if applicable) + +### dbt Docs +Please acknowledge that after the above were all completed the below were applied to your branch: +- [ ] docs were regenerated (unless this PR does not include any code or yml updates) + +### If you had to summarize this PR in an emoji, which would it be? + +:dancer: diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 50ee0df..b4e7e8e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,48 +1,24 @@ -**Are you a current Fivetran customer?** - +**Please provide your name and company** -**What change(s) does this PR introduce?** - +**Link the issue/feature request which this PR is meant to address** + -**Did you update the CHANGELOG?** +**Detail what changes this PR introduces and how this addresses the issue/feature request linked above.** + +**How did you validate the changes introduced within this PR?** + +**Which warehouse did you use to develop these changes?** + +**Did you update the CHANGELOG?** - [ ] Yes -**Does this PR introduce a breaking change?** - - -- [ ] Yes (please provide breaking change details below.) -- [ ] No (please provide an explanation as to how the change is non-breaking below.) - -**Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)** +**Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)** - [ ] Yes -**Is this PR in response to a previously created Bug or Feature Request** - - -- [ ] Yes, Issue/Feature [link bug/feature number here] -- [ ] No - -**How did you test the PR changes?** - - - -- [ ] Buildkite -- [ ] Local (please provide additional testing details below) - -**Select which warehouse(s) were used to test the PR** - - -- [ ] BigQuery -- [ ] Redshift -- [ ] Snowflake -- [ ] Postgres -- [ ] Databricks -- [ ] Other (provide details below) - **Provide an emoji that best describes your current mood** :dancer: @@ -50,3 +26,8 @@ **Feedback** We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your [feedback](https://www.surveymonkey.com/r/DQ7K7WW) on our existing dbt packages or what you'd like to see next. + +**PR Template** +- [Community Pull Request Template](?expand=1&template=pull_request_template.md) (default) + +- [Maintainer Pull Request Template](?expand=1&template=maintainer_pull_request_template.md) (to be used by maintainers) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bf3362..520e159 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# dbt_zuora_source v0.UPDATE.UPDATE + + ## Under the Hood: + +- Incorporated the new `fivetran_utils.drop_schemas_automation` macro into the end of each Buildkite integration test job. +- Updated the pull request [templates](/.github). # dbt_zuora_source v0.1.0 🎉 Initial Release 🎉 - This is the initial release of this package. From df93c53f82e1f688a9b818cbfae8ce82d31eb8f1 Mon Sep 17 00:00:00 2001 From: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com> Date: Wed, 26 Apr 2023 15:15:23 -0500 Subject: [PATCH 2/3] readme update note in changelog and version bump --- CHANGELOG.md | 7 ++++--- dbt_project.yml | 2 +- integration_tests/dbt_project.yml | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 520e159..4f23f62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ -# dbt_zuora_source v0.UPDATE.UPDATE - - ## Under the Hood: +# dbt_zuora_source v0.1.1 +## Documentation Update +- Removing the disclaimer in the README specifying that this package is under contruction. Following the v0.1.0 release, this package is no longer under construction and is ready for use in your dbt project! +## Under the Hood: - Incorporated the new `fivetran_utils.drop_schemas_automation` macro into the end of each Buildkite integration test job. - Updated the pull request [templates](/.github). diff --git a/dbt_project.yml b/dbt_project.yml index 0d6c7b4..56038c6 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,5 +1,5 @@ name: 'zuora_source' -version: '0.1.0' +version: '0.1.1' config-version: 2 require-dbt-version: [">=1.3.0", "<2.0.0"] diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 8c5b076..f3a1450 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,5 +1,5 @@ name: 'zuora_source_integration_tests' -version: '0.1.0' +version: '0.1.1' config-version: 2 profile: 'integration_tests' From a54d3f86d5ea4a53b2acafa43b9d464959bdd128 Mon Sep 17 00:00:00 2001 From: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com> Date: Thu, 27 Apr 2023 09:59:58 -0500 Subject: [PATCH 3/3] release/final-edits --- .buildkite/scripts/run_models.sh | 4 +++- CHANGELOG.md | 10 ++++++++++ .../tmp/stg_zuora__credit_balance_adjustment_tmp.sql | 2 ++ models/tmp/stg_zuora__refund_invoice_payment_tmp.sql | 2 ++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.buildkite/scripts/run_models.sh b/.buildkite/scripts/run_models.sh index ea3de4b..bfecf60 100644 --- a/.buildkite/scripts/run_models.sh +++ b/.buildkite/scripts/run_models.sh @@ -18,4 +18,6 @@ cd integration_tests dbt deps dbt seed --target "$db" --full-refresh dbt run --target "$db" --full-refresh -dbt test --target "$db" \ No newline at end of file +dbt test --target "$db" +dbt run --vars '{zuora__using_credit_balance_adjustment: false, zuora__using_taxation_item: false, zuora__using_refund: false, zuora__using_refund_invoice_payment: false}' --target "$db" +dbt test --target '{zuora__using_credit_balance_adjustment: false, zuora__using_taxation_item: false, zuora__using_refund: false, zuora__using_refund_invoice_payment: false}' --target "$db" \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bf3362..0b5c9e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# dbt_zuora_source v0.1.1 +## Bug Fixes +- Included model disable logic within the `stg_zuora__credit_balance_adjustment_tmp` and `stg_zuora__refund_invoice_payment_tmp` models in order to ensure they are not run if the appropriate variables are set to `false`. + +## Documentation Update +- Adjustment within the README to classify the package is no longer in development post v0.1.0 release. + +## Under the Hood +- Updated `run_models.sh` script that is utilized in the integration tests of this package to ensure rollouts are successful prior to release. + # dbt_zuora_source v0.1.0 🎉 Initial Release 🎉 - This is the initial release of this package. diff --git a/models/tmp/stg_zuora__credit_balance_adjustment_tmp.sql b/models/tmp/stg_zuora__credit_balance_adjustment_tmp.sql index f63a419..d44c106 100644 --- a/models/tmp/stg_zuora__credit_balance_adjustment_tmp.sql +++ b/models/tmp/stg_zuora__credit_balance_adjustment_tmp.sql @@ -1,2 +1,4 @@ +{{ config(enabled=var('zuora__using_credit_balance_adjustment', true)) }} + select * from {{ var('credit_balance_adjustment') }} diff --git a/models/tmp/stg_zuora__refund_invoice_payment_tmp.sql b/models/tmp/stg_zuora__refund_invoice_payment_tmp.sql index 9a5e449..a05cb6b 100644 --- a/models/tmp/stg_zuora__refund_invoice_payment_tmp.sql +++ b/models/tmp/stg_zuora__refund_invoice_payment_tmp.sql @@ -1,2 +1,4 @@ +{{ config(enabled=var('zuora__using_refund_invoice_payment', true)) }} + select * from {{ var('refund_invoice_payment') }}