You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
✨ Support private go dependencies in module development #8766
I am developing a module for internal systems developed in go.
To interact with such systems from my dagger module, I need to import private go dependencies.
There isn't currently a way to provide credentials to the Go runtime container in a way that the codegen will be able to pull such private dependencies (GOPRIVATE / modified gitconfig)
GOPROXY support could also be an option for us if it didn't require a custom runner, but as it stands, the UX of getting all our engineers to set that up wouldn't be great. This would definitely be preferable!
Essentially, I'm working on making it way easier to config the engine by having a ~/.config/dagger/engine.json file - when an engine is started, it would pull all of it's config from there, no need for a custom runner. You'd be potentially able to set the GOPROXY setting from there.
If that would work, awesome, that's on the way soon! 🥳 (I'm actively working on it)
Or, are you more looking for a way to embed this information differently? Entirely separate from the lifetime of the engine? So you'd be able to run this on any engine without any special config?
In that case, I'm not entirely sure what that should look like - it can't be configured from the API, since that would require config from the SDK, at which point it's already too late - you'd need to do it before that. We could have a dag.Configure API (or similar) that would configure the engine in a specific way for the duration of that specific session - you could set GOPROXY from there - then dagger call would automagically load them from somewhere. cc @sipsma since you worked on this feature in the first place, maybe you envisioned having an engine-agnostic way of doing it eventually?
Maybe we could have this in dagger.json so it could be per-module? I'm not really sure that fits, since maybe there might be private info in there, and it does have a bit of an odd feel to it. Not really sure here, welcome to brainstorm some ideas!
#8766 (comment) > For our use case, the issue #7787 is likely to implement what we need.
Being able to pass the GOPROXY would allow us to work around the issue (we could set up a proxy to the private git repositories where our go dependencies are).
The engine able to read the .gitconfig with URL rewrites will solve it right away, without having to set up any other component in the middle.
Activity
gtabrar commentedon Oct 23, 2024
GOPROXYsupport could also be an option for us if it didn't require a custom runner, but as it stands, the UX of getting all our engineers to set that up wouldn't be great. This would definitely be preferable!jedevc commentedon Nov 13, 2024
Heya, would something like #8800 (comment) help out? 👋
Essentially, I'm working on making it way easier to config the engine by having a
~/.config/dagger/engine.jsonfile - when an engine is started, it would pull all of it's config from there, no need for a custom runner. You'd be potentially able to set theGOPROXYsetting from there.If that would work, awesome, that's on the way soon! 🥳 (I'm actively working on it)
Or, are you more looking for a way to embed this information differently? Entirely separate from the lifetime of the engine? So you'd be able to run this on any engine without any special config?
In that case, I'm not entirely sure what that should look like - it can't be configured from the API, since that would require config from the SDK, at which point it's already too late - you'd need to do it before that. We could have a
dag.ConfigureAPI (or similar) that would configure the engine in a specific way for the duration of that specific session - you could setGOPROXYfrom there - thendagger callwould automagically load them from somewhere. cc @sipsma since you worked on this feature in the first place, maybe you envisioned having an engine-agnostic way of doing it eventually?Maybe we could have this in
dagger.jsonso it could be per-module? I'm not really sure that fits, since maybe there might be private info in there, and it does have a bit of an odd feel to it. Not really sure here, welcome to brainstorm some ideas!sipsma commentedon Nov 13, 2024
Yep, mentioned in the description of the issue here: #6599
SGTM!
jedevc commentedon Nov 14, 2024
Also x-linking #7787, which feels like a similar thing in terms of wanting to mount the
.gitconfigover.nadirollo commentedon Nov 18, 2024
#8766 (comment) > For our use case, the issue #7787 is likely to implement what we need.
Being able to pass the GOPROXY would allow us to work around the issue (we could set up a proxy to the private git repositories where our go dependencies are).
The engine able to read the
.gitconfigwith URL rewrites will solve it right away, without having to set up any other component in the middle.