Skip to content

Commit

Permalink
Merge pull request #2939 from fishtown-analytics/fix/big-seed-smaller…
Browse files Browse the repository at this point in the history
…-path

Use diff file path for big seed checksum
  • Loading branch information
jtcohen6 authored Dec 7, 2020
2 parents 868bfec + f25fb4e commit 886b574
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
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

0 comments on commit 886b574

Please sign in to comment.