sergehuber opened a new pull request, #907: URL: https://github.com/apache/unomi/pull/907
## Plain-language summary Operators can remove data for one site (a scope) from Unomi. On Elasticsearch, that action removed too much data for the current tenant: other sites were deleted as well. This PR restores the old behaviour: only the named site is removed, and only for the current tenant. ## What changed * Use a query with two required filters (scope and tenant) on Elasticsearch. A single term query can hold only one field, so the previous query dropped the scope filter. * Refuse a blank scope on Elasticsearch and OpenSearch, so a missing name cannot start a wide delete. * Add a unit test that checks both filters are present in the query. * Add integration tests that other scopes, profiles, and another tenant's events stay after a purge. ## Test plan - [x] `mvn -pl persistence-elasticsearch/core -am test -Dtest=ElasticSearchScopePurgeQueryTest` - [x] `mvn -pl services -am test -Dtest=InMemoryPersistenceServiceImplTest,ClusterServiceImplTest` - [x] `./build.sh --skip-unit-tests --no-javadoc --integration-tests --single-test org.apache.unomi.itests.PersistenceServiceIT` (5 tests, 0 failures) ## References [UNOMI-999](https://issues.apache.org/jira/browse/UNOMI-999) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
