feat: add global OpenSearch index prefix support (#8489)#8514
feat: add global OpenSearch index prefix support (#8489)#8514mezzeddinee wants to merge 1 commit intoDIRACGrid:integrationfrom
Conversation
|
Note: @mezzeddinee if you updated your PR and you want a reviewer having another look at it, please mark it as "Ready for review", cheers |
|
93b2b0c to
bd18638
Compare
fstagni
left a comment
There was a problem hiding this comment.
Would you try and write (or expand) a unit test to make sure that the index names are the expected ones, on every interaction?
This is quite delicate and have been bitten by this before.
122e54d to
0b5fe4e
Compare
|
Is it ready to be reviewed @mezzeddinee? |
cc4aad6 to
fdb4d89
Compare
|
I added/expanded ElasticSearchDB unit tests for global index prefix behavior, and they pass locally. Current remaining failure appear perhaps unrelated to this change: DiracX Unit Tests failing in CI setup (pixi add local file:// path resolution). Any guidance on these CI issues is appreciated. |
fdb4d89 to
cd1ba90
Compare
cd1ba90 to
f943c5f
Compare
Fixes #8489 by introducing index prefixing as a global OpenSearch setting and removing MonitoringDB-local prefix handling.
What changed
src/DIRAC/ConfigurationSystem/Client/Utilities.py
/Systems/NoSQLDatabases/IndexPrefixingetElasticDBParameters.strip().lower()) and pass it asIndexPrefix.src/DIRAC/Core/Base/ElasticDB.py
IndexPrefixfrom DB parameters.ElasticSearchDBasglobalIndexPrefix.src/DIRAC/Core/Utilities/ElasticSearchDB.py
globalIndexPrefixconstructor parameter and property setter._withGlobalPrefix()helper to prepend the global prefix to index names/patterns.bulk_indexflow to avoid apparent double-prepending.src/DIRAC/MonitoringSystem/DB/MonitoringDB.py
IndexPrefixlookup from CS.ElasticDB.docs/source/AdministratorGuide/ExternalsSupport/index.rst
IndexPrefixunderSystems/NoSQLDatabasesand clarified it is lower-case.docs/source/AdministratorGuide/Systems/MonitoringSystem/index.rst
Systems/NoSQLDatabases/IndexPrefix.src/DIRAC/Core/scripts/install_full.cfg
IndexPrefixunderNoSQLDatabases.src/DIRAC/Core/Utilities/test/Test_ElasticSearchDB.py