Skip to content

Commit 32bf071

Browse files
authored
Merge pull request #84 from dbt-labs/add-ci-check
2 parents 17dab06 + b923797 commit 32bf071

6 files changed

Lines changed: 9 additions & 1 deletion

File tree

src/schemas/job.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class JobDefinition(BaseModel):
3737
triggers: Triggers
3838
description: str = ""
3939
state: int = 1
40+
run_compare_changes: bool = False
4041
# we don't want to enforce the list in case we add more, but still want to get those in the JSON schema
4142
job_type: str = Field(
4243
json_schema_extra={"enum": ["scheduled", "merge", "ci", "other"]},
@@ -135,7 +136,6 @@ class JobMissingFields(JobDefinition):
135136
# when adding fields we also need to update the test for pytest
136137

137138
# TODO: Add to JobDefinition model when the feature is out
138-
run_compare_changes: bool = False
139139
integration_id: Optional[int] = None
140140
run_lint: Optional[bool] = None
141141
errors_on_lint_failure: Optional[bool] = None

tests/exporter/test_export.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def test_export_jobs_yml(capsys):
4242
schedule: false
4343
on_merge: false
4444
description: ''
45+
run_compare_changes: false
4546
job_type: scheduled
4647
triggers_on_draft_pr: false
4748
job_completion_trigger_condition:

tests/loader/jobs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ jobs:
5959
on_merge: true
6060
job_type: other
6161
triggers_on_draft_pr: true
62+
run_compare_changes: true
6263
job_completion_trigger_condition:
6364
condition:
6465
job_id: 123

tests/loader/jobs_templated.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ jobs:
2121
- dbt run --select model2+
2222
- dbt compile
2323
generate_docs: false
24+
run_compare_changes: false
2425
schedule:
2526
cron: 0 */2 * * *
2627
triggers:
@@ -44,6 +45,7 @@ jobs:
4445
target_name: TEST
4546
deferring_environment_id:
4647
run_generate_sources: true
48+
run_compare_changes: true
4749
execute_steps:
4850
- dbt run-operation clone_all_production_schemas
4951
- dbt compile

tests/loader/jobs_with_anchors.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
timeout_seconds: 0
2727
generate_docs: false
2828
generate_sources: true
29+
run_compare_changes: false
2930
name: "My Job 1 with a new name"
3031
project_id: 176941
3132
run_generate_sources: true
@@ -71,6 +72,7 @@ jobs:
7172
- DBT_ENV2: My val2
7273
job_type: "other"
7374
triggers_on_draft_pr: true
75+
run_compare_changes: true
7476
job_completion_trigger_condition:
7577
condition:
7678
job_id: 123

tests/loader/test_loader.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"schedule": True,
4343
},
4444
"triggers_on_draft_pr": False,
45+
"run_compare_changes": False,
4546
},
4647
"job2": {
4748
"account_id": 43791,
@@ -93,6 +94,7 @@
9394
"schedule": False,
9495
},
9596
"triggers_on_draft_pr": True,
97+
"run_compare_changes": True,
9698
},
9799
}
98100
}

0 commit comments

Comments
 (0)