elixir-mint / mint

Functional HTTP client for Elixir with support for HTTP/1 and HTTP/2 🌱
Apache License 2.0
1.36k stars 112 forks source link

Fix cannot build Docker images using Podman Compose #442

Closed kianmeng closed 3 months ago

kianmeng commented 3 months ago

This PR resolves the following error when using podman-compose:

Error: short-name "caddy:2.6.4-alpine" did not resolve to an alias and
no unqualified-search registries are defined in
"/etc/containers/registries.conf"

We also bump the Docker image for Caddy and Alpine Linux.

coveralls commented 3 months ago

Pull Request Test Coverage Report for Build ee5b7d76b72b5283836d50aeab7b1f84ac630fdd-PR-442

Details


Totals Coverage Status
Change from base Build b9ade4aedb23e2f604eb769b57f76db3744c82e2: 0.0%
Covered Lines: 1275
Relevant Lines: 1459

💛 - Coveralls
kianmeng commented 3 months ago

@whatyouhide Not sure why, I kept getting this two test cases that failed on me, but these tests are pointing to localhost?

podman-compose up --force-recreate -d
mix test
  1) test connect/3 does not fall back to IPv4 if IPv4 is disabled (Mint.Core.Transport.TCPTest)
     test/mint/core/transport/tcp_test.exs:63
     match (=) failed
     code:  assert {:error, %Mint.TransportError{reason: :econnrefused}} =
              TCP.connect("localhost", port, active: false, inet6: true, inet4: false, timeout: 1
000)            
     left:  {:error, %Mint.TransportError{reason: :econnrefused}}
     right: {:error, %Mint.TransportError{reason: :nxdomain, __exception__: true}}
     stacktrace:                                                                                 
       test/mint/core/transport/tcp_test.exs:80: (test)                                          

..
  2) test connect/3 does not fall back to IPv4 if IPv4 is disabled (Mint.Core.Transport.SSLTest)      
     test/mint/core/transport/ssl_test.exs:250
     match (=) failed
     code:  assert {:error, %Mint.TransportError{reason: :econnrefused}} =
              SSL.connect("localhost", port,
                active: false,
                inet6: true,
                inet4: false,
                timeout: 1000,
                verify: :verify_none
              )
     left:  {:error, %Mint.TransportError{reason: :econnrefused}}
     right: {:error, %Mint.TransportError{reason: :nxdomain, __exception__: true}}
     stacktrace:
       test/mint/core/transport/ssl_test.exs:269: (test)
whatyouhide commented 3 months ago

@kianmeng do you get them with Docker too? Because they are not failing in CI, it looks like.

kianmeng commented 3 months ago

@kianmeng do you get them with Docker too? Because they are not failing in CI, it looks like.

I disabled the DNS adblocker, which seemed to work. Not sure why the adblocker was aggressively blocking localhost as well.

kianmeng commented 3 months ago

:partying_face: :partying_face: :partying_face: :partying_face: :partying_face: