-
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
[Data plugin] Wrong caching for Index pattern fields #87116
Conversation
@@ -46,7 +46,6 @@ import { IndexPatternMissingIndices } from '../lib'; | |||
import { findByTitle } from '../utils'; | |||
import { DuplicateIndexPatternError } from '../errors'; | |||
|
|||
const indexPatternCache = createIndexPatternCache(); |
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.
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.
also I think it should be backported into 7.10
, 7.11
as a security issue.
Pinging @elastic/kibana-app (Team:KibanaApp) |
@@ -262,44 +262,6 @@ export default function ({ getService }: FtrProviderContext) { | |||
expect(response3.body.index_pattern.typeMeta).to.eql({ foo: 'baz' }); | |||
}); | |||
|
|||
it('can update index_pattern fields', async () => { |
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.
have no idea how it worked before but if I'm not wrong users should not be able to change field name/type
.
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.
Approved pending passing tests and more accurate description - 'Index pattern cache should be local instance, not global'
@mattkime could you please help me with understanding our
in response I see that index was successfully created with 2 fields. Next query just a getting an
I expect to see 2 fields like in response from step 1. But I see only one: What is the correct behavior? I honestly think these are just poorly written integration tests cause user should not be able somehow to modify fields (except scripted fields). |
@alexwizp You are correct - the user can't add fields aside from scripted fields. Its valid to ignore the non scripted fields. |
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.
Nice catch @alexwizp, LGTM
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Distributable file count
Page load bundle
History
To update your PR or re-run it, just comment with: |
* [Data plugin] Wrong caching for Index pattern fields Closes: elastic#84666 * remove can update index_pattern fields test * fix tests Co-authored-by: Kibana Machine <[email protected]> # Conflicts: # src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts
* [Data plugin] Wrong caching for Index pattern fields Closes: elastic#84666 * remove can update index_pattern fields test * fix tests Co-authored-by: Kibana Machine <[email protected]> # Conflicts: # src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts
* [Data plugin] Wrong caching for Index pattern fields Closes: #84666 * remove can update index_pattern fields test * fix tests Co-authored-by: Kibana Machine <[email protected]> # Conflicts: # src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts
* [Data plugin] Wrong caching for Index pattern fields Closes: #84666 * remove can update index_pattern fields test * fix tests Co-authored-by: Kibana Machine <[email protected]> # Conflicts: # src/plugins/data/common/index_patterns/index_patterns/index_patterns.ts
Closes: #84666
Summary
[Data plugin] Wrong caching for Index pattern fields. Index pattern cache should be local instance, not global