fix(search): scrub stale file extension aggregation on 1.12.10 upgrade (#1A file search 500)#28565
Conversation
…e (#1A file search 500) Backport of the 1.13 fix (main PR #28555) to the 1.12.10 release line. PR #27080 (backported to 1.12.5) changed the file index mapping from extension:keyword to extension:flattened and renamed the seed aggregation to fileExtension. The SettingsCache startup merge is additive for existing asset types, so any cluster whose DB already held the file config (upgraded from pre-1.12.5) keeps the stale extension aggregation. On OpenSearch, a terms agg against a flat_object field throws illegal_argument_exception, causing a 500 on every file search query. Adds v11210 migration with removeStaleFileExtensionAggregation() targeting only the file assetType aggregation list. Idempotent.
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
🟡 Playwright Results — all passed (27 flaky)✅ 3463 passed · ❌ 0 failed · 🟡 27 flaky · ⏭️ 97 skipped
🟡 27 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
PR #27080 renamed both the aggregation and searchField from extension to fileExtension. Extended stripStaleFileExtensionSettings to also remove extension from searchFields, preventing multi_match failures on non-empty file queries on OpenSearch.
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
…scrub Backport branch was missing removeFlattenedChildrenSearchSettings() which was already in main's v11210 via conflict resolution with the immense-term children fix. Both scrubs now run in v11210: flattened-children references and stale file extension aggregation/searchField.
…n + file extension)
|
The Python checkstyle failed. Please run You can install the pre-commit hooks with |
Code Review 👍 Approved with suggestions 0 resolved / 1 findingsBackports the file extension aggregation scrub to address 500 errors and expands search settings cleanup to remove stale flattened children references. Add unit tests for the new 💡 Quality: No unit tests for stripFlattenedChildrenReferences📄 openmetadata-service/src/main/java/org/openmetadata/service/migration/utils/v11210/MigrationUtil.java:46-60 📄 openmetadata-service/src/test/java/org/openmetadata/service/migration/utils/v11210/FileExtensionAggregationScrubTest.java The new 🤖 Prompt for agentsOptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
Summary
Backport of main PR #28555 to the 1.12.10 release line.
extensionfield mapping fromkeyword→flattenedand renamed the seed aggregation tofileExtension. TheSettingsCachestartup merge is additive for existing asset types — any cluster whose DB already held thefileconfig (upgraded from pre-1.12.5) keeps the staleextensionaggregation. On OpenSearch, atermsagg against aflat_objectfield throwsillegal_argument_exception→ 500 on every file search.v11210migration withremoveStaleFileExtensionAggregation()targeting only thefileassetType aggregation list. Called from both MySQL and Postgres entrypoints. Idempotent.What's new in this version
bootstrap/sql/migrations/native/1.12.10/— placeholder SQL files (no DDL changes)migration/mysql/v11210/Migration.java+migration/postgres/v11210/Migration.java— migration entrypointsmigration/utils/v11210/MigrationUtil.java— scrub logicFileExtensionAggregationScrubTest(4 tests)Test plan
FileExtensionAggregationScrubTestextensionagg), run v11210 migration, verifyextensionis gone andfileExtensionremainsRelated
Summary by Gitar
removeFlattenedChildrenSearchSettings()to scrub stale indexed fields (columns.children.name,dataModel.columns.children.name, etc.) fromhighlightFields,searchFields, andallowedFieldsinSearchSettings.v11210migration suite alongside the file extension scrub.This will update automatically on new commits.