Skip to content

✨ Support private go dependencies in module development #8766

Closed

Description

@nadirollo

What are you trying to do?

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)

For a bit more context: https://discord.com/channels/707636530424053791/1298541718374715443

Why is this important to you?

To be able to develop dagger modules for internal systems that provide libraries to interact with them

How are you currently working around this?

No response

Activity

  1. gtabrar commented on Oct 23, 2024

    @gtabrar

    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!

  2. jedevc commented on Nov 13, 2024

    @jedevc
    Contributor

    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.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!

  3. sipsma commented on Nov 13, 2024

    @sipsma
    Contributor

    cc @sipsma since you worked on this feature in the first place, maybe you envisioned having an engine-agnostic way of doing it eventually?

    Yep, mentioned in the description of the issue here: #6599

    SGTM!

  4. jedevc commented on Nov 14, 2024

    @jedevc
    Contributor

    Also x-linking #7787, which feels like a similar thing in terms of wanting to mount the .gitconfig over.

  5. nadirollo commented on Nov 18, 2024

    @nadirollo
    Author

    #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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions