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
Add Elastic Api Version header #195
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inspecting the request done by the manticore adapter in the ES ruby client, we can see the header is not being sent to the server.
a simple test is to bump the date to 2024 and confirm that we can still query a serverless deployment.
My suspicion is around header handling between the headers passed during client creation vs headers passed at request time.
Good catch! The client got headers but completely ignored and overwritten by initial headers. It seems a bug only in manticore implementation as faraday and curb do a merge with the input headers. |
link the upstream issue elastic/elastic-transport-ruby#66 |
upstream has merged the fix. We are now waiting for the release of new version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor code style fixes. Tested and works great. Would love to not have to have this add_headers constantly, but requires deeper refactoring.
LGTM
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
Co-authored-by: João Duarte <jsvd@users.noreply.github.com>
@jsvd The last commit recreated the client with header. es-input should be straightforward to replace the client |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
link the issue for cleaning up resources #196 |
This commit adds "Elastic-Api-Version" : "2023-10-31" to request header when the Elasticsearch is serverless