Open aviramha opened 1 year ago
The definition of EAI_* errors is different between Linux and macOS, leading to the following error happening when resolving fails:
EAI_*
Assertion failed: (!"unknown EAI_* error code"), function uv__getaddrinfo_translate_error, file ../deps/uv/src/unix/getaddrinfo.c, line 90.
This is Linux:
pub const EAI_BADFLAGS: ::c_int = -1; pub const EAI_NONAME: ::c_int = -2; pub const EAI_AGAIN: ::c_int = -3; pub const EAI_FAIL: ::c_int = -4; pub const EAI_NODATA: ::c_int = -5; pub const EAI_FAMILY: ::c_int = -6; pub const EAI_SOCKTYPE: ::c_int = -7; pub const EAI_SERVICE: ::c_int = -8; pub const EAI_MEMORY: ::c_int = -10; pub const EAI_SYSTEM: ::c_int = -11; pub const EAI_OVERFLOW: ::c_int = -12;
macOS:
pub const EAI_AGAIN: ::c_int = 2; pub const EAI_BADFLAGS: ::c_int = 3; pub const EAI_FAIL: ::c_int = 4; pub const EAI_FAMILY: ::c_int = 5; pub const EAI_MEMORY: ::c_int = 6; pub const EAI_NODATA: ::c_int = 7; pub const EAI_NONAME: ::c_int = 8; pub const EAI_SERVICE: ::c_int = 9; pub const EAI_SOCKTYPE: ::c_int = 10; pub const EAI_SYSTEM: ::c_int = 11; pub const EAI_OVERFLOW: ::c_int = 14;
I suggest to have an enum that maps the errors to our internal type, which can be converted from/to Linux and to macOS (so agent converts the Linux error, sends it over the wire, then layer converts it to Linux/macOS based on need)
1489 has a temporary fix, which will be extended when the protocol is improvised
we should add an integration test already.
will do
The definition of
EAI_*
errors is different between Linux and macOS, leading to the following error happening when resolving fails:This is Linux:
macOS:
I suggest to have an enum that maps the errors to our internal type, which can be converted from/to Linux and to macOS (so agent converts the Linux error, sends it over the wire, then layer converts it to Linux/macOS based on need)