-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New header "X-Elastic-Client-Meta" introduced in 7.11.0 broke adapters #1224
Labels
Comments
@tlang1991 thanks for reporting this! I'll work on a fix and release a |
picandocodigo
added a commit
that referenced
this issue
Feb 25, 2021
- Extracts meta header related code into a module - Adds more tests for specific situations when http libraries haven't been loaded by the time the meta header methods are called Related to #1224
picandocodigo
added a commit
that referenced
this issue
Feb 25, 2021
- Extracts meta header related code into a module - Adds more tests for specific situations when http libraries haven't been loaded by the time the meta header methods are called Related to #1224
Merged
picandocodigo
added a commit
that referenced
this issue
Feb 25, 2021
- Extracts meta header related code into a module - Adds more tests for specific situations when http libraries haven't been loaded by the time the meta header methods are called Related to #1224
picandocodigo
added a commit
that referenced
this issue
Feb 25, 2021
- Extracts meta header related code into a module - Adds more tests for specific situations when http libraries haven't been loaded by the time the meta header methods are called Related to #1224
picandocodigo
added a commit
that referenced
this issue
Feb 25, 2021
- Extracts meta header related code into a module - Adds more tests for specific situations when http libraries haven't been loaded by the time the meta header methods are called Related to #1224
picandocodigo
added a commit
that referenced
this issue
Feb 25, 2021
- Extracts meta header related code into a module - Adds more tests for specific situations when http libraries haven't been loaded by the time the meta header methods are called Related to #1224
picandocodigo
added a commit
that referenced
this issue
Feb 25, 2021
- Extracts meta header related code into a module - Adds more tests for specific situations when http libraries haven't been loaded by the time the meta header methods are called Related to #1224
picandocodigo
added a commit
that referenced
this issue
Feb 25, 2021
- Extracts meta header related code into a module - Adds more tests for specific situations when http libraries haven't been loaded by the time the meta header methods are called Related to #1224
@tlang1991 I've release |
picandocodigo
added a commit
that referenced
this issue
Feb 25, 2021
- Extracts meta header related code into a module - Adds more tests for specific situations when http libraries haven't been loaded by the time the meta header methods are called Related to #1224
From what we have seen, we believe this issue has been fixed. So closing this. Thank you for the quick fix! |
This was referenced Mar 8, 2021
picandocodigo
added a commit
that referenced
this issue
Mar 25, 2021
- Extracts meta header related code into a module - Adds more tests for specific situations when http libraries haven't been loaded by the time the meta header methods are called Related to #1224
picandocodigo
added a commit
that referenced
this issue
Mar 25, 2021
- Extracts meta header related code into a module - Adds more tests for specific situations when http libraries haven't been loaded by the time the meta header methods are called Related to #1224
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We were able to create a Elasticsearch client with
typhoeus
adapter in 7.10 like so:Elasticsearch::Client.new(adapter: :typhoeus)
. And we didn't need to pre-loadtyphoeus
byrequire 'typhoeus'
in our code.However, after upgrading to 7.11.1, our code no longer works and will cause
NameError: uninitialized constant Elasticsearch::Transport::Client::Typhoeus
inelasticsearch-transport-7.11.1/lib/elasticsearch/transport/client.rb:265:in meta_header_adapter
After some code tracing, I believe meta_header_adapter method has a bug. Based on the configured adapter, it tries to access a version constant...which means that it assumes the adapter has already been loaded. But prior to now, that has not been required.
We found out this issue could be mitigated by either:
enable_meta_header: false
when creating the clientrequire 'typhoeus'
in our code.The issue can be demonstrated with the following script:
Then if you run, the script finishes just fine.
ES_VERSION=7.10.1 ruby ./es-ruby-7.11.1-repro-script.rb
But will cause
uninitialized constant Elasticsearch::Transport::Client::Typhoeus
ES_VERSION=7.11.1 ruby ./es-ruby-7.11.1-repro-script.rb
The text was updated successfully, but these errors were encountered: