fix(bulk-ops): exclude soft-deleted entities from column grid (#28653) [1.13]#30433
fix(bulk-ops): exclude soft-deleted entities from column grid (#28653) [1.13]#30433sonika-shah wants to merge 1 commit into
Conversation
* fix(bulk-ops): exclude soft-deleted entities from column grid search The /v1/columns/grid endpoint was missing a `deleted: false` term filter in its Elasticsearch/OpenSearch query, so soft-deleted table columns appeared in the Column Bulk Operations grid. Both query-building methods in ElasticSearchColumnAggregator and OpenSearchColumnAggregator (buildFilters and buildTagFilterQuery) now include the filter, matching the convention used by /v1/search/query. Adds a regression test that seeds a soft-deleted table with a column, confirms the column disappears from the grid after soft-deletion. Fixes #28437 * fix(bulk-ops): address review comments on soft-delete column grid fix - Use FieldValue.of(false) in OpenSearch aggregator to match the FieldValue-based term API used throughout OsUtils - Add assertNotNull guards on getColumns() before streaming in the regression test to produce clear failures instead of NPEs * test(bulk-ops): add soft-delete regression test to enabled IT class Move the regression test for issue #28437 into ColumnSearchIndexIT (which is not @disabled) so it runs in CI immediately, rather than waiting for the unrelated metadataStatus aggregation flake in ColumnGridResourceIT to be resolved. * Revert "test(bulk-ops): add soft-delete regression test to enabled IT class" This reverts commit 7081832. * test(bulk-ops): add soft-delete regression test to ColumnBulkUpdateIT Add the regression test for issue #28437 to the enabled ColumnBulkUpdateIT class so it runs in CI, rather than ColumnGridResourceIT which is currently @disabled for an unrelated aggregation flake. * test(bulk-ops): remove duplicate regression test from @disabled class Test already lives in ColumnBulkUpdateIT where it runs in CI. * test(bulk-ops): remove redundant sleeps, rely on Awaitility polling The Awaitility blocks already poll for eventual consistency; the preceding TimeUnit.SECONDS.sleep(3) calls only added fixed delay and violated the no-Thread.sleep test convention.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ ApprovedCherry-pick of the fix excluding soft-deleted entities from the Elasticsearch and OpenSearch column aggregators, complete with a regression test. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
🔴 Playwright Results — 6 test failure(s), 2 pipeline/setup failure(s)✅ 3965 passed · ❌ 6 failed · 🟡 14 flaky · ⏭️ 30 skipped Pipeline and setup failures
Genuine Failures (failed on all attempts)❌
|
Cherry-pick of #28653 into
1.13.The original fix merged to
mainand was picked into the 1.12.x line, but 1.12.11 was cut after1.13.0branched out — so1.13never received it. Confirmed thedeleted:falsefilter was absent from both the ES and OSColumnAggregatoron 1.13.Fixes #28437 for the 1.13 line.
Cherry-picked commit: 1079291 (clean, no conflicts).
Changes
ElasticSearchColumnAggregator.java—deleted:falsefilter inbuildFilters()andbuildTagFilterQuery()OpenSearchColumnAggregator.java— sameColumnBulkUpdateIT.java— regression testtest_columnGrid_excludesSoftDeletedTablesGreptile Summary
Adds consistent soft-deletion filtering to the column grid.
deleted:falseto both standard and tag-filtered Elasticsearch column queries.Confidence Score: 5/5
The PR appears safe to merge, with matching Elasticsearch and OpenSearch behavior and regression coverage for the reported failure.
Both aggregation paths now consistently require active parent documents, and the integration test exercises the observable column-grid result across the asynchronous soft-delete index update.
Important Files Changed
Reviews (1): Last reviewed commit: "fix(bulk-ops): exclude soft-deleted enti..." | Re-trigger Greptile
Context used: