Repository navigation
Revert to hackney ~> 1.16: 4.x cannot use unix sockets - #4
Merged
Merged
Conversation
#3 widened this to allow hackney 4.x on the reasoning that we only reach hackney through Tesla.Adapter.Hackney and make no direct :hackney calls. That missed that we reach the Docker daemon over a unix domain socket, which hackney 4.x can no longer connect to. The URL still parses correctly in 4.7.2 (transport hackney_local_tcp, host /var/run/docker.sock, port 0) and hackney_local_tcp.erl is byte-identical to 1.25.0, but 4.x's rewritten connection layer routes through hackney_happy (happy-eyeballs DNS) and never dispatches the local_tcp transport: :hackney.request(:get, "http+unix://%2Fvar%2Frun%2Fdocker.sock/v1.41/version", [], "", []) 1.25.0 => {:error, :enoent} (tried the socket) 4.7.2 => {:error, :nxdomain} (tried DNS) Downstream this made Excontainers.Container.init/1 fail and took out every test using a container (qdentity/mindfields-phx#4587 was dequeued over it). Restores the cap and documents why, so it isn't widened again.
|
Required label not found on this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reverts #3 and documents why the cap has to stay.
#3 widened the requirement to allow hackney 4.x, reasoning that excontainers only reaches hackney through
Tesla.Adapter.Hackneyand makes no direct:hackney.*calls. True, but it missed that we reach the Docker daemon over a unix domain socket (http+unix://%2Fvar%2Frun%2Fdocker.sock, seeDocker.Api.HackneyHost) — and hackney 4.x can no longer connect to one.4.7.2 still parses the URL correctly (
transport: hackney_local_tcp, host: ~c"/var/run/docker.sock", port: 0) and ships a byte-identicalhackney_local_tcp.erl, but its rewritten connection layer sends the request throughhackney_happy(happy-eyeballs DNS) and never dispatches the local_tcp transport::hackney.request(:get, "http+unix://%2Fvar%2Frun%2Fdocker.sock/v1.41/version", [], "", []){:error, :enoent}— tried the socket{:error, :nxdomain}— tried DNSDownstream this made
Excontainers.Container.init/1fail and took out every test using a container — qdentity/mindfields-phx#4587 went from master's 147 passed to 135 passed + 12 invalid and was dequeued by the merge queue.Swapping adapters isn't an escape either: hackney is the only Tesla adapter with unix-socket support.
The constraint now carries a comment explaining all of this, so it doesn't get widened again. Revisit once upstream restores unix-socket support.