diff --git a/CHANGELOG.md b/CHANGELOG.md index 3202dad3bbc..ced96a6c3b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,9 @@ Contributors: ### Fixes - Fix batching for large seeds on Snowflake ([#3941](https://github.com/dbt-labs/dbt/issues/3941), [#3942](https://github.com/dbt-labs/dbt/pull/3942)) +### Under the hood +- Bump artifact schema versions for 0.21.0 ([#3945](https://github.com/dbt-labs/dbt/pull/3945)) + ## dbt 0.21.0rc1 (September 20, 2021) ### Features diff --git a/core/dbt/contracts/graph/manifest.py b/core/dbt/contracts/graph/manifest.py index 96bf8542cdb..724cdc2d119 100644 --- a/core/dbt/contracts/graph/manifest.py +++ b/core/dbt/contracts/graph/manifest.py @@ -1069,7 +1069,7 @@ def __init__(self, macros): @dataclass -@schema_version('manifest', 2) +@schema_version('manifest', 3) class WritableManifest(ArtifactMixin): nodes: Mapping[UniqueID, ManifestNode] = field( metadata=dict(description=( diff --git a/core/dbt/contracts/results.py b/core/dbt/contracts/results.py index b3adfece719..e77bfc97eea 100644 --- a/core/dbt/contracts/results.py +++ b/core/dbt/contracts/results.py @@ -185,7 +185,7 @@ def write(self, path: str): @dataclass -@schema_version('run-results', 2) +@schema_version('run-results', 3) class RunResultsArtifact(ExecutionResult, ArtifactMixin): results: Sequence[RunResultOutput] args: Dict[str, Any] = field(default_factory=dict) @@ -369,7 +369,7 @@ def from_node_results( @dataclass -@schema_version('sources', 1) +@schema_version('sources', 2) class FreshnessExecutionResultArtifact( ArtifactMixin, VersionedSchema, diff --git a/test/integration/029_docs_generate_tests/test_docs_generate.py b/test/integration/029_docs_generate_tests/test_docs_generate.py index fce9755f4db..513adbf5c4f 100644 --- a/test/integration/029_docs_generate_tests/test_docs_generate.py +++ b/test/integration/029_docs_generate_tests/test_docs_generate.py @@ -1093,7 +1093,7 @@ def expected_seeded_manifest(self, model_database=None, quote_model=False): ) return { - 'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v2.json', + 'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v3.json', 'dbt_version': dbt.version.__version__, 'nodes': { 'model.test.model': { @@ -1680,7 +1680,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/v2.json', + 'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v3.json', 'dbt_version': dbt.version.__version__, 'nodes': { 'model.test.ephemeral_copy': { @@ -2203,7 +2203,7 @@ def expected_bigquery_complex_manifest(self): my_schema_name = self.unique_schema() return { - 'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v2.json', + 'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v3.json', 'dbt_version': dbt.version.__version__, 'nodes': { 'model.test.clustered': { @@ -2695,7 +2695,7 @@ def expected_redshift_incremental_view_manifest(self): snapshot_path = self.dir('snapshot/snapshot_seed.sql') return { - 'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v2.json', + 'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v3.json', 'dbt_version': dbt.version.__version__, 'nodes': { 'model.test.model': { @@ -2959,7 +2959,7 @@ def verify_manifest(self, expected_manifest): elif key == 'metadata': metadata = manifest['metadata'] self.verify_metadata( - metadata, 'https://schemas.getdbt.com/dbt/manifest/v2.json') + metadata, 'https://schemas.getdbt.com/dbt/manifest/v3.json') assert 'project_id' in metadata and metadata[ 'project_id'] == '098f6bcd4621d373cade4e832627b4f6' assert 'send_anonymous_usage_stats' in metadata and metadata[ @@ -3099,7 +3099,7 @@ def verify_run_results(self, expected_run_results): run_results = _read_json('./target/run_results.json') assert 'metadata' in run_results self.verify_metadata( - run_results['metadata'], 'https://schemas.getdbt.com/dbt/run-results/v2.json') + run_results['metadata'], 'https://schemas.getdbt.com/dbt/run-results/v3.json') self.assertIn('elapsed_time', run_results) self.assertGreater(run_results['elapsed_time'], 0) self.assertTrue( diff --git a/test/integration/042_sources_test/test_sources.py b/test/integration/042_sources_test/test_sources.py index c3dae974162..f8ae2e461d7 100644 --- a/test/integration/042_sources_test/test_sources.py +++ b/test/integration/042_sources_test/test_sources.py @@ -248,7 +248,7 @@ def _assert_freshness_results(self, path, state): assert isinstance(data['elapsed_time'], float) self.assertBetween(data['metadata']['generated_at'], self.freshness_start_time) - assert data['metadata']['dbt_schema_version'] == 'https://schemas.getdbt.com/dbt/sources/v1.json' + assert data['metadata']['dbt_schema_version'] == 'https://schemas.getdbt.com/dbt/sources/v2.json' assert data['metadata']['dbt_version'] == dbt.version.__version__ assert data['metadata']['invocation_id'] == dbt.tracking.active_user.invocation_id key = 'key' diff --git a/test/unit/test_manifest.py b/test/unit/test_manifest.py index 3dda2ab45cb..1cd20af27a7 100644 --- a/test/unit/test_manifest.py +++ b/test/unit/test_manifest.py @@ -272,7 +272,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/v2.json', + 'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v3.json', 'dbt_version': dbt.version.__version__, 'env': {ENV_KEY_NAME: 'value'}, # invocation_id is None, so it will not be present @@ -418,7 +418,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/v2.json', + 'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v3.json', 'dbt_version': dbt.version.__version__, 'project_id': '098f6bcd4621d373cade4e832627b4f6', 'user_id': 'cfc9500f-dc7f-4c83-9ea7-2c581c1b38cf', @@ -659,7 +659,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/v2.json', + 'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v3.json', 'dbt_version': dbt.version.__version__, 'invocation_id': '01234567-0123-0123-0123-0123456789ab', 'env': {ENV_KEY_NAME: 'value'},