[2.11]Fix gantt chart UI test failing on empty index-pattern fields - #2091
Conversation
Signed-off-by: Qxisylolo <qianxisy@amazon.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
wanglam
left a comment
There was a problem hiding this comment.
LGTM. The fix correctly addresses the root cause — index-pattern created without fields attribute caused empty dropdowns in the gantt chart editor. The approach (refresh=wait_for + _fields_for_wildcard + store fields) mirrors how OSD itself creates index patterns. Clean and self-maintaining.
Description
Fixes the
gantt-chart-dashboards/gantt_ui.spec.jstest.Root cause
fieldsattribute. The test created thejaegerindex pattern with only a
title, leaving itsfieldsattribute empty.The visualization editor reads the stored
fieldslist to populate itsfield dropdowns — so every dropdown in the Gantt editor (Event, Start time,
Duration) showed no options, and the chart could not be configured. The
test then hung on
cy.contains('spanID')until it timed out.opensearch-project/OpenSearch-Dashboards#11653 introduces the error: An index-pattern created with only a title → fields stays empty → editor dropdowns are empty → the gantt chart can't be configured
test result
Issues Resolved
[List any issues this PR will resolve]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.