Skip to content

Commit

Permalink
fix: transfer secret during LoadContext (dagger#9530)
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Chadwell <[email protected]>
  • Loading branch information
jedevc authored Feb 11, 2025
1 parent 871dce6 commit 41e63b4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/modulesource.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/dagger/dagger/dagql/call"
"github.com/dagger/dagger/engine"
"github.com/dagger/dagger/engine/buildkit"
"github.com/dagger/dagger/engine/server/resource"
"github.com/dagger/dagger/engine/slog"
)

Expand Down Expand Up @@ -426,6 +427,14 @@ func (src *ModuleSource) LoadContext(ctx context.Context, dag *dagql.Server, pat
}
}

mainClientCallerID, err := src.Query.MainClientCallerID(ctx)
if err != nil {
return inst, fmt.Errorf("failed to retrieve mainClientCallerID: %w", err)
}
if err := src.Query.AddClientResourcesFromID(ctx, &resource.ID{ID: *ctxDir.ID()}, mainClientCallerID, false); err != nil {
return inst, fmt.Errorf("failed to add client resources from ID: %w", err)
}

return MakeDirectoryContentHashed(ctx, bk, ctxDir)

default:
Expand Down

0 comments on commit 41e63b4

Please sign in to comment.