#ModuleSource digest
1 messages · Page 1 of 1 (latest)
It's calculated here: https://github.com/dagger/dagger/blob/312255260f8d640c8260b72f51d4487989228987/core/modulesource.go#L258
Thanks 🙏
let me know if you find something, definitely weird it changes like that (assuming no local file changes, etc.)
I'm pretty sure it's because the modsource digest is appended to /src when mounting the context directory.
I believe you but the dots don't fully connect in my head yet 😄
Well.. I mean I think that's why there's a caching issue there, but still the digests on modsource change if I remove the digest from the mount path. I'm going to check on another SDK (TS) to see of the same thing happens.
Oh I think I see what you're saying. That's why the cache busts during the function calls made by the sdk but still doesn't fully explain why the input digest changes in the first place
?
As caching goes, you can imagine that if the modsource digest changes, everything after WithWorkdir that has that digest busts the cache from then on.
Yes
It's just Python is affected cache-wise because of that namespace.
Yep that makes sense, the thing is we really want to fix whatever is causing the arg input digest to be different. Cause then with persistent function caching that being stable will result in the whole call getting cached
Then there's a general, not Python specifc reason why two consecutive module loads have different modsource digests.
I don't have time to pivot from what I'm working on atm, but might be worth println debugging that CalcDigest func to see what the diff is
Yeah