#I am trying to ensure that the SDK

1 messages · Page 1 of 1 (latest)

glacial lily
#

You could try this:

diff --git a/core/modulesource.go b/core/modulesource.go
index 4c815b85c..d10069f8f 100644
--- a/core/modulesource.go
+++ b/core/modulesource.go
@@ -2,6 +2,7 @@ package core
 
 import (
        "context"
+       "crypto/rand"
        "errors"
        "fmt"
        "net/url"
@@ -488,6 +489,7 @@ func (src *ModuleSource) CalcDigest(ctx context.Context) digest.Digest {
                src.SourceRootSubpath,
                src.SourceSubpath,
                src.ContextDirectory.ID().Digest().String(),
+               rand.Text(),
        }
 
        // Include user defaults in digest so changes to env files invalidate cache

Which will make the digest for the module source random, though that would bust the cache for all SDK ops, not just runtime. Not sure if that's what you were going for

oblique torrent
#

That worked 🙏 I am soo confused on why every thing I tried didn't work (maybe becasue of the lazy load). There's still some black magic on my end regarding the loading steps and the things we cache or not