Repository navigation
test(upgrade): cover versioned and unversioned structured properties in ReindexDebug forced rebuilds - #20514
test(upgrade): cover versioned and unversioned structured properties in ReindexDebug forced rebuilds#20514rob-1019 wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
PR SummaryOverview A new test drives The existing construction test still verifies Reviewed by Cursor Bugbot for commit cd430d3. Bugbot is set up for automated code reviews on this repo. Configure here. |
…in ReindexDebug forced rebuilds Run the ReindexDebug step with structured properties enabled and assert that both a versioned and an unversioned definition reach buildReindexConfigs. The test fails if ReindexDebug passes no definitions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bfe2f35 to
ea45925
Compare
Smart test selectionpytest smoke testsMode: active. Only the selection below runs for the pytest smoke tests on this PR (applied:
Selected scopes (16 files or classes, 101 tests)
Add the Playwright E2E testsThis run:
Specs selected because of this PR (6)
Add the commit |
When
ENABLE_STRUCTURED_PROPERTIES_SYSTEM_UPDATE=true,BuildIndicesmaps every active structured property explicitly, butReindexDebug(-u ReindexDebug -a index=<index>) always passes an empty set of structured properties to its steps. With that setting on, the builder does not carry over the current structured property mappings, and because thestructuredPropertiescontainer isdynamic: false, the forced rebuild creates an index with no mapping for any structured property, so every property's values, including ones that were indexed correctly before, are left unindexed and can no longer be searched or filtered, while the job reportsSUCCEEDED.ReindexDebugshould rebuild with the same target mappings asBuildIndices. This change loads the active structured property definitions the same wayBuildIndicesdoes when that setting is on, and passes them to the pre, reindex and post steps. With the setting off (the default) nothing changes, since the builder already carries over the current mappings there.Testing
New
ReindexDebugTest: with the setting on, a versioned and an unversioned property both reach the forced rebuild (fails without this change); with it off, no definitions are read.Manual end-to-end on a local stack built from
masterate77a36dd4833250f319c1a7058f9f2c762ff728a(Elasticsearch 8.19), comparing that commit'sdatahub-upgradewith one built from this PR's commitbfe2f35cd385115154ae04454928bffb311f8b3a, with the setting on and a dataset index holding values for a versioned and an unversioned string property. Ran-u ReindexDebug -a index=datasetindex_v2:SUCCEEDED, but the rebuilt index had no mapping for either property, and a term query on each returned 0 hits (1 before the run).textcame back askeyword.The PR conforms to DataHub's Contributing Guideline (particularly PR Title Format)
Links to related issues (if applicable)
Tests for the changes have been added/updated (if applicable)
Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub
🤖 Generated with Claude Code
Summary by cubic
Fixes
ReindexDebugforced rebuilds dropping all structured property mappings whenENABLE_STRUCTURED_PROPERTIES_SYSTEM_UPDATE=true. The rebuilt index had no mapping for any structured property, leaving their values unindexed and unsearchable while the job reportedSUCCEEDED. The upgrade now loads active structured property definitions the same wayBuildIndicesdoes and passes them to the pre, reindex, and post steps. With the setting off (the default), behavior is unchanged.Adds
ReindexDebugTestverifying that a versioned and an unversioned property both reach the forced rebuild when the setting is on, and that no definitions are read when it's off.Written for commit cd430d3. Summary will update on new commits.