Skip to content

Commit

Permalink
WCM-35: Disable elasticsearch version check
Browse files Browse the repository at this point in the history
We're only talking to known servers/versions anyway, so it's superfluous,
and also it breaks if 'GET /' is not accepted for some reason.
  • Loading branch information
wosc committed Jan 28, 2025
1 parent 5d6209e commit bbdd1e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/docs/changelog/WCM-35.change
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WCM-35: Disable elasticsearch version check
5 changes: 4 additions & 1 deletion core/src/zeit/retresco/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ def _user_agent(self):
def TransportWithConnection(connection_class):
def factory(*args, **kw):
kw['connection_class'] = connection_class
return elasticsearch.transport.Transport(*args, **kw)
transport = elasticsearch.transport.Transport(*args, **kw)
# Bypass version check, we're only talking to known servers anyway.
transport._verified_elasticsearch = True
return transport

return factory

Expand Down

0 comments on commit bbdd1e2

Please sign in to comment.