Skip to content

Commit

Permalink
Bumping artifact versions for 0.21 (#3945) (#3949)
Browse files Browse the repository at this point in the history
* Bumping artifact versions for 0.21

* Adding sources bump

* Updating some tests

* Updated sources test

* Adding changelog update
  • Loading branch information
leahwicz authored Sep 24, 2021
1 parent df5953a commit 2a99431
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
### 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
Expand Down
2 changes: 1 addition & 1 deletion core/dbt/contracts/graph/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,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=(
Expand Down
4 changes: 2 additions & 2 deletions core/dbt/contracts/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -369,7 +369,7 @@ def from_node_results(


@dataclass
@schema_version('sources', 1)
@schema_version('sources', 2)
class FreshnessExecutionResultArtifact(
ArtifactMixin,
VersionedSchema,
Expand Down
12 changes: 6 additions & 6 deletions test/integration/029_docs_generate_tests/test_docs_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
Expand Down Expand Up @@ -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': {
Expand Down Expand Up @@ -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': {
Expand Down Expand Up @@ -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': {
Expand Down Expand Up @@ -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[
Expand Down Expand Up @@ -3100,7 +3100,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(
Expand Down
2 changes: 1 addition & 1 deletion test/integration/042_sources_test/test_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
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 @@ -273,7 +273,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
Expand Down Expand Up @@ -419,7 +419,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',
Expand Down Expand Up @@ -662,7 +662,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'},
Expand Down

0 comments on commit 2a99431

Please sign in to comment.