moby / moby/buildkit

Connhelpers do not register automatically

Open
#2,467 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
10.3k
Forks
1.5k
Avg merge
1d 23h
Merged PRs (30d)
48

Description

Without explicitly importing the connhelpers (by way of import _ "path" or a real import), they are not registered. This causes clients using connhelper handled daemon URLs to throw nondescript errors.

Errors are similar to: connection error: desc = "transport: error while dialing: dial docker-container: unknown network docker-container"

As far as I can tell, for users utilizing the client libraries on their own, importing the file in one location should resolve the issue as it triggers the init() function. You can also explicitly generate a helper and pass it as an option to the client object, but that is overkill.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing connhelper registration and the init() behavior described in the issue, then inspect how client libraries resolve daemon URLs and accept explicit helper options. Reproduce the unknown-network error without an explicit connhelper import; done means supported connhelpers register automatically and the client no longer requires a redundant import or manually supplied helper.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.