Fix charts getting wrong service during reindex#26011
Conversation
|
@gitar-bot addressed feedback , review changes again |
I've reviewed the changes after your feedback was addressed. The code review shows no unresolved findings - the feedback has been successfully incorporated in commit 7fa82f5. Current Status:
The changes look good to merge. The single test failure is a known flaky test issue with OpenSearch version conflicts during concurrent index updates, not caused by your code changes. |
🔍 CI failure analysis for 212e3cc: TopicResourceIT search index timeout (new test type failing). ExploreTree test remains fixed. All failures continue to be flaky search index/infrastructure issues unrelated to PR.IssueLatest run (commit 212e3cc, job 64301856260):
Previous runs (commit 212e3cc):
Context:
Root Cause1. TopicResourceIT.java:1 (new entity type, flaky, unrelated): Why flaky/unrelated:
2. Backend integration test failures (flaky, unrelated): DomainResourceIT:
ChartResourceIT.java:1:
GlossaryTermResourceIT, GlossaryResourceIT:
TopicResourceIT (NEW):
3. Playwright test failures (flaky, unrelated):
4. Previous failures from earlier commits (context):
DetailsPR Changes:
Pattern Analysis:
All have identical error patterns: "Wait for search to reflect update" with 1 minute timeout. This confirms a systemic Elasticsearch async indexing performance issue in the test infrastructure, not PR-specific logic bugs. Summary:
Code Review ✅ ApprovedClean, well-targeted bug fix that removes the faulty batch service assignment and relies on the existing correct per-entity resolution in Tip Comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
|
* Fix charts getting wrong service during reindex * address feedback from gitar bot * Fix explore tree spec --------- Co-authored-by: Aniket Katkar <aniketkatkar97@gmail.com>
|
Failed to cherry-pick changes to the 1.11.11 branch. |



Describe your changes:
Fixes
Bug Summary
Problem: During reindexing, charts were getting incorrect service data in the search index. A chart belonging to TestMetabase would incorrectly show test_pbi as its service.
Root Cause: In ChartRepository.java, the fetchAndSetServices() method was registered as a field fetcher and incorrectly assumed all charts in a batch have the same service:
// BUGGY CODE (removed)
Fix: Removed the redundant fetchAndSetServices field fetcher registration because:
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>Summary by Gitar
fetchAndSetServices()field fetcher that incorrectly assigned all charts in a batch to the first chart's servicetest_bulkListChartsFromDifferentServices_maintainsCorrectServiceReference()validating charts retain correct service during bulk operationsExploreTree.spec.tsto use dynamic service names instead of hardcoded values, fixing flaky test dependencyThis will update automatically on new commits.