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

wildcard doesn't get appended to my ccs index pattern *:makelogs- #16691

Closed
LeeDr opened this issue Feb 13, 2018 · 9 comments
Closed

wildcard doesn't get appended to my ccs index pattern *:makelogs- #16691

LeeDr opened this issue Feb 13, 2018 · 9 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort

Comments

@LeeDr
Copy link

LeeDr commented Feb 13, 2018

Kibana version: 6.2.2 SNAPSHOT

Elasticsearch version: 6.2.2 SNAPSHOT

Server OS version: Ubuntu

Browser version: Chrome

Browser OS version: Windows 10

Original install method (e.g. download page, yum, from source, etc.): .deb packages

Description of the problem including expected versus actual behavior:
We have Cross Cluster tests which create these index patterns;

data:makelogs-*
local:makelogs-*
*:makelogs-*

Knowing that the UI is going to add a * to the end of index patterns I'm not putting the last * char into the field. But I guess the pattern that starts with a * breaks the code that decides if it should append a *.

Steps to reproduce:

  1. create a new index pattern and type *:makelogs-
  2. expect *:makelogs-* but it doesn't add the trailing *

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

@LeeDr LeeDr added bug Fixes for quality problems that affect the customer experience :Management labels Feb 13, 2018
@chrisronline
Copy link
Contributor

This isn’t unexpected actually. If you type a * as the first character, the code won’t append another wildcard. I’ll look more but I’m not sure if I’d consider this a bug

@LeeDr
Copy link
Author

LeeDr commented Feb 13, 2018

Its unexpected from my user point of view. And it makes it difficult to code around in automated tests.
I currently have this in the integration-test repo so that if I pass in an indexPatternName which ends in a * then I leave that off of the characters I type in field.type(indexPatternName.slice(0,-1));.
But if I pass in an indexPatternName which does not end in * then I remove the one that the UI automatically appends.

  async setIndexPatternField(indexPatternName = 'logstash-*') {
    PageObjects.common.debug(`setIndexPatternField(${indexPatternName})`);
    const field = await this.getIndexPatternField();
    await field.clearValue();
    if (indexPatternName.endsWith('*')) {
      // if we passed in an indexPaternName that ends in *, remove it because the UI is going to add it
      field.type(indexPatternName.slice(0,-1));
    } else {
      // if we passed in an indexPatternName without *, remove the one the UI adds
      await field.session.pressKeys(indexPatternName.split(''));
      await field.session.pressKeys([Keys.ARROW_RIGHT]);
      await field.session.pressKeys([Keys.BACKSPACE]);
    }
    await PageObjects.header.getSpinnerDone();
  }

I could code-around this special case, but it seems like the UI should be putting an * to the right of any non-* chars I type (but still allow me do delete the *).

@chrisronline
Copy link
Contributor

So maybe the code should consider the next character if you type in an initial * and if that is NOT a *, then it will do the same append logic? Will that work for you?

@LeeDr
Copy link
Author

LeeDr commented Feb 13, 2018

@chrisronline that sounds like it would work.

But I don't think it fixes the most general case. This probably isn't required often but what if I want logs*something-*. In that case the * isn't the first char but it seems like it would still make sense to append * to the end just like you would if it didn't have an embedded *.
I don't have a great solution to suggest, because you still have to support index patterns that don't end with *.

I've also had problems where the VM running my Kibana is slow and when I type logstash I get l*ogstash. So it seems latency can mess with the code that tries to append the *.

BTW. I wasn't sure what you would do with this issue or when, so I DID already work-around this in our Cross Cluster Search tests in the integration-test repo. It's not pretty but it works.

@chrisronline
Copy link
Contributor

Pinging @skearns64 for thoughts here

@skearns64
Copy link

This sounds like it's mostly an automated test problem. If you were a live user, you'd see that the * wasn't being appended after you typed the leading *, and you'd be able to add it.

If we were going to try to address this now, I would vote for taking into account the syntax for cross-cluster search (e.g. *:something-*), but wouldn't try to handle embedded *'s in the index name (e.g. don't try to gracefully handle something like logs*something-*), and still add a trailing *. This is mostly a convenience for a common usage pattern, and advanced usage will require manual editing.

Personally, I expect we'll get more user feedback about the process of adding an index pattern over time, and we'll want to improve the UX, but I would vote to wait for a more clear set of feedback from a few sources and try to address the broader set of feedback.

@LeeDr
Copy link
Author

LeeDr commented Feb 13, 2018

I'm OK with that. Maybe we'll get some usability feedback at the Elastic{ON} session on it.

@chrisronline
Copy link
Contributor

Cool. This thing is fairly wonky and it's not something we do often so it might always be a battle of what's more important

@timroes timroes added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages and removed :Management DO NOT USE labels Nov 27, 2018
@timroes timroes added Feature:Data Views Data Views code and UI - index patterns before 8.0 Team:AppServices and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Jul 22, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort
Projects
None yet
Development

No branches or pull requests

6 participants