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

Use diff file path for big seed checksum #2939

Merged
merged 1 commit into from
Dec 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- Increased the supported relation name length in postgres from 29 to 51 ([#2850](https://github.com/fishtown-analytics/dbt/pull/2850))
- dbt list command always return 0 as exit code ([#2886](https://github.com/fishtown-analytics/dbt/issues/2886), [#2892](https://github.com/fishtown-analytics/dbt/issues/2892))
- Set default `materialized` for test node configs to `test` ([#2806](https://github.com/fishtown-analytics/dbt/issues/2806), [#2902](https://github.com/fishtown-analytics/dbt/pull/2902))
- Use original file path instead of absolute path as checksum for big seeds ([#2927](https://github.com/fishtown-analytics/dbt/issues/2927), [#2939](https://github.com/fishtown-analytics/dbt/pull/2939))

### Under the hood
- Bump hologram version to 0.0.11. Add scripts/dtr.py ([#2888](https://github.com/fishtown-analytics/dbt/issues/2840),[#2889](https://github.com/fishtown-analytics/dbt/pull/2889))
Expand Down
2 changes: 1 addition & 1 deletion core/dbt/contracts/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def empty(cls, path: FilePath) -> 'SourceFile':
@classmethod
def big_seed(cls, path: FilePath) -> 'SourceFile':
"""Parse seeds over the size limit with just the path"""
self = cls(path=path, checksum=FileHash.path(path.absolute_path))
self = cls(path=path, checksum=FileHash.path(path.original_file_path))
self.contents = ''
return self

Expand Down
6 changes: 3 additions & 3 deletions test/unit/test_contracts_graph_parsed.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def basic_parsed_seed_dict():
'docs': {'show': True},
'columns': {},
'meta': {},
'checksum': {'name': 'path', 'checksum': '/root/seeds/seed.csv'},
'checksum': {'name': 'path', 'checksum': 'seeds/seed.csv'},
'unrendered_config': {},
}

Expand Down Expand Up @@ -474,7 +474,7 @@ def basic_parsed_seed_object():
docs=Docs(show=True),
columns={},
meta={},
checksum=FileHash(name='path', checksum='/root/seeds/seed.csv'),
checksum=FileHash(name='path', checksum='seeds/seed.csv'),
unrendered_config={},
)

Expand All @@ -494,7 +494,7 @@ def minimal_parsed_seed_dict():
'database': 'test_db',
'schema': 'test_schema',
'alias': 'foo',
'checksum': {'name': 'path', 'checksum': '/root/seeds/seed.csv'},
'checksum': {'name': 'path', 'checksum': 'seeds/seed.csv'},
}


Expand Down