-
Notifications
You must be signed in to change notification settings - Fork 53
Carry over hash value for all literal types in remote caching #378
Conversation
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, just one small comment.
|
||
// Ensure that hash values on maps and collections are carried over | ||
// into representing literals. | ||
func TestHashCarryOnContainers(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you move these tests to the table-tests in TestHashLiteralMap_LiteralsWithHashSet
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in f4d830e.
Previously, the hash set on an input literal would be ignored if the literal was of either the `Collection` or `Map` type. This is fixed here by moving the hash-checking branch up in front of the special type logic, so that an empty literal with hash is constructed in either case if a hash is found. Adds a regression test to verify the hashes are carried over into the representer literals for both map and collection types. Signed-off-by: Nicholas Junge <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #378 +/- ##
==========================================
+ Coverage 62.89% 64.30% +1.41%
==========================================
Files 154 154
Lines 13029 10563 -2466
==========================================
- Hits 8195 6793 -1402
+ Misses 4221 3157 -1064
Partials 613 613
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Previously, the hash set on an input literal would be ignored if the literal was of either the `Collection` or `Map` type. This is fixed here by moving the hash-checking branch up in front of the special type logic, so that an empty literal with hash is constructed in either case if a hash is found. Adds a regression test to verify the hashes are carried over into the representer literals for both map and collection types. Signed-off-by: Nicholas Junge <[email protected]>
TL;DR
Previously, the hash on an input literal would be ignored if the literal was of either the
Collection
orMap
type. This is fixed here by moving the hash-checking branch up in front of the special type logic, so that an empty literal with hash is constructed in either case if a hash is found.Adds a regression test to verify the hashes are carried over into the representer literals for both map and collection types.
Type
Are all requirements met?
Complete description
See the discussion in flyteorg/flytekit#1720 for the problem statement. This PR is a direct follow-up.
The remote cache fix was missing from that PR, and that is exactly what is added here. The code here is the same fix approach, just in Go this time.
Tracking Issue
N/A