Skip to content

Data views allow no index default true#152040

Closed
mattkime wants to merge 13 commits intomainfrom
data-views-allowNoIndex-default-true
Closed

Data views allow no index default true#152040
mattkime wants to merge 13 commits intomainfrom
data-views-allowNoIndex-default-true

Conversation

@mattkime
Copy link
Copy Markdown
Contributor

Summary

Summarize your PR. If it involves visual changes include a screenshot or gif.

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
dataViews 44.0KB 44.1KB +88.0B

History

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

@kertal
Copy link
Copy Markdown
Member

kertal commented Feb 24, 2023

@mattkime seems the rabbit hole wasn't so deep as I expected! 👍

// If allowNoIndex, only update field list if field caps finds fields. To support
// beats creating index pattern and dashboard before docs
if (!options.allowNoIndex || (newFields && newFields.length > 5)) {
if (!options.allowNoIndex || (newFields && newFields.length > 4)) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I suspect this fixes a test ... but curious... why?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm going to close this PR is favor of #152059 although I'm going to move some test fixes over.

the allowNoIndices data views attribute changes some field list loading behavior. It was a hack added to prevent the display of errors for the ingest team before data was present. It was always a terrible hack, I think it was added after feature freeze, one of those 'we need to do this so we can ship software, we'll think this through later'.

The code that uses the dataViews.allowNoIndices attribute should be examined for removal.

The PR I opened only changes the allowNoIndices param for field list loading.

body: {
version: '2.0.0',
},
refresh: 'wait_for',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This fixes a test, but I'm also curious: why, or ... why did it work before. given we tell elasticsearch not to refresh the index instantly?

Comment on lines 426 to +434
expect(await PageObjects.discover.getSidebarAriaDescription()).to.be(
'0 available fields. 0 meta fields.'
'0 available fields. 0 empty fields. 0 meta fields.'
);
// ask team how this should be handled
/*
await testSubjects.existOrFail(
`${PageObjects.discover.getSidebarSectionSelector('available')}-fetchWarning`
);
*/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

that's a good question, given we no longer treat missing indices as error, there's also no reason to show a warning here IMO

@mattkime mattkime closed this Mar 22, 2023
@sophiec20 sophiec20 deleted the data-views-allowNoIndex-default-true branch July 30, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants