Skip to content

Commit 563ae2c

Browse files
authored
Merge pull request #92 from dbt-labs/fix/remove-custom-branch
2 parents d0d9ab7 + 7d2e800 commit 563ae2c

13 files changed

Lines changed: 11 additions & 32 deletions

File tree

example_jobs_file/jobs.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
threads: 4
2424
state: 1
2525
triggers:
26-
custom_branch_only: true
2726
git_provider_webhook: false
2827
github_webhook: false
2928
schedule: true
@@ -50,7 +49,6 @@ jobs:
5049
threads: 4
5150
state: 1
5251
triggers:
53-
custom_branch_only: true
5452
git_provider_webhook: false
5553
github_webhook: true # this job runs from webhooks
5654
schedule: false # this doesn't run on a schedule

example_jobs_file/jobs_templated.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
threads: 4
2424
state: 1
2525
triggers:
26-
custom_branch_only: false
2726
git_provider_webhook: false
2827
github_webhook: false
2928
# we can add more complex logic in Jinja based on our variables
@@ -52,7 +51,6 @@ jobs:
5251
threads: 4
5352
state: 1
5453
triggers:
55-
custom_branch_only: true
5654
git_provider_webhook: false
5755
github_webhook: true # this job runs from webhooks
5856
schedule: false # this doesn't run on a schedule

example_jobs_file/jobs_with_anchors.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ jobs:
4545
threads: 4
4646
state: 1
4747
triggers:
48-
custom_branch_only: true
4948
git_provider_webhook: false
5049
github_webhook: false
5150
schedule: true
@@ -66,7 +65,6 @@ jobs:
6665
target_name: TEST
6766
threads: 4
6867
triggers:
69-
custom_branch_only: true
7068
git_provider_webhook: false
7169
github_webhook: true # this job runs from webhooks
7270
schedule: false # this doesn't run on a schedule

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "dbt-jobs-as-code"
3-
version = "0.8.0"
3+
version = "0.8.1"
44
description = "A CLI to allow defining dbt Cloud jobs as code"
55
authors = ["dbt Labs <info@dbtlabs.com>"]
66
license = "Apache License 2.0"

src/schemas/common_types.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def set_any_of_string_boolean(schema: Dict[str, Any]):
3838
class Triggers(BaseModel):
3939
github_webhook: bool = field_optional_bool_allowed_as_string_in_schema
4040
git_provider_webhook: Optional[bool] = field_optional_bool_allowed_as_string_in_schema
41-
custom_branch_only: Optional[bool] = field_optional_bool_allowed_as_string_in_schema
4241
schedule: Optional[bool] = field_optional_bool_allowed_as_string_in_schema
4342
on_merge: Optional[bool] = field_optional_bool_allowed_as_string_in_schema
4443

src/schemas/job.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,8 @@ class JobMissingFields(JobDefinition):
154154
next_run: Optional[str] = ""
155155
next_run_humanized: Optional[str] = ""
156156
is_system: bool
157+
account: Any
158+
project: Any
159+
environment: Any
160+
most_recent_run: Any
161+
most_recent_completed_run: Any

src/schemas/load_job_schema.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,11 @@
248248
"title": "State",
249249
"type": "integer"
250250
},
251+
"run_compare_changes": {
252+
"default": false,
253+
"title": "Run Compare Changes",
254+
"type": "boolean"
255+
},
251256
"job_type": {
252257
"default": "scheduled",
253258
"enum": [
@@ -418,18 +423,6 @@
418423
"default": false,
419424
"title": "Git Provider Webhook"
420425
},
421-
"custom_branch_only": {
422-
"anyOf": [
423-
{
424-
"type": "string"
425-
},
426-
{
427-
"type": "boolean"
428-
}
429-
],
430-
"default": false,
431-
"title": "Custom Branch Only"
432-
},
433426
"schedule": {
434427
"anyOf": [
435428
{

tests/exporter/test_export.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def test_export_jobs_yml(capsys):
3838
triggers:
3939
github_webhook: false
4040
git_provider_webhook: false
41-
custom_branch_only: true
4241
schedule: false
4342
on_merge: false
4443
description: ''
@@ -75,7 +74,6 @@ def test_export_jobs_yml(capsys):
7574
triggers=Triggers(
7675
github_webhook=False,
7776
git_provider_webhook=False,
78-
custom_branch_only=True,
7977
schedule=False,
8078
),
8179
state=1,

tests/integration-tests/jobs_template.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
triggers:
2828
github_webhook: false
2929
git_provider_webhook: false
30-
custom_branch_only: false
3130
schedule: false
3231
job_completion_trigger_condition:
3332
condition:
@@ -60,7 +59,6 @@ jobs:
6059
triggers:
6160
github_webhook: false
6261
git_provider_webhook: false
63-
custom_branch_only: false
6462
schedule: false
6563
custom_environment_variables:
6664
- DBT_ALPHA: "true"

tests/loader/jobs.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ jobs:
2626
triggers:
2727
github_webhook: false
2828
git_provider_webhook: "false"
29-
custom_branch_only: true
3029
schedule: true
3130
on_merge: false
3231
job_completion_trigger_condition:
@@ -54,7 +53,6 @@ jobs:
5453
triggers:
5554
github_webhook: true
5655
git_provider_webhook: false
57-
custom_branch_only: true
5856
schedule: false
5957
on_merge: true
6058
job_type: other

0 commit comments

Comments
 (0)