Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cache dir #24

Merged
merged 2 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ generate: pkl-resolve pkl-resolve-hack

.PHONY: build-image
build-image:
docker build --build-arg -t runtime .
docker build -t runtime .
crossplane xpkg build -f package --embed-runtime-image=runtime -o .out/function-pkl.xpkg

.PHONY: push-image
Expand Down
2 changes: 2 additions & 0 deletions internal/function/fn.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func (f *Function) RunFunction(ctx context.Context, req *fnv1beta1.RunFunctionRe
case "local":
evaluator, err = f.EvaluatorManager.NewProjectEvaluator(ctx, in.Spec.Local.ProjectDir,
pkl.PreconfiguredOptions,
pkl.WithDefaultCacheDir,
reader.WithCrossplane(&reader.CrossplaneReader{
ReaderScheme: "crossplane",
Request: &helper.CompositionRequest{
Expand All @@ -77,6 +78,7 @@ func (f *Function) RunFunction(ctx context.Context, req *fnv1beta1.RunFunctionRe
default:
evaluator, err = f.EvaluatorManager.NewEvaluator(ctx,
pkl.PreconfiguredOptions,
pkl.WithDefaultCacheDir,
reader.WithCrossplane(&reader.CrossplaneReader{
ReaderScheme: "crossplane",
Request: &helper.CompositionRequest{
Expand Down