#I am trying to install a toolchain in my
1 messages ยท Page 1 of 1 (latest)
Yes I am in a dagger module, let me see what I can share. This seems related - https://github.com/dagger/dagger/issues/11236
And I do have a .env in the root
{
"name": "MyModule",
"engineVersion": "v0.19.10",
"sdk": {
"source": "go"
},
"dependencies": [
{
...
},
{
...
},
{
...
},
],
"source": "dagger",
"disableDefaultFunctionCaching": true
}
Hm, I guess can you try renaming the .env to rule it out? I assume the toolchain repo is private? I'm wondering if that could be related. I don't know why it would be, I just haven't tested that
the toolchain repo is not private. It's actually open internally.
let me try renaming the .env
Removing the .env didnt' change things ๐
I assume the toolchain repo is private?
It's private in the sense it needs auth, yes. But all other dependencies to too and they work fine. They are all in the same repo too.
What baffles me is that it works locally. Exact same repo.
oh I missed that this was only happening in CI ๐ค
I think dagger check doesn't work with -m REMOTE its a bug
doesn't work on our repo either
I don't use check or have +check pragma on any of the functions in the module.
I need some help with this. I spent a ton of time trying to figure it out but I can't install the toolchain on my CI but I can do it on my local! Local and CI, same engine version, same commands (dagger init followed by dagger toolchain install [module]) The one difference I see is:
On my local machine after a cache prune and the engine is connected (progress=plain) I see the following.
: connect DONE [0.3s]
8 : moduleSource(refString: ".", requireKind: LOCAL_SOURCE): ModuleSource!
8 : moduleSource DONE [0.1s]
The same stage in my CI
23:04:07 1 : connect DONE [0.3s]
23:04:07
23:04:07 8 : moduleSource(refString: "github.com/[redacted]/testmod@pull/121/head", requireKind: LOCAL_SOURCE): ModuleSource!
23:04:07 8 : moduleSource ERROR [0.0s]
23:04:07 8 : ! module source "github.com/[redacted]/testmod@pull/121/head" kind must be "local", got "git"
Why is the refString different? @glass zinc sorry for the ping but do you have any ideas?
Mmmh, I forgot ahah, it's gitlab or github ? Spinning up a repro (super odd)
Repo is in github. CI is Jenkins
We don't use any kind of local storage in Jenkins. Everything starts from fresh. So I tried to mimic that in local too by pruning the cache and removing the image. Still same behavior. If it matters, my local is a arm64 mac, Jenkins is amd64
I also tried dagger toolchain install module@main as well as dagger toolchain install module and dagger toolchain install module --name modulename
This is a private repo, so requires auth.
Can you please try: dagger --mod . toolchain install your-toolchain
after dagger init?
Yes
I think I reproduced this locally in a fresh /tmp module. The failure is not cache/arch-related; it happens when the target module is resolved as Git instead of local, and the obvious thing, given the context is an environment overwrite
By any changce does your pipeline inject a DAGGER_MODULE env var ?
hm, it does not
--mod . bypasses any hidden module override (just to be sure)
omg I think that worked
Yeah, auth should be unrelated, it happens technically after.
I think there's a DAGGER_MODULE env var that's injected in your context. Could you please check ? ๐
and oh boy. I lied. we DO have a DAGGER_MODULE env var in the pipeline ( i was only checking local)
I do! you are spot on
I wonder if it's a bug on our end though, let me think ahah
At least, I'm glad you're unlocked, it's a bit surprising as a UX
Yeah it is an innocuous assignment. We just used that variable to specify the module name, but we don't use it as an env var. We pass it to a function. I can rename that var
Thank you so much!!!! I spent many hours pulling my hair for this and I'm already almost bald ๐
I think we should print better that DAGGER_MODULE/--mod is overriding local module resolution ๐๐
Yes! I was just typing. You should warn the user ๐ That would have been sufficient to tip me off.
I can sleep in peace now ๐
Glad that, for one time, I could unlock you fast ahahah ๐ Good night ๐
ty again! โค๏ธ
related PR: https://github.com/dagger/dagger/pull/11845
@formal nimbus @glass zinc a follow-up PR to make things even more clear: https://github.com/dagger/dagger/pull/11870
When DAGGER_MODULE is set, the module is silently loaded with no visible
indication in the TUI.
This PR fixes that by always displaying the name of the module being loaded.