Skip to content

Commit

Permalink
Manifest upgrade_schema_version runs upgrade script on all older ve…
Browse files Browse the repository at this point in the history
…rsions (#9488)

* Make test fail correctly

* Manifest upgrade_schema_version runs on any older version

* Add changelog entry
  • Loading branch information
jtcohen6 authored Jan 30, 2024
1 parent 719a50c commit 9c8b28a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .changes/unreleased/Fixes-20240130-124135.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Fixes
body: Run manifest upgrade preprocessing on any older manifest version, including
v11
time: 2024-01-30T12:41:35.899412+01:00
custom:
Author: jtcohen6
Issue: "9487"
2 changes: 1 addition & 1 deletion core/dbt/artifacts/schemas/manifest/v12/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ 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_artifact_schema_version(data)
if manifest_schema_version <= 10:
if manifest_schema_version < cls.dbt_schema_version.version:
data = upgrade_manifest_json(data, manifest_schema_version)
return cls.from_dict(data)

Expand Down
2 changes: 1 addition & 1 deletion tests/functional/artifacts/data/state/v11/manifest.json

Large diffs are not rendered by default.

0 comments on commit 9c8b28a

Please sign in to comment.