node v20 nightly causes failure in @elastic/elasticsearch
tests
#3192
Labels
agent-nodejs
Make available for APM Agents project planning.
@elastic/elasticsearch
tests
#3192
Recent "test-nightly (20)" Edge tests are failing.
When run locally the failures are in the
@elastic/elasticsearch
and@elastic/elasticsearch-canary
tests:The recent v20.0.0-nightly2023030448f99e5f6a changed how
http.request()
decides if the first argument is a URL instance -- if the object hashref
andorigin
fields, then it is considered a URL instance. The result is that other fields then get ignored, likeagent
andheaders
. That breaks things, like the 'tracestate'/'traceparent' header propagation, if we hit this case...And we do hit this case because
@elastic/elasticsearch@8
does this here:https://github.com/elastic/elastic-transport-js/blob/64d6fa2c734ac446e15d384c17f61bf5bb755a76/src/connection/HttpConnection.ts#L344-L345
It shouldn't do that. There is no reason for many of those fields (hash, search, pathname, etc.). It should only be setting fields defined at https://nodejs.org/api/http.html#httprequestoptions-callback
I'll open an issue for that.
I've logged an issue on node for discussion here: nodejs/node#46981
to see if this will be considered a bug. The elasticsearch client should change regardless.
a different failure
Actually there was also an internal node assertion failure when running the nightly v20 test in CI recently:
https://github.com/elastic/apm-agent-nodejs/actions/runs/4328506631/jobs/7558268956
I'm not sure what this one is about, but I'll look out for it again.
The text was updated successfully, but these errors were encountered: