Skip to content

Commit

Permalink
Bump manifest jsonschema to v11, update v10 schema (#8335)
Browse files Browse the repository at this point in the history
  • Loading branch information
gshank authored Aug 9, 2023
1 parent 8c98ef3 commit 41bb527
Show file tree
Hide file tree
Showing 7 changed files with 5,810 additions and 108 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20230807-164509.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Bump manifest schema version to v11, freeze manifest v10
time: 2023-08-07T16:45:09.712744-04:00
custom:
Author: gshank
Issue: "8333"
5 changes: 3 additions & 2 deletions core/dbt/contracts/graph/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,7 @@ def __init__(self, macros):


@dataclass
@schema_version("manifest", 10)
@schema_version("manifest", 11)
class WritableManifest(ArtifactMixin):
nodes: Mapping[UniqueID, ManifestNode] = field(
metadata=dict(description=("The nodes defined in the dbt project and its dependencies"))
Expand Down Expand Up @@ -1486,14 +1486,15 @@ def compatible_previous_versions(self):
("manifest", 7),
("manifest", 8),
("manifest", 9),
("manifest", 10),
]

@classmethod
def upgrade_schema_version(cls, data):
"""This overrides the "upgrade_schema_version" call in VersionedSchema (via
ArtifactMixin) to modify the dictionary passed in from earlier versions of the manifest."""
manifest_schema_version = get_manifest_schema_version(data)
if manifest_schema_version <= 9:
if manifest_schema_version <= 10:
data = upgrade_manifest_json(data, manifest_schema_version)
return cls.from_dict(data)

Expand Down
246 changes: 148 additions & 98 deletions schemas/dbt/manifest/v10.json

Large diffs are not rendered by default.

Loading

0 comments on commit 41bb527

Please sign in to comment.