Skip to content

Commit

Permalink
Merge pull request #84 from dbt-labs/add-ci-check
Browse files Browse the repository at this point in the history
  • Loading branch information
b-per authored Sep 16, 2024
2 parents 17dab06 + b923797 commit 32bf071
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/schemas/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class JobDefinition(BaseModel):
triggers: Triggers
description: str = ""
state: int = 1
run_compare_changes: bool = False
# we don't want to enforce the list in case we add more, but still want to get those in the JSON schema
job_type: str = Field(
json_schema_extra={"enum": ["scheduled", "merge", "ci", "other"]},
Expand Down Expand Up @@ -135,7 +136,6 @@ class JobMissingFields(JobDefinition):
# when adding fields we also need to update the test for pytest

# TODO: Add to JobDefinition model when the feature is out
run_compare_changes: bool = False
integration_id: Optional[int] = None
run_lint: Optional[bool] = None
errors_on_lint_failure: Optional[bool] = None
Expand Down
1 change: 1 addition & 0 deletions tests/exporter/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def test_export_jobs_yml(capsys):
schedule: false
on_merge: false
description: ''
run_compare_changes: false
job_type: scheduled
triggers_on_draft_pr: false
job_completion_trigger_condition:
Expand Down
1 change: 1 addition & 0 deletions tests/loader/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
on_merge: true
job_type: other
triggers_on_draft_pr: true
run_compare_changes: true
job_completion_trigger_condition:
condition:
job_id: 123
Expand Down
2 changes: 2 additions & 0 deletions tests/loader/jobs_templated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- dbt run --select model2+
- dbt compile
generate_docs: false
run_compare_changes: false
schedule:
cron: 0 */2 * * *
triggers:
Expand All @@ -44,6 +45,7 @@ jobs:
target_name: TEST
deferring_environment_id:
run_generate_sources: true
run_compare_changes: true
execute_steps:
- dbt run-operation clone_all_production_schemas
- dbt compile
Expand Down
2 changes: 2 additions & 0 deletions tests/loader/jobs_with_anchors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
timeout_seconds: 0
generate_docs: false
generate_sources: true
run_compare_changes: false
name: "My Job 1 with a new name"
project_id: 176941
run_generate_sources: true
Expand Down Expand Up @@ -71,6 +72,7 @@ jobs:
- DBT_ENV2: My val2
job_type: "other"
triggers_on_draft_pr: true
run_compare_changes: true
job_completion_trigger_condition:
condition:
job_id: 123
Expand Down
2 changes: 2 additions & 0 deletions tests/loader/test_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"schedule": True,
},
"triggers_on_draft_pr": False,
"run_compare_changes": False,
},
"job2": {
"account_id": 43791,
Expand Down Expand Up @@ -93,6 +94,7 @@
"schedule": False,
},
"triggers_on_draft_pr": True,
"run_compare_changes": True,
},
}
}
Expand Down

0 comments on commit 32bf071

Please sign in to comment.