fluent-logger-python
fluent-logger-python copied to clipboard
Add compatibility for Ipv6 address
Fixes: #137
Currently the library does not support Ipv6 as host adress. To make it compatible with Ipv6 I added a function that check if host is Ipv6 and if the address is Ipv6 we can connect to Ipv6 socket otherwise we can fallback to Ipv4 socket.
This doesn't work which is indicated by the build not passing, obviously. IPv6 support doesn't just include IPv6 address string, but also support for AAAA records of a hostname.
@arcivanov I tried to check if the host use IPv6, even if the host is FQDN by using socket.getaddrinfo.
But the tests are still failing so can you please explain your comment https://github.com/fluent/fluent-logger-python/pull/138#pullrequestreview-114983247
@arcivanov Can you please have a look on the changes and tell me whats exactly is wrong with the logic. Actualy I need this feature, any help will be appreciated.
Coverage decreased (-0.8%) to 99.196% when pulling edebe052d97a9a2b0786bb4067519df71e0cb314 on koolok:ipv6 into 7389fb6600f57b6eb21c854019df7d06a79fbb57 on fluent:master.
Coverage decreased (-0.8%) to 99.196% when pulling edebe052d97a9a2b0786bb4067519df71e0cb314 on koolok:ipv6 into 7389fb6600f57b6eb21c854019df7d06a79fbb57 on fluent:master.
Coverage decreased (-0.8%) to 99.196% when pulling edebe052d97a9a2b0786bb4067519df71e0cb314 on koolok:ipv6 into 7389fb6600f57b6eb21c854019df7d06a79fbb57 on fluent:master.
Coverage decreased (-0.8%) to 99.196% when pulling edebe052d97a9a2b0786bb4067519df71e0cb314 on koolok:ipv6 into 7389fb6600f57b6eb21c854019df7d06a79fbb57 on fluent:master.
Coverage decreased (-0.8%) to 99.196% when pulling edebe052d97a9a2b0786bb4067519df71e0cb314 on koolok:ipv6 into 7389fb6600f57b6eb21c854019df7d06a79fbb57 on fluent:master.
Please write the unit tests to ensure both paths are covered and I'll merge this.
https://coveralls.io/builds/16815534/source?filename=fluent%2Fsender.py#L129
Hi Guys, when you are going to merge this fix?