Skip to content

Commit 222d604

Browse files
[Backport 1.10.latest] Source Overrides Deprecation (#11802)
* Source Override Deprecation (#11636) * First draft of SourceOverrideDeprecation warning. * Refinements and test * Back out unneeded change` * Fix unit test. * add changie doc * Bump minimum dbt-protos to 1.0.335 --------- Co-authored-by: Quigley Malcolm <[email protected]> * Update json schemas (#11800) * Update dbt_project.yml jsonschema spec to handle nested config defs Additionally adds some more cloud configs * Update schema files jsonschema definition to not have `overrides` for sources Additionally add some cloud definitions * Add changie doc * Update happy_path fixture to include nested config specifations in dbt_project.yml * Move source overrides deprecation to jsonschema (#11801) * Improve deprecation message for SourceOverrideDeprecation * Move SourceOverrideDeprecation to jsonschema validation code path * Update test for checking SourceOverrideDeprecation --------- Co-authored-by: Peter Webb <[email protected]>
1 parent ee53820 commit 222d604

File tree

12 files changed

+6540
-2783
lines changed

12 files changed

+6540
-2783
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
kind: Features
2+
body: Deprecate `overrides` property for sources
3+
time: 2025-07-01T16:49:57.979871-05:00
4+
custom:
5+
Author: peterallenwebb
6+
Issue: "11566"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
kind: Fixes
2+
body: Update jsonschema definitions with nested config defs, cloud info, and dropping
3+
source overrides
4+
time: 2025-07-07T10:34:18.982725-05:00
5+
custom:
6+
Author: QMalcolm
7+
Issue: N/A

core/dbt/deprecations.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,11 @@ class CustomOutputPathInSourceFreshnessDeprecation(DBTDeprecation):
189189
_event = "CustomOutputPathInSourceFreshnessDeprecation"
190190

191191

192+
class SourceOverrideDeprecation(DBTDeprecation):
193+
_name = "source-override-deprecation"
194+
_event = "SourceOverrideDeprecation"
195+
196+
192197
class PropertyMovedToConfigDeprecation(DBTDeprecation):
193198
_name = "property-moved-to-config-deprecation"
194199
_event = "PropertyMovedToConfigDeprecation"
@@ -279,6 +284,7 @@ def show_deprecations_summary() -> None:
279284
PropertyMovedToConfigDeprecation(),
280285
ModelParamUsageDeprecation(),
281286
WEOInlcudeExcludeDeprecation(),
287+
SourceOverrideDeprecation(),
282288
]
283289

284290
deprecations: Dict[str, DBTDeprecation] = {d.name: d for d in deprecations_list}

core/dbt/events/types.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,15 @@ def message(self) -> str:
713713
return line_wrap_message(deprecation_tag(description))
714714

715715

716+
class SourceOverrideDeprecation(WarnLevel):
717+
def code(self) -> str:
718+
return "D035"
719+
720+
def message(self) -> str:
721+
description = f"The source property `overrides` is deprecated but was found on source `{self.source_name}` in file `{self.file}`. Instead, `enabled` should be used to disable the unwanted source."
722+
return line_wrap_message(deprecation_tag(description))
723+
724+
716725
# =======================================================
717726
# I - Project parsing
718727
# =======================================================

0 commit comments

Comments
 (0)