Skip to content

Commit

Permalink
Bumping manifest schema to v5 (#5032)
Browse files Browse the repository at this point in the history
* Bumping manifest schema to v5

* Adding changelog
  • Loading branch information
leahwicz authored Apr 12, 2022
1 parent ec46be7 commit 365414b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20220411-213914.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: ""
time: 2022-04-11T21:39:14.402268-04:00
custom:
Author: leahwicz
Issue: "5033"
PR: "5032"
2 changes: 1 addition & 1 deletion core/dbt/contracts/graph/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ def __init__(self, macros):


@dataclass
@schema_version("manifest", 4)
@schema_version("manifest", 5)
class WritableManifest(ArtifactMixin):
nodes: Mapping[UniqueID, ManifestNode] = field(
metadata=dict(description=("The nodes defined in the dbt project and its dependencies"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ def expected_seeded_manifest(self, model_database=None, quote_model=False):
)

return {
'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v4.json',
'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v5.json',
'dbt_version': dbt.version.__version__,
'nodes': {
'model.test.model': {
Expand Down Expand Up @@ -1237,7 +1237,7 @@ def expected_postgres_references_manifest(self, model_database=None):
snapshot_path = self.dir('snapshot/snapshot_seed.sql')

return {
'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v4.json',
'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v5.json',
'dbt_version': dbt.version.__version__,
'nodes': {
'model.test.ephemeral_copy': {
Expand Down Expand Up @@ -1819,7 +1819,7 @@ def verify_manifest(self, expected_manifest):
elif key == 'metadata':
metadata = manifest['metadata']
self.verify_metadata(
metadata, 'https://schemas.getdbt.com/dbt/manifest/v4.json')
metadata, 'https://schemas.getdbt.com/dbt/manifest/v5.json')
assert 'project_id' in metadata and metadata[
'project_id'] == '098f6bcd4621d373cade4e832627b4f6'
assert 'send_anonymous_usage_stats' in metadata and metadata[
Expand Down
6 changes: 3 additions & 3 deletions test/unit/test_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def test__no_nodes(self):
'child_map': {},
'metadata': {
'generated_at': '2018-02-14T09:15:13Z',
'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v4.json',
'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v5.json',
'dbt_version': dbt.version.__version__,
'env': {ENV_KEY_NAME: 'value'},
'invocation_id': invocation_id,
Expand Down Expand Up @@ -462,7 +462,7 @@ def test_no_nodes_with_metadata(self, mock_user):
'docs': {},
'metadata': {
'generated_at': '2018-02-14T09:15:13Z',
'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v4.json',
'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v5.json',
'dbt_version': dbt.version.__version__,
'project_id': '098f6bcd4621d373cade4e832627b4f6',
'user_id': 'cfc9500f-dc7f-4c83-9ea7-2c581c1b38cf',
Expand Down Expand Up @@ -708,7 +708,7 @@ def test__no_nodes(self):
'child_map': {},
'metadata': {
'generated_at': '2018-02-14T09:15:13Z',
'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v4.json',
'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v5.json',
'dbt_version': dbt.version.__version__,
'invocation_id': '01234567-0123-0123-0123-0123456789ab',
'env': {ENV_KEY_NAME: 'value'},
Expand Down

0 comments on commit 365414b

Please sign in to comment.