Hello there!
I'm encountering this error when running a a dagger call from a argo workflow inside a k3s cluster running on dagger.
input: moduleSource.withContextDirectory.asModule resolve: failed to create module: select: failed to update module dependencies: failed to initialize dependency modules: failed to initialize dependency module: select: failed to create module: select: failed to update codegen and runtime: failed to generate code: failed to call sdk module codegen: select: call function "Codegen": process "/runtime" did not complete successfully: exit code: 2 Stdout: marshal: json: error calling MarshalJSON for type *dagger.GeneratedCode: input: currentModule.source resolve: select: failed to compute cache key: failed to apply diffs: 1 error occurred: * failed to handle changes: failed to retrieve user.overlay.opaque attr: operation not supported
If I run the same dagger call locally I don't get the error and it runs with no errors.
Trace URL
https://dagger.cloud/NunoRibeiro/traces/c593a10219bde86ecec32a62f58df19e#d491f9d9ef56ce5a
#error resolving ghcr.io/astral-sh/uv:0.4.9
1 messages · Page 1 of 1 (latest)
@oblique jacinth so argo is running within a a Dagger provisioned k3s clúster?
indeed.
Seems like DNS resolution might not be working as expected
Can you try creating a pod in that cluster and pinging google.com?
Hmm I see.. how are you running Dagger inside argo? Are you using privileged nesting?
yes.
May be worth noting that i'm running all this inside WSL2
I can check on Monday:)
Thank you @tawny sand
Have a nice weekend!
@oblique jacinth if there's any code that you can share which helps me set all this up that'd be much appreciated
you can check it out here.
https://github.com/NunoFrRibeiro/personal-blog/tree/kcd-porto
But I do think that the underlying problem is in WSL2
let's see 🙏
Thank you!
was able to make it work Nuno. Here's the patches you can use to make your example work. LMK in case you have any issues. Cheers!
diff --git a/KCD/main.go b/KCD/main.go
index aff37e1..9b0860e 100644
--- a/KCD/main.go
+++ b/KCD/main.go
@@ -86,6 +86,11 @@ func (c *Kcd) DemoStart(
"-c",
"helm repo add argo https://argoproj.github.io/argo-helm",
}).
+ WithExec([]string{
+ "bash",
+ "-c",
+ "helm upgrade --install --namespace=dagger --create-namespace dagger oci://registry.dagger.io/dagger-helm",
+ }).
WithExec([]string{
"bash",
"-c",
diff --git a/dagger-workflow.yaml b/dagger-workflow.yaml
index 4eb56ba..632e773 100644
--- a/dagger-workflow.yaml
+++ b/dagger-workflow.yaml
@@ -8,28 +8,10 @@ spec:
entrypoint: dagger-workflow
volumes:
- name: dagger-socket
- emptyDir: {}
- - name: dagger-storage
- emptyDir: {}
+ hostPath:
+ path: /var/run/dagger
templates:
- name: dagger-workflow
- sidecars:
- - name: dagger-engine
- # replace with the latest available version of Dagger for your platform
- image: registry.dagger.io/engine:v0.13.0
- securityContext:
- privileged: true
- capabilities:
- add:
- - ALL
- readinessProbe:
- exec:
- command: ["buildctl", "debug", "workers"]
- volumeMounts:
- - mountPath: /var/run/buildkit
- name: dagger-socket
- - mountPath: /var/lib/dagger
- name: dagger-storage
inputs:
artifacts:
- name: project-source
the TL;DR is that I'm installing the official dagger helm chart in the cluster and using that instead of using an argo workflow sidecar as using a sidecar is generally not convenient and was causing some issues beacuse of some missconfiguration
Buenos dias, @tawny sand
Deploying the engine with the official Dagger Helm chart solved the issue!
I'm running into other kinds of problems, but I think the cause is that this laptop cannot run these kinds of loads 🥲
Again, thank you so much for all the help
Running the argo workflow passed in my machine
Same, but it took an unbearable amount of time 😬
it also takes a bit for me to start. Probably something around all the inception levels
I'll investigate if I have some time later
when do you need to present this @oblique jacinth ?
This is going to be for KCD Porto on the 28th, so in roughly two weeks
but if we cannot get this to work properly, I have a plan B 🙂