[Bug 39526] New: Unify syspref variable names for Elasticsearch
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 Bug ID: 39526 Summary: Unify syspref variable names for Elasticsearch Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: domm@plix.at QA Contact: testopia@bugs.koha-community.org Some sysprefs are called "Elasticsearch*" (I can find 4 in the DB), and some are called "ES*" (2 in the DB). Those should probably be unified? select variable from systempreferences where variable like 'ES%' or variable like 'Elastic%' order by 1; +--------------------------------------+ | variable | +--------------------------------------+ | ElasticsearchCrossFields | | ElasticsearchIndexStatus_authorities | | ElasticsearchIndexStatus_biblios | | ElasticsearchMARCFormat | | ESBoostFieldMatch | | ESPreventAutoTruncate | +--------------------------------------+ We have more "Elasticsearch" than "ES", "Elasticsearch" is more self-documenting then "ES", and searching for "ES" in sysprefs finds a lot of false positives, so we should unify to "Elasticsearch*". -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |domm@plix.at -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |domm@plix.at |ity.org | Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=38964 CC| |david@davidnind.com Summary|Unify syspref variable |Unify system preference |names for Elasticsearch |variable names for | |Elasticsearch --- Comment #1 from David Nind <david@davidnind.com> --- See thread on chat discussing consistent naming for Elasticsearch related system preferences https://chat.koha-community.org/koha-community/pl/78oauot6qfgkidne7gokc9bkjh -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|Trivial patch |String patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 --- Comment #2 from Thomas Klausner <domm@plix.at> --- Created attachment 181356 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181356&action=edit Bug 39526: Unify syspref variable names to Elasticsearch We currently have a sysprefs named "Elasticsearch*" and some name only "ES*". This patch unifies the names to always start with "Elasticsearch". Test plan: * Start koha-testing-docker, open the staff interface and go to Administration. * Enter "Elasticsearch" into the System Preference search box and click "search" * You will find a bunch of sysprefs * Now search for "ESPreventAutoTruncate", which should find one match * Apply the patch * run (in ktd) the script `updatedatabase` * You should see output like DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_39526_unify_syspref_variable_names_for_elasticsearch.pl [09:35:03]: Bug 39526 - Unify system preference variable names for Elasticsearch Renamed system preference 'ES..' to 'Elasticsearch..' * Go again to to sysprefs and search again for "Elasticsearch" * you should now find "ElasticsearchPreventAutoTruncate" * Search for "ESPreventAutoTruncate", which should show "No system preferences matched your search for .." (and the list of ALL sysprefs) Please note that the qa script explains about installer/data/mysql/mandatory/sysprefs.sql, but the last line is not touched by this patch, so not sure why this happens. Sponsored-by: HKS3 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #181356|0 |1 is obsolete| | --- Comment #3 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 181378 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=181378&action=edit Bug 39526: Unify syspref variable names to Elasticsearch We currently have a sysprefs named "Elasticsearch*" and some name only "ES*". This patch unifies the names to always start with "Elasticsearch". Test plan: * Start koha-testing-docker, open the staff interface and go to Administration. * Enter "Elasticsearch" into the System Preference search box and click "search" * You will find a bunch of sysprefs * Now search for "ESPreventAutoTruncate", which should find one match * Apply the patch * run (in ktd) the script `updatedatabase` * You should see output like DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_39526_unify_syspref_variable_names_for_elasticsearch.pl [09:35:03]: Bug 39526 - Unify system preference variable names for Elasticsearch Renamed system preference 'ES..' to 'Elasticsearch..' * Go again to to sysprefs and search again for "Elasticsearch" * you should now find "ElasticsearchPreventAutoTruncate" * Search for "ESPreventAutoTruncate", which should show "No system preferences matched your search for .." (and the list of ALL sysprefs) Please note that the qa script explains about installer/data/mysql/mandatory/sysprefs.sql, but the last line is not touched by this patch, so not sure why this happens. Sponsored-by: HKS3 Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #4 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- If you are only updating 1 system preference why do a REGEXP_REPLACE in the atomicupdate? Would it not be safer to just update the 1 value? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #181378|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186488 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186488&action=edit Bug 39526: Unify syspref variable names to Elasticsearch We currently have a sysprefs named "Elasticsearch*" and some name only "ES*". This patch unifies the names to always start with "Elasticsearch". Test plan: * Start koha-testing-docker, open the staff interface and go to Administration. * Enter "Elasticsearch" into the System Preference search box and click "search" * You will find a bunch of sysprefs * Now search for "ESPreventAutoTruncate", which should find one match * Apply the patch * run (in ktd) the script `updatedatabase` * You should see output like DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_39526_unify_syspref_variable_names_for_elasticsearch.pl [09:35:03]: Bug 39526 - Unify system preference variable names for Elasticsearch Renamed system preference 'ES..' to 'Elasticsearch..' * Go again to to sysprefs and search again for "Elasticsearch" * you should now find "ElasticsearchPreventAutoTruncate" * Search for "ESPreventAutoTruncate", which should show "No system preferences matched your search for .." (and the list of ALL sysprefs) Please note that the qa script explains about installer/data/mysql/mandatory/sysprefs.sql, but the last line is not touched by this patch, so not sure why this happens. Sponsored-by: HKS3 Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 --- Comment #6 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186489 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186489&action=edit Bug 39526: Prevent other prefs to be renamed There is only one pref. It feel safer to rename this specific pref than other pref that might not be ES related. Other prefs starting with "ES" could be added, then this patch backported, etc. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com --- Comment #7 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Lucas Gass (lukeg) from comment #4)
If you are only updating 1 system preference why do a REGEXP_REPLACE in the atomicupdate? Would it not be safer to just update the 1 value?
I didn't see you comment! The patch is there now :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 --- Comment #8 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 --- Comment #9 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186689 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186689&action=edit Bug 39526: Do not insert the pref if renamed The upgrade DB must be idempotent if run twice, the second pass fails with DBI Exception: DBD::mysql::db do failed: Duplicate entry 'ElasticsearchPreventAutoTruncate' for key 'PRIMARY' at /kohadevbox/koha/C4/Installer.pm line 825 We should not insert the pref if it has been renamed already. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #10 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- follow-up pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Laura.escamilla@bywatersolu | |tions.com Status|Pushed to main |Needs documenting --- Comment #11 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- This is an enhancement and will not be backported to the 25.05.x branch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39526 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Documentation| |David Nind contact| | Text to go in the| |This enhancement renames release notes| |the 'ESPreventAutoTruncate' | |system preference to | |'ElasticsearchPreventAutoTr | |uncate', to improve | |consistency. Resolution|--- |FIXED Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/1154 Status|Needs documenting |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org