Replies: 9 comments
-
I guess this is your solution? |
Beta Was this translation helpful? Give feedback.
-
+1 it would be really helpful to understand why we get cache-miss |
Beta Was this translation helpful? Give feedback.
-
With Turbo 1.9 I have run the same small task twice, starting from an uncached state, with and without Since the task hash is different between the runs, both runs get a cache miss. But I don't understand what the hash change is based on, since everything else in the tasks (as listed in the JSON) is the same. |
Beta Was this translation helpful? Give feedback.
-
@ds300 with |
Beta Was this translation helpful? Give feedback.
-
@jonaslindstr if you have a hash changing with nothing else changing in the file, can you open a new issue with the relevant details? Thanks! |
Beta Was this translation helpful? Give feedback.
-
@gsoltis --summarize exists sure, but it requires extra (as-of-yet nonexistent) tooling to be human-friendly. This feature request is explcitly for a human-friendly way of knowing why a task reran. |
Beta Was this translation helpful? Give feedback.
-
@ds300 Got it. I'll leave this open as a feature request then. |
Beta Was this translation helpful? Give feedback.
-
summarize doesn't say which of the files are different tho |
Beta Was this translation helpful? Give feedback.
-
Not sure if I'll get around to a full npm package, but passing along my WIP which tells you all the inputs and logged hashes to show what changed here: https://gist.github.com/orta/f802e9389c77daab97e1194fad5a1bb0 The thing I'm finding on my runs though is that the task hash changes in something outside of those and I've not figured out what the algorithm for generating the hash is yet in a way that can be explained from just reading the summaries |
Beta Was this translation helpful? Give feedback.
-
Which project is this feature idea for?
Turborepo
Describe the feature you'd like to request
When turbo can't find a cached result, we get no information to tell us why. In the cli we only see
This makes it extremely tedious to debug situations where the cache is being invalidated more often than I expect, which happens often.
I'd like a short list of the cached values that were different compared to the previous successful build.
Describe the solution you'd like
Turbo should store a log of the most recent successful build for any given (task, package) pair. This log should include a manifest of all the input values that contribute to the composite cache key for the (task, package) pair, along with their hashes.
Whenever turbo starts a new task in a given package, it should look for the most recent log and, if found, compare the new list of input values and their hashes against the value recorded on the previous successful build.
If it finds a log and finds hash differences, it should print a concise truncated list of the differences to the cli, and a full list of the differences to the persistent task log.
Describe alternatives you've considered
I tried using the new summary.json files, but even with json-aware diffing it's quite difficult to find out what changed from one run to the next.
Beta Was this translation helpful? Give feedback.
All reactions