Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change createIndexPattern to do what it takes to make the indexPatternName* #64646

Merged
merged 6 commits into from
Apr 30, 2020

Conversation

LeeDr
Copy link
Contributor

@LeeDr LeeDr commented Apr 28, 2020

Summary

I updated this PR so that we always pass the exact desired index pattern name in settings_page.createIndexPattern(). Within that method, there are 3 cases;

  1. the "common case" where we pass in logstash-* and the method enters logstash- and we get the correct logstash-* because the UI appends a trailing *
  2. the "non-wildcard case" which might be more typical when it isn't a time-based index. We pass in shakespeare and we get shakespeare (we remove the trailing * that the UI adds)
  3. There appear to be a few cases where the UI does NOT append the trailing *.
    1. One of those is when the index pattern starts with * like a wildcarded cross cluster search index pattern *:makelogs-*.
    2. Another is the test case where the test enters ❤️. I thought the UI would append a * which would need to be removed, but it doesn't. So case Change of links to styles and js #2 above handles that by only removing the trailing char if the length of the index pattern in the field is greater than the length of the indexPatternName passed in.

A final check (which was already there) confirms that the final value matches what was passed in.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@LeeDr LeeDr force-pushed the createIndexPatternWildcard branch from db8acb4 to bbba03f Compare April 28, 2020 20:45
@LeeDr
Copy link
Contributor Author

LeeDr commented Apr 28, 2020

I have fixes for 2 failures in previous run;
Functional tests / Group 6 failure in Shakespeare test
X-Pack Chrome Functional tests / Group 1 failure in graph test

I don't have a fix for this one in X-Pack Chrome Functional tests / Group 2
(maybe just flaky?);

 1) event_log
       Event Log public API
         should support sorting by event end:
     retry.try timeout: Error: expected 'test 2020-04-28T22:00:22.722Z' to sort of equal 'test 2020-04-28T22:00:22.723Z'

@LeeDr LeeDr changed the title allow createIndexPattern with expectWildcard: false change createIndexPattern to do what it takes to make the indexPatternName* Apr 29, 2020
@LeeDr
Copy link
Contributor Author

LeeDr commented Apr 29, 2020

There was one unrelated test failure. I'll run another pass.

@LeeDr
Copy link
Contributor Author

LeeDr commented Apr 29, 2020

@elasticmachine merge upstream

@LeeDr LeeDr marked this pull request as ready for review April 29, 2020 15:57
Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I replied about possibility to use DELETE key.
Tested on MacOS 10.14.6 in both FF and Chrome

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@dmlemeshko dmlemeshko self-requested a review April 29, 2020 23:07
Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested locally.

@LeeDr LeeDr merged commit 0efd02b into elastic:master Apr 30, 2020
@LeeDr LeeDr deleted the createIndexPatternWildcard branch April 30, 2020 17:30
LeeDr pushed a commit to LeeDr/kibana that referenced this pull request Apr 30, 2020
LeeDr pushed a commit that referenced this pull request Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants