Skip to content

Commit 301e706

Browse files
fivetran-joemarkiewiczfivetran-avinashfivetran-jamie
authored
Feature/freshness updates (#140)
* Pre-release for fixing cast value issues * PR review * Update casting to string for sprint ids * Update casting to string for sprint ids * feature/freshness-updates * pr fixes * Update packages.yml Co-authored-by: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> --------- Co-authored-by: Avinash Kunnath <avinash.kunnath@fivetran.com> Co-authored-by: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com>
1 parent 14923fd commit 301e706

16 files changed

Lines changed: 107 additions & 48 deletions

.buildkite/pipeline.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ steps:
33
key: "run-dbt-postgres"
44
plugins:
55
- docker#v3.13.0:
6-
image: "python:3.8"
6+
image: "python:3.10.13"
77
shell: [ "/bin/bash", "-e", "-c" ]
88
environment:
99
- "BASH_ENV=/tmp/.bashrc"
@@ -18,7 +18,7 @@ steps:
1818
key: "run_dbt_snowflake"
1919
plugins:
2020
- docker#v3.13.0:
21-
image: "python:3.8"
21+
image: "python:3.10.13"
2222
shell: [ "/bin/bash", "-e", "-c" ]
2323
environment:
2424
- "BASH_ENV=/tmp/.bashrc"
@@ -35,7 +35,7 @@ steps:
3535
key: "run_dbt_bigquery"
3636
plugins:
3737
- docker#v3.13.0:
38-
image: "python:3.8"
38+
image: "python:3.10.13"
3939
shell: [ "/bin/bash", "-e", "-c" ]
4040
environment:
4141
- "BASH_ENV=/tmp/.bashrc"
@@ -47,7 +47,7 @@ steps:
4747
key: "run_dbt_redshift"
4848
plugins:
4949
- docker#v3.13.0:
50-
image: "python:3.8"
50+
image: "python:3.10.13"
5151
shell: [ "/bin/bash", "-e", "-c" ]
5252
environment:
5353
- "BASH_ENV=/tmp/.bashrc"
@@ -62,7 +62,7 @@ steps:
6262
key: "run_dbt_databricks"
6363
plugins:
6464
- docker#v3.13.0:
65-
image: "python:3.8"
65+
image: "python:3.10.13"
6666
shell: [ "/bin/bash", "-e", "-c" ]
6767
environment:
6868
- "BASH_ENV=/tmp/.bashrc"
@@ -77,7 +77,7 @@ steps:
7777
key: "run_dbt_databricks_sql"
7878
plugins:
7979
- docker#v3.13.0:
80-
image: "python:3.8"
80+
image: "python:3.10.13"
8181
shell: [ "/bin/bash", "-e", "-c" ]
8282
environment:
8383
- "BASH_ENV=/tmp/.bashrc"

.buildkite/scripts/run_models.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ dbt deps
1919

2020
if [ "$db" = "databricks-sql" ]; then
2121
dbt seed --vars '{jira_schema: jira_integrations_tests_sqlw}' --target "$db" --full-refresh
22+
dbt source freshness --vars '{jira_schema: jira_integrations_tests_sqlw}' --target "$db" || echo "...Only verifying freshness runs…"
2223
dbt compile --vars '{jira_schema: jira_integrations_tests_sqlw}' --target "$db"
2324
dbt run --vars '{jira_schema: jira_integrations_tests_sqlw}' --target "$db" --full-refresh
2425
dbt run --vars '{jira_schema: jira_integrations_tests_sqlw}' --target "$db"
@@ -29,6 +30,7 @@ dbt test --vars '{jira_schema: jira_integrations_tests_sqlw}' --target "$db"
2930

3031
else
3132
dbt seed --target "$db" --full-refresh
33+
dbt source freshness --target "$db" || echo "...Only verifying freshness runs…"
3234
dbt compile --target "$db"
3335
dbt run --target "$db" --full-refresh
3436
dbt run --target "$db"
Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
1-
## PR Overview
2-
**This PR will address the following Issue/Feature:**
1+
<!--
2+
Pre-Submission Reminders
3+
Before marking this PR as "ready for review":
34
4-
**This PR will result in the following new package version:**
5-
<!--- Please add details around your decision for breaking vs non-breaking version upgrade. If this is a breaking change, were backwards-compatible options explored? -->
5+
- `dbt run --full-refresh && dbt test`
6+
- `dbt run` && `dbt test` (if incremental models are present)
7+
- The related issue is linked, tagged, and appropriately assigned
8+
- Documentation and version updates are included, if applicable
9+
- `docs` have been regenerated (unless there are no code or YAML changes)
10+
- BuildKite integration tests are passing
11+
-->
612

7-
**Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:**
8-
<!--- Copy/paste the CHANGELOG for this version below. -->
13+
## PR Overview
14+
**Package version introduced in this PR:**
15+
16+
**This PR addresses the following Issue/Feature(s):**
17+
<!-- Add Issue # or internal ticket reference -->
918

10-
## PR Checklist
11-
### Basic Validation
12-
Please acknowledge that you have successfully performed the following commands locally:
13-
- [ ] dbt run –full-refresh && dbt test
14-
- [ ] dbt run (if incremental models are present) && dbt test
19+
**Summary of changes:**
20+
<!-- 1-2 sentences describing PR changes. -->
1521

16-
Before marking this PR as "ready for review" the following have been applied:
17-
- [ ] The appropriate issue has been linked, tagged, and properly assigned
18-
- [ ] All necessary documentation and version upgrades have been applied
19-
- [ ] docs were regenerated (unless this PR does not include any code or yml updates)
20-
- [ ] BuildKite integration tests are passing
21-
- [ ] Detailed validation steps have been provided below
2222

23-
### Detailed Validation
24-
Please share any and all of your validation steps:
25-
<!--- Provide the steps you took to validate your changes below. -->
23+
### Submission Checklist
24+
- [ ] Alignment meeting with the reviewer (if needed)
25+
- [ ] Timeline and validation requirements discussed
26+
- [ ] Provide validation details:
27+
- [ ] **Validation Steps:** Check for unintentional effects (e.g., add/run consistency & integrity tests)
28+
- [ ] **Testing Instructions:** Confirm the change addresses the issue(s)
29+
- [ ] **Focus Areas:** Complex logic or queries that need extra attention
2630

27-
### If you had to summarize this PR in an emoji, which would it be?
28-
<!--- For a complete list of markdown compatible emojis check our this git repo (https://gist.github.com/rxaviers/7360908) -->
29-
:dancer:
31+
### Changelog
32+
<!-- Recommend drafting changelog notes, then refining via ChatGPT using:
33+
"Draft a changelog entry based on the following notes." -->
34+
- [ ] Draft changelog for PR
35+
- [ ] Final changelog for release review

CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,54 @@
1+
# dbt_jira v0.21.0
2+
3+
[PR #140](https://github.com/fivetran/dbt_jira/pull/140) includes the following updates:
4+
5+
## Breaking Change for dbt Core < 1.9.6
6+
7+
> *Note: This is not relevant to Fivetran Quickstart users.*
8+
9+
Migrated `freshness` from a top-level source property to a source `config` in alignment with [recent updates](https://github.com/dbt-labs/dbt-core/issues/11506) from dbt Core ([Jira Source v0.9.0](https://github.com/fivetran/dbt_jira_source/releases/tag/v0.9.0)). This will resolve the following deprecation warning that users running dbt >= 1.9.6 may have received:
10+
11+
```
12+
[WARNING]: Deprecated functionality
13+
Found `freshness` as a top-level property of `jira` in file
14+
`models/src_jira.yml`. The `freshness` top-level property should be moved
15+
into the `config` of `jira`.
16+
```
17+
18+
**IMPORTANT:** Users running dbt Core < 1.9.6 will not be able to utilize freshness tests in this release or any subsequent releases, as older versions of dbt will not recognize freshness as a source `config` and therefore not run the tests.
19+
20+
If you are using dbt Core < 1.9.6 and want to continue running Jira freshness tests, please elect **one** of the following options:
21+
1. (Recommended) Upgrade to dbt Core >= 1.9.6
22+
2. Do not upgrade your installed version of the `jira` package. Pin your dependency on v0.20.0 in your `packages.yml` file.
23+
3. Utilize a dbt [override](https://docs.getdbt.com/reference/resource-properties/overrides) to overwrite the package's `jira` source and apply freshness via the previous release top-level property route. This will require you to copy and paste the entirety of the previous release `src_jira.yml` file and add an `overrides: jira_source` property.
24+
25+
## Bug Fix
26+
- Changed casting of `sprint_id` to a string rather than an integer in `jira__daily_sprint_issue_history` to resolve casting errors.
27+
28+
## Under the Hood
29+
- Updates to ensure integration tests use latest version of dbt.
30+
31+
# dbt_jira v0.20.1-a2
32+
The latest version of [PR #138](https://github.com/fivetran/dbt_jira/pull/138) contains the following updates:
33+
34+
## Bug Fix
35+
- Changed casting of `sprint_id` to a string rather than an integer in `jira__daily_sprint_issue_history` to resolve casting errors.
36+
37+
## Under the Hood
38+
- Updated the package maintainer pull request template.
39+
- Updated `consistency_issue_enhanced` test to exclude columns that depend on calculations involving the current timestamp to remove failures.
40+
- Updated the sprint integrity tests to handle the new `sprint_id` casting.
41+
42+
# dbt_jira v0.20.1-a1
43+
[PR #138](https://github.com/fivetran/dbt_jira/pull/138) contains the following updates:
44+
45+
## Bug Fix
46+
- Moved casting of integer of `sprint_id` in `jira__daily_sprint_issue_history` into a later CTE to avoid casting errors where `field_value` is a string.
47+
48+
## Under the Hood
49+
- Updated the package maintainer pull request template.
50+
- Updated `consistency_issue_enhanced` test to exclude columns that depend on calculations involving the current timestamp to remove failures.
51+
152
# dbt_jira v0.20.0
253
This release includes the following updates.
354

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Include the following jira package version in your `packages.yml` file:
7272
```yaml
7373
packages:
7474
- package: fivetran/jira
75-
version: [">=0.20.0", "<0.21.0"]
75+
version: [">=0.21.0", "<0.22.0"]
7676
7777
```
7878
### Step 3: Define database and schema variables
@@ -188,7 +188,7 @@ This dbt package is dependent on the following dbt packages. These dependencies
188188
```yml
189189
packages:
190190
- package: fivetran/jira_source
191-
version: [">=0.8.0", "<0.9.0"]
191+
version: [">=0.9.0", "<0.10.0"]
192192
193193
- package: fivetran/fivetran_utils
194194
version: [">=0.4.0", "<0.5.0"]

dbt_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'jira'
2-
version: '0.20.0'
2+
version: '0.21.0'
33
config-version: 2
44
require-dbt-version: [">=1.3.0", "<2.0.0"]
55
vars:

docs/catalog.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/manifest.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

integration_tests/ci/sample.profiles.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
# HEY! This file is used in the dbt package integrations tests with Buildkite.
33
# You should __NEVER__ check credentials into version control. Thanks for reading :)
44

5-
config:
6-
send_anonymous_usage_stats: False
7-
use_colors: True
8-
95
integration_tests:
106
target: redshift
117
outputs:

integration_tests/dbt_project.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'jira_integration_tests'
2-
version: '0.20.0'
2+
version: '0.21.0'
33
config-version: 2
44
profile: 'integration_tests'
55

@@ -86,3 +86,6 @@ seeds:
8686
dispatch:
8787
- macro_namespace: dbt_utils
8888
search_order: ['spark_utils', 'dbt_utils']
89+
90+
flags:
91+
send_anonymous_usage_stats: False

0 commit comments

Comments
 (0)