Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code to work with mashumaro 3.15 #11051

Open
wants to merge 45 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
261e124
Fix NodeVersion definition, make_semantic_model utility
gshank Nov 25, 2024
37be156
Bump up mashumaro version again
gshank Nov 25, 2024
52fa7c0
Try pinning to >=3.15,<4.0
gshank Nov 26, 2024
354af6e
specify dbt-adapters branch
gshank Nov 26, 2024
7876edb
Update v12.json schema
gshank Nov 26, 2024
c0ea26e
validate in "update_from"
gshank Nov 26, 2024
dfca4e5
error classes
gshank Nov 26, 2024
b81632e
Comments
gshank Nov 27, 2024
e47bed3
Put back test_disabled_model.py
gshank Nov 27, 2024
9d6daa1
Use older mashumaro
gshank Nov 27, 2024
baf42c4
Again
gshank Nov 27, 2024
9df05a8
Put back default for validate in _update_from_config
gshank Nov 27, 2024
524ce54
Fix NodeVersion in artifacts test
gshank Nov 27, 2024
df23c7d
Skip a couple of tests until mash 3.15
gshank Nov 30, 2024
42a1afb
Make specialized 'calculate_node_config' methods
gshank Nov 30, 2024
9c6883b
Change order of Union in source definitions partitions
gshank Dec 2, 2024
25899ca
Change order of external.partitions schema elements
gshank Dec 2, 2024
5b4af17
Changie
gshank Dec 2, 2024
86791e0
Remove unnecessary "base" parameter
gshank Dec 2, 2024
d5616de
passes unit tests
gshank Dec 2, 2024
4554eb3
comment
gshank Dec 2, 2024
b4f72e4
Use dbt-common branch
gshank Dec 3, 2024
54adabe
Fix a few tests, remove unnecessary finalize_and_validate calls
gshank Dec 3, 2024
bbfc6e6
rename config to context_config
gshank Dec 3, 2024
1afb2bb
fix hooks before validation
gshank Dec 3, 2024
7d78b47
Bump mashumaro again
gshank Dec 3, 2024
1c709d2
Remove skips from tests
gshank Dec 3, 2024
13105cd
fix expected_manifest version: "2"
gshank Dec 3, 2024
3f7ee0e
Remove unnecessary ConfigSource
gshank Dec 3, 2024
c16cbe0
Rename ContextConfig ConfigBuilder
gshank Dec 3, 2024
c0fd389
rename model_configs resource_configs
gshank Dec 3, 2024
049418e
More cleanup
gshank Dec 3, 2024
e6fc9b0
Remove unnecessary mangle_hooks, other comments and cleanup
gshank Dec 3, 2024
31ce086
More comments
gshank Dec 4, 2024
923b8b6
add test for serialization of ExternalPartitions in ExternalTable
gshank Dec 9, 2024
1a30f64
Update test_serialization to simplify for mashumaro, add test_graph_s…
gshank Dec 10, 2024
c137041
Merge branch 'main' into mashumaro_fixes
gshank Dec 10, 2024
f011789
Remove base parameter from get_config_for
gshank Dec 11, 2024
0fb57ee
Update return type of generate_node_config
gshank Dec 11, 2024
e919144
Merge branch 'main' into mashumaro_fixes
gshank Dec 12, 2024
ebc2359
Remove requirements for 3.15
gshank Dec 12, 2024
4585bd0
formatting
gshank Dec 16, 2024
715ad2f
dev-requirements
gshank Dec 19, 2024
d1274b1
Merge branch 'main' into mashumaro_fixes
gshank Dec 19, 2024
5f94de5
Put back Union order changes, use dbtClassMixin in test_serialization.py
gshank Dec 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20241202-115445.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Support upgrading mashumaro to 3.15
time: 2024-12-02T11:54:45.103325-05:00
custom:
Author: gshank
Issue: "11044"
2 changes: 1 addition & 1 deletion core/dbt/artifacts/resources/v1/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from dbt_common.dataclass_schema import ExtensibleDbtClassMixin, dbtClassMixin
from dbt_semantic_interfaces.type_enums import TimeGranularity

NodeVersion = Union[str, float]
NodeVersion = Union[int, float, str]


@dataclass
Expand Down
6 changes: 0 additions & 6 deletions core/dbt/artifacts/resources/v1/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ def final_validate(self):
if self.materialized and self.materialized != "snapshot":
raise ValidationError("A snapshot must have a materialized value of 'snapshot'")

# Called by "calculate_node_config_dict" in ContextConfigGenerator
def finalize_and_validate(self):
data = self.to_dict(omit_none=True)
self.validate(data)
return self.from_dict(data)


@dataclass
class Snapshot(CompiledResource):
Expand Down
2 changes: 1 addition & 1 deletion core/dbt/artifacts/resources/v1/source_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ExternalTable(AdditionalPropertiesAllowed, Mergeable):
file_format: Optional[str] = None
row_format: Optional[str] = None
tbl_properties: Optional[str] = None
partitions: Optional[Union[List[str], List[ExternalPartition]]] = None
partitions: Optional[Union[List[ExternalPartition], List[str]]] = None

def __bool__(self):
return self.location is not None
Expand Down
Loading
Loading