-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[DataView] Fix multiple pattern matching #152552
Changes from 13 commits
bcb9f8c
b246027
66ee68a
3fad229
8665168
ce77cfe
7c67413
4fdaec1
3ba5abb
94b301c
9691763
5ffe582
00227b4
35299c2
c98dc74
0abb1c5
d6aa974
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -201,6 +201,14 @@ export default function ({ getService }) { | |||||
indices: ['basic_index'], | ||||||
}); | ||||||
}); | ||||||
|
||||||
it('returns 404 when neither exists', async () => { | ||||||
await supertest | ||||||
.get('/api/index_patterns/_fields_for_wildcard') | ||||||
.query({ pattern: 'bad_index,bad_index_2' }) | ||||||
.expect(404); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think you will need to update test as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mattkime ^^ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
since it's no longer an error condition, this, with the reverting the change for |
||||||
}); | ||||||
|
||||||
it('returns 404 when no patterns exist', async () => { | ||||||
await supertest | ||||||
.get('/api/index_patterns/_fields_for_wildcard') | ||||||
|
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.
IMO we should back-port this as empty fields/indices list to 8.7 but in 8.8.0 we should throw error and communicate it to handle the error in UI.
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.
@shahzad31 we recently decided against that behavior since it can often result in 'toast storms' and does not align with the getting started experience.
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.
Got it. So i think in this case, if someone needs to really determine they can check length of indices to see if it actually matched any thing.
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.
@shahzad31 Yes, exactly, and handle it well for the user instead of depending upon the toast.