Bug 29856 - Make the ES config more flexible
Summary: Make the ES config more flexible
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Jonathan Druart
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
: 29854 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-01-12 08:46 UTC by Jonathan Druart
Modified: 2022-12-12 21:24 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00
Circulation function:


Attachments
Bug 29856: Make the ES config more flexible (4.02 KB, patch)
2022-01-12 08:50 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29856: Make the ES config more flexible (3.98 KB, patch)
2022-01-12 09:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 29856: Make the ES config more flexible (4.04 KB, patch)
2022-01-12 14:07 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 29856: Make the ES config more flexible (4.09 KB, patch)
2022-01-12 14:33 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2022-01-12 08:46:34 UTC
I need to add a 'request_timeout' entry to the ES configuration to fix some timeout problems on the sandboxes.
Comment 1 Jonathan Druart 2022-01-12 08:50:52 UTC
Created attachment 129327 [details] [review]
Bug 29856: Make the ES config more flexible

I need to add a 'request_timeout' entry to the ES configuration to fix some timeout problems on the sandboxes.

Instead of hard coding this new option it seems preferable to be
flexible and allow different options to be passed from the config file.

Test plan:
Add to the $KOHA_CONF, inside the elasticsearch section
  <request_timeout>60</request_timeout>
Rebuild the ES index
  koha-elasticsearch --rebuild kohadev
Change the value of the timeout to 1
Rebuild the index
It should fail (with a quite bad error 'Bad response received when
submitting request to Elasticsearch')
Comment 2 Jonathan Druart 2022-01-12 08:51:28 UTC
Can I get this patch pushed quickly please? It will help to fix the BibLibre's sandboxes.
Comment 3 Jonathan Druart 2022-01-12 09:30:42 UTC
Created attachment 129328 [details] [review]
Bug 29856: Make the ES config more flexible

I need to add a 'request_timeout' entry to the ES configuration to fix some timeout problems on the sandboxes.

Instead of hard coding this new option it seems preferable to be
flexible and allow different options to be passed from the config file.

Test plan:
Add to the $KOHA_CONF, inside the elasticsearch section
  <request_timeout>60</request_timeout>
Rebuild the ES index
  koha-elasticsearch --rebuild kohadev
Change the value of the timeout to 1
Rebuild the index
It should fail (with a quite bad error 'Bad response received when
submitting request to Elasticsearch')
Comment 4 Jonathan Druart 2022-01-12 09:58:56 UTC
*** Bug 29854 has been marked as a duplicate of this bug. ***
Comment 5 Martin Renvoize (ashimema) 2022-01-12 14:07:34 UTC
Created attachment 129347 [details] [review]
Bug 29856: Make the ES config more flexible

I need to add a 'request_timeout' entry to the ES configuration to fix some timeout problems on the sandboxes.

Instead of hard coding this new option it seems preferable to be
flexible and allow different options to be passed from the config file.

Test plan:
Add to the $KOHA_CONF, inside the elasticsearch section
  <request_timeout>60</request_timeout>
Rebuild the ES index
  koha-elasticsearch --rebuild kohadev
Change the value of the timeout to 1
Rebuild the index
It should fail (with a quite bad error 'Bad response received when
submitting request to Elasticsearch')

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize (ashimema) 2022-01-12 14:08:20 UTC
This is nice and works as described.

Signing off
Comment 7 Tomás Cohen Arazi (tcohen) 2022-01-12 14:33:39 UTC
Created attachment 129349 [details] [review]
Bug 29856: Make the ES config more flexible

I need to add a 'request_timeout' entry to the ES configuration to fix some timeout problems on the sandboxes.

Instead of hard coding this new option it seems preferable to be
flexible and allow different options to be passed from the config file.

Test plan:
Add to the $KOHA_CONF, inside the elasticsearch section
  <request_timeout>60</request_timeout>
Rebuild the ES index
  koha-elasticsearch --rebuild kohadev
Change the value of the timeout to 1
Rebuild the index
It should fail (with a quite bad error 'Bad response received when
submitting request to Elasticsearch')

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 8 Tomás Cohen Arazi (tcohen) 2022-01-12 14:37:44 UTC
FTR: It seems Search::Elasticsearch doesn't break on weird/invalid configurations passed.
Comment 9 Fridolin Somers 2022-01-13 07:27:21 UTC
Pushed to master for 22.05, thanks to everybody involved ﷐[U+1F984]﷑