Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bumping artifact versions for v1 #4191

Merged
merged 4 commits into from
Nov 4, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
### Features
- Allow nullable `error_after` in source freshness ([#3874](https://github.com/dbt-labs/dbt-core/issues/3874), [#3955](https://github.com/dbt-labs/dbt-core/pull/3955))
- Increase performance of graph subset selection ([#4135](https://github.com/dbt-labs/dbt-core/issues/4135),[#4155](https://github.com/dbt-labs/dbt-core/pull/4155))

### Fixes
- Changes unit tests using `assertRaisesRegexp` to `assertRaisesRegex`

### Under the hood
Bump artifact schema versions for 1.0.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we include a brief overview of what structurally changed in manifest, run-results, + sources? For easy reference by users, and by me when I go to update docs.getdbt.com

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry you asked for a brief description and not just what version was bumped...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah! I have a sense it's very small things that changed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are more changes than would make sense to write down but I listed the big ones. The small ones are some places we changed int to float but I listed renames and bigger things like that


Contributors:
- [@kadero](https://github.com/kadero) ([3955](https://github.com/dbt-labs/dbt-core/pull/3955))
- [@frankcash](https://github.com/frankcash) ([4136](https://github.com/dbt-labs/dbt-core/pull/4136))
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 @@ -1072,7 +1072,7 @@ def __init__(self, macros):


@dataclass
@schema_version('manifest', 3)
@schema_version('manifest', 4)
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', 3)
@schema_version('run-results', 4)
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', 2)
@schema_version('sources', 3)
class FreshnessExecutionResultArtifact(
ArtifactMixin,
VersionedSchema,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ def expected_seeded_manifest(self, model_database=None, quote_model=False):
)

return {
'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v3.json',
'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v4.json',
'dbt_version': dbt.version.__version__,
'nodes': {
'model.test.model': {
Expand Down Expand Up @@ -1231,7 +1231,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/v3.json',
'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v4.json',
'dbt_version': dbt.version.__version__,
'nodes': {
'model.test.ephemeral_copy': {
Expand Down Expand Up @@ -1812,7 +1812,7 @@ def verify_manifest(self, expected_manifest):
elif key == 'metadata':
metadata = manifest['metadata']
self.verify_metadata(
metadata, 'https://schemas.getdbt.com/dbt/manifest/v3.json')
metadata, 'https://schemas.getdbt.com/dbt/manifest/v4.json')
assert 'project_id' in metadata and metadata[
'project_id'] == '098f6bcd4621d373cade4e832627b4f6'
assert 'send_anonymous_usage_stats' in metadata and metadata[
Expand Down Expand Up @@ -1952,7 +1952,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/v3.json')
run_results['metadata'], 'https://schemas.getdbt.com/dbt/run-results/v4.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/v2.json'
assert data['metadata']['dbt_schema_version'] == 'https://schemas.getdbt.com/dbt/sources/v3.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 @@ -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/v3.json',
'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v4.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 @@ -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/v3.json',
'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v4.json',
'dbt_version': dbt.version.__version__,
'project_id': '098f6bcd4621d373cade4e832627b4f6',
'user_id': 'cfc9500f-dc7f-4c83-9ea7-2c581c1b38cf',
Expand Down Expand Up @@ -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/v3.json',
'dbt_schema_version': 'https://schemas.getdbt.com/dbt/manifest/v4.json',
'dbt_version': dbt.version.__version__,
'invocation_id': '01234567-0123-0123-0123-0123456789ab',
'env': {ENV_KEY_NAME: 'value'},
Expand Down