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

[8.x] [Dataset Quality] Add fix it flow for field limit (#195561) #197817

Merged

Conversation

achyutjhunjhunwala
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

## Summary

Closes - elastic#190330

This PR implements the logic to support

- One click increasing of Field Limit for Field Limit Issues (applicable
on for Integrations). For Non Integrations, only text is displayed as to
how they can do it.
- The One click increase updates the linked custom component template as
well as the last backing Index
- If Last Backing Index update fails due to any reason, it provides user
an option to trigger a Rollover manually.

## Demo

Not possible, to many things to display 😆

## What's Pending ?

Tests

- [x] API tests
    - [x] Settings API
    - [x] Rollover API
    - [x] Apply New limit API
- [x] FTR tests
- [x] Displaying of various issues for integrations and non integrations
    - [x] Fix it Flow Good case, without Rollover
    - [x] Fix it Flow Good case, with Rollover
- [x] Manual Mitigation - Click on Component Template shold navigate to
proper logic based on Integration / Non
    - [x] Manual Mitigation - Ingest Pipeline
    - [x] Link for official Documentation

 ## How to setup a local environment

We will be setting up 2 different data streams, one with integration and
one without. Please follow the steps in the exact order

1. Start Local ES and Local Kibana
2. Install Nginx Integration 1st
3. Ingest data as per script here -
https://gist.github.com/achyutjhunjhunwala/03ea29190c6594544f584d2f0efa71e5
4. Set the Limit for the 2 datasets

```
PUT logs-synth.3-default/_settings
{
    "mapping.total_fields.limit": 36
}

// Set the limit for Nginx
PUT logs-nginx.access-default/_settings
{
    "mapping.total_fields.limit": 52
}
```

5. Now uncomment line number 59 from the synthtrace script to enable
cloud.project.id field and run the scenario again
6. Do a Rollover

```
POST logs-synth.3-default/_rollover
POST logs-nginx.access-default/_rollover
```

7. Get last backing index for both dataset

```
GET _data_stream/logs-synth.3-default/
GET _data_stream/logs-nginx.access-default
```

8. Increase the Limit by 1 but for last backing index

```
PUT .ds-logs-synth.3-default-2024.10.10-000002/_settings
{
    "mapping.total_fields.limit": 37
}

PUT .ds-logs-nginx.access-default-2024.10.10-000002/_settings
{
    "mapping.total_fields.limit": 53
}
```

9. Run the same Synthtrace scenario again.

This setup will give you 3 fields for testings

1. cloud.availability_zone - Which will show the character limit isue
2. cloud.project - Which will show an obsolete error which happened in
the past and now does not exists due to field limit
3. cloud.project.id - A current field limit issue

---------

Co-authored-by: Marco Antonio Ghiani <[email protected]>
Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 3ece950)

# Conflicts:
#	x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout.ts
@achyutjhunjhunwala achyutjhunjhunwala requested review from a team as code owners October 25, 2024 12:10
@achyutjhunjhunwala achyutjhunjhunwala requested a review from a team as a code owner October 25, 2024 12:10
@achyutjhunjhunwala achyutjhunjhunwala enabled auto-merge (squash) October 25, 2024 12:10
@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Oct 25, 2024
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@elasticmachine
Copy link
Contributor

elasticmachine commented Oct 25, 2024

💚 Build Succeeded

  • Buildkite Build
  • Commit: d138616
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-197817-d13861675d14

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
datasetQuality 230 240 +10

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/index-management-shared-types 126 124 -2
indexManagement 247 245 -2
total -4

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
datasetQuality 231.0KB 250.3KB +19.3KB

Page load bundle

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

id before after diff
indexManagement 45.8KB 46.1KB +253.0B
Unknown metric groups

API count

id before after diff
@kbn/index-management-shared-types 126 124 -2
indexManagement 252 250 -2
total -4

History

@achyutjhunjhunwala achyutjhunjhunwala merged commit a21c2aa into elastic:8.x Oct 25, 2024
23 checks passed
@achyutjhunjhunwala achyutjhunjhunwala deleted the backport/8.x/pr-195561 branch October 25, 2024 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport ci:project-deploy-observability Create an Observability project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants