-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Re-set default index pattern in navigateToApp #8125
Conversation
// that change. If we got here, fix it. | ||
self.debug(' >>>>>>>> WARNING Navigating to [' + appName + '] with defaultIndex=' + defaultIndex); | ||
self.debug(' >>>>>>>> Setting defaultIndex to "logstash-*""'); | ||
esClient.updateConfigDoc({'dateFormat:tz':'UTC', 'defaultIndex':'logstash-*'}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does updateConfigDoc
return a promise? If so, I think we should return that promise and then do the self.remote.get()
call in a followup .then()
block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think you're right about chaining the returned promise. I'll make that change.
I pushed this up in another PR to make it run the selenium tests, and it failed: https://kibana-ci.elastic.co/job/elastic+kibana+pull-request+multijob-intake/711/consoleFull |
The failure in https://kibana-ci.elastic.co/job/elastic+kibana+pull-request+multijob-intake/711/consoleFull is caused by the side nav expand/collapse change which is on another issue. |
Several tests have been failing recently with "Error: Unexpected request: POST /api/kibana/settings/shortDots:enable, No more request expected" which seems to be caused by the field chooser tests calling `config.set('shortDots:enable', origValue)` in the test cleanup task. Rather than investigate it further I avoided the need to call `config.set()` by stubbing the `config.get()` method.
remove config.set() call to avoid race
… changes in side bar.
Changed required field data pane width and increased window width for…
Can you rebase this since we merged that other PR? I'd love to test it together. |
…o defaultIndexPattern7496
jenkins, test this |
Re-set default index pattern in navigateToApp Former-commit-id: edf1ee8
Fixes #7496. Several Jenkins selenium test runs have failed again recently when there is a logstash-* index pattern but it is not set as the default even though the test successfully called the method to set it;
esClient.deleteAndUpdateConfigDoc({'dateFormat:tz':'UTC', 'defaultIndex':'logstash-*'})
This could be caused by #7055 where Kibana writes a change to the config doc after the automation set the defaultIndex, thus clobbering it.
This PR works around that by checking if we're navigating to discover, visualize, or dashboard, and don't have a default index pattern set. In that case it logs a WARNING and sets it to
logstash-*
.What if we write a test that needs a different default index pattern than
logstash-*
? We'll have to fix this better.The easiest way to test this is to change this line in the very first test;
https://github.com/elastic/kibana/blob/master/test/functional/apps/discover/_discover.js#L19
from;
to;
This would cause the code below to log the warning and set the default index pattern (and then continue to pass tests).