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

Empty "create data view" and welcome screen broken when ent search is enabled #127787

Closed
Dosant opened this issue Mar 15, 2022 · 1 comment · Fixed by #127260
Closed

Empty "create data view" and welcome screen broken when ent search is enabled #127787

Dosant opened this issue Mar 15, 2022 · 1 comment · Fixed by #127260
Labels
bug Fixes for quality problems that affect the customer experience Feature:Data Views Data Views code and UI - index patterns before 8.0 impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort v8.0.0

Comments

@Dosant
Copy link
Contributor

Dosant commented Mar 15, 2022

Kibana version: 8.0.x, partially 8.1.0

Describe the bug:

Welcome screen and "Create data view" empty state don't work because of logs-enterprise_search.api-default that is created by default with enterprise search

Because #82851 is fixed in 8.1, the existing workaround with FLEET_ASSETS_TO_IGNORE no longer needed for welcome screen. This makes welcome screen only broken in 8.0.x, but working in 8.1.0.

However logs-enterprise_search.api-default slightly breaks the empty state of "create data view" screen where it says, that "you have data, now create data view" instead of "you don't have any data".

Short term we want to add logs-enterprise_search.api-default to existing ignore list

export const hasUserIndexPattern = async ({ esClient, soClient }: Deps): Promise<boolean> => {
const indexPatterns = await soClient.find<IndexPatternSavedObjectAttrs>({
type: 'index-pattern',
fields: ['title'],
search: `*`,
searchFields: ['title'],
perPage: 100,
});
if (indexPatterns.total === 0) {
return false;
}
// If there are any index patterns that are not the default metrics-* and logs-* ones created by Fleet,
// assume there are user created index patterns
if (
indexPatterns.saved_objects.some(
(ip) =>
ip.attributes.title !== FLEET_ASSETS_TO_IGNORE.METRICS_INDEX_PATTERN &&
ip.attributes.title !== FLEET_ASSETS_TO_IGNORE.LOGS_INDEX_PATTERN
)
) {
return true;
}
const resolveResponse = await esClient.indices.resolveIndex({
name: `${FLEET_ASSETS_TO_IGNORE.LOGS_INDEX_PATTERN},${FLEET_ASSETS_TO_IGNORE.METRICS_INDEX_PATTERN}`,
});
const hasAnyNonDefaultFleetIndices = resolveResponse.indices.some(
(ds) => ds.name !== FLEET_ASSETS_TO_IGNORE.METRICS_ENDPOINT_INDEX_TO_IGNORE
);
if (hasAnyNonDefaultFleetIndices) return true;
const hasAnyNonDefaultFleetDataStreams = resolveResponse.data_streams.some(
(ds) =>
ds.name !== FLEET_ASSETS_TO_IGNORE.METRICS_DATA_STREAM_TO_IGNORE &&
ds.name !== FLEET_ASSETS_TO_IGNORE.LOGS_DATA_STREAM_TO_IGNORE
);
if (hasAnyNonDefaultFleetDataStreams) return true;
return false;
};

Longer term we should come up with a strategy of handling empty states.

Originally found in #110367 (comment)

@Dosant Dosant added bug Fixes for quality problems that affect the customer experience Feature:Data Views Data Views code and UI - index patterns before 8.0 v8.0.0 Team:AppServicesSv labels Mar 15, 2022
@elasticmachine
Copy link
Contributor

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

@exalate-issue-sync exalate-issue-sync bot reopened this Mar 16, 2022
@exalate-issue-sync exalate-issue-sync bot added the impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. label Mar 16, 2022
@exalate-issue-sync exalate-issue-sync bot reopened this Mar 16, 2022
@exalate-issue-sync exalate-issue-sync bot added the loe:small Small Level of Effort label Mar 16, 2022
@exalate-issue-sync exalate-issue-sync bot reopened this Mar 16, 2022
@exalate-issue-sync exalate-issue-sync bot reopened this Mar 16, 2022
@exalate-issue-sync exalate-issue-sync bot reopened this Mar 16, 2022
@exalate-issue-sync exalate-issue-sync bot added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. and removed impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. labels Mar 16, 2022
@exalate-issue-sync exalate-issue-sync bot reopened this Mar 16, 2022
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 impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort v8.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants