-
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
[Dataset Quality] Add fix it flow for field limit #195561
[Dataset Quality] Add fix it flow for field limit #195561
Conversation
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.
Index Management locator changes lgtm. Code review only.
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
History
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11515474718 |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. 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 <marcoantonio.ghiani01@gmail.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 3ece950) # Conflicts: # x-pack/test_serverless/functional/test_suites/observability/dataset_quality/degraded_field_flyout.ts
…97817) # Backport This will backport the following commits from `main` to `8.x`: - [[Dataset Quality] Add fix it flow for field limit (#195561)](#195561) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Achyut Jhunjhunwala","email":"achyut.jhunjhunwala@elastic.co"},"sourceCommit":{"committedDate":"2024-10-25T09:20:26Z","message":"[Dataset Quality] Add fix it flow for field limit (#195561)\n\n## Summary\r\n\r\nCloses - https://github.com/elastic/kibana/issues/190330\r\n\r\nThis PR implements the logic to support \r\n\r\n- One click increasing of Field Limit for Field Limit Issues (applicable\r\non for Integrations). For Non Integrations, only text is displayed as to\r\nhow they can do it.\r\n- The One click increase updates the linked custom component template as\r\nwell as the last backing Index\r\n- If Last Backing Index update fails due to any reason, it provides user\r\nan option to trigger a Rollover manually.\r\n\r\n## Demo\r\n\r\nNot possible, to many things to display 😆 \r\n\r\n## What's Pending ?\r\n\r\nTests\r\n\r\n- [x] API tests\r\n - [x] Settings API\r\n - [x] Rollover API\r\n - [x] Apply New limit API\r\n- [x] FTR tests\r\n- [x] Displaying of various issues for integrations and non integrations\r\n - [x] Fix it Flow Good case, without Rollover\r\n - [x] Fix it Flow Good case, with Rollover\r\n- [x] Manual Mitigation - Click on Component Template shold navigate to\r\nproper logic based on Integration / Non\r\n - [x] Manual Mitigation - Ingest Pipeline\r\n - [x] Link for official Documentation\r\n \r\n ## How to setup a local environment\r\n \r\nWe will be setting up 2 different data streams, one with integration and\r\none without. Please follow the steps in the exact order\r\n \r\n1. Start Local ES and Local Kibana\r\n2. Install Nginx Integration 1st\r\n3. Ingest data as per script here -\r\nhttps://gist.github.com/achyutjhunjhunwala/03ea29190c6594544f584d2f0efa71e5\r\n4. Set the Limit for the 2 datasets\r\n\r\n```\r\nPUT logs-synth.3-default/_settings\r\n{\r\n \"mapping.total_fields.limit\": 36\r\n}\r\n\r\n// Set the limit for Nginx\r\nPUT logs-nginx.access-default/_settings\r\n{\r\n \"mapping.total_fields.limit\": 52\r\n}\r\n```\r\n\r\n5. Now uncomment line number 59 from the synthtrace script to enable\r\ncloud.project.id field and run the scenario again\r\n6. Do a Rollover\r\n\r\n```\r\nPOST logs-synth.3-default/_rollover\r\nPOST logs-nginx.access-default/_rollover\r\n```\r\n\r\n7. Get last backing index for both dataset\r\n\r\n```\r\nGET _data_stream/logs-synth.3-default/\r\nGET _data_stream/logs-nginx.access-default\r\n```\r\n\r\n8. Increase the Limit by 1 but for last backing index\r\n\r\n```\r\nPUT .ds-logs-synth.3-default-2024.10.10-000002/_settings\r\n{\r\n \"mapping.total_fields.limit\": 37\r\n}\r\n\r\nPUT .ds-logs-nginx.access-default-2024.10.10-000002/_settings\r\n{\r\n \"mapping.total_fields.limit\": 53\r\n}\r\n```\r\n\r\n9. Run the same Synthtrace scenario again.\r\n\r\nThis setup will give you 3 fields for testings\r\n\r\n1. cloud.availability_zone - Which will show the character limit isue\r\n2. cloud.project - Which will show an obsolete error which happened in\r\nthe past and now does not exists due to field limit\r\n3. cloud.project.id - A current field limit issue\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com>\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"3ece9501560ae18bb6c5993db7cc889a6675857c","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["v9.0.0","release_note:feature","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-logs","Feature:Dataset Health"],"number":195561,"url":"https://github.com/elastic/kibana/pull/195561","mergeCommit":{"message":"[Dataset Quality] Add fix it flow for field limit (#195561)\n\n## Summary\r\n\r\nCloses - https://github.com/elastic/kibana/issues/190330\r\n\r\nThis PR implements the logic to support \r\n\r\n- One click increasing of Field Limit for Field Limit Issues (applicable\r\non for Integrations). For Non Integrations, only text is displayed as to\r\nhow they can do it.\r\n- The One click increase updates the linked custom component template as\r\nwell as the last backing Index\r\n- If Last Backing Index update fails due to any reason, it provides user\r\nan option to trigger a Rollover manually.\r\n\r\n## Demo\r\n\r\nNot possible, to many things to display 😆 \r\n\r\n## What's Pending ?\r\n\r\nTests\r\n\r\n- [x] API tests\r\n - [x] Settings API\r\n - [x] Rollover API\r\n - [x] Apply New limit API\r\n- [x] FTR tests\r\n- [x] Displaying of various issues for integrations and non integrations\r\n - [x] Fix it Flow Good case, without Rollover\r\n - [x] Fix it Flow Good case, with Rollover\r\n- [x] Manual Mitigation - Click on Component Template shold navigate to\r\nproper logic based on Integration / Non\r\n - [x] Manual Mitigation - Ingest Pipeline\r\n - [x] Link for official Documentation\r\n \r\n ## How to setup a local environment\r\n \r\nWe will be setting up 2 different data streams, one with integration and\r\none without. Please follow the steps in the exact order\r\n \r\n1. Start Local ES and Local Kibana\r\n2. Install Nginx Integration 1st\r\n3. Ingest data as per script here -\r\nhttps://gist.github.com/achyutjhunjhunwala/03ea29190c6594544f584d2f0efa71e5\r\n4. Set the Limit for the 2 datasets\r\n\r\n```\r\nPUT logs-synth.3-default/_settings\r\n{\r\n \"mapping.total_fields.limit\": 36\r\n}\r\n\r\n// Set the limit for Nginx\r\nPUT logs-nginx.access-default/_settings\r\n{\r\n \"mapping.total_fields.limit\": 52\r\n}\r\n```\r\n\r\n5. Now uncomment line number 59 from the synthtrace script to enable\r\ncloud.project.id field and run the scenario again\r\n6. Do a Rollover\r\n\r\n```\r\nPOST logs-synth.3-default/_rollover\r\nPOST logs-nginx.access-default/_rollover\r\n```\r\n\r\n7. Get last backing index for both dataset\r\n\r\n```\r\nGET _data_stream/logs-synth.3-default/\r\nGET _data_stream/logs-nginx.access-default\r\n```\r\n\r\n8. Increase the Limit by 1 but for last backing index\r\n\r\n```\r\nPUT .ds-logs-synth.3-default-2024.10.10-000002/_settings\r\n{\r\n \"mapping.total_fields.limit\": 37\r\n}\r\n\r\nPUT .ds-logs-nginx.access-default-2024.10.10-000002/_settings\r\n{\r\n \"mapping.total_fields.limit\": 53\r\n}\r\n```\r\n\r\n9. Run the same Synthtrace scenario again.\r\n\r\nThis setup will give you 3 fields for testings\r\n\r\n1. cloud.availability_zone - Which will show the character limit isue\r\n2. cloud.project - Which will show an obsolete error which happened in\r\nthe past and now does not exists due to field limit\r\n3. cloud.project.id - A current field limit issue\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com>\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"3ece9501560ae18bb6c5993db7cc889a6675857c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195561","number":195561,"mergeCommit":{"message":"[Dataset Quality] Add fix it flow for field limit (#195561)\n\n## Summary\r\n\r\nCloses - https://github.com/elastic/kibana/issues/190330\r\n\r\nThis PR implements the logic to support \r\n\r\n- One click increasing of Field Limit for Field Limit Issues (applicable\r\non for Integrations). For Non Integrations, only text is displayed as to\r\nhow they can do it.\r\n- The One click increase updates the linked custom component template as\r\nwell as the last backing Index\r\n- If Last Backing Index update fails due to any reason, it provides user\r\nan option to trigger a Rollover manually.\r\n\r\n## Demo\r\n\r\nNot possible, to many things to display 😆 \r\n\r\n## What's Pending ?\r\n\r\nTests\r\n\r\n- [x] API tests\r\n - [x] Settings API\r\n - [x] Rollover API\r\n - [x] Apply New limit API\r\n- [x] FTR tests\r\n- [x] Displaying of various issues for integrations and non integrations\r\n - [x] Fix it Flow Good case, without Rollover\r\n - [x] Fix it Flow Good case, with Rollover\r\n- [x] Manual Mitigation - Click on Component Template shold navigate to\r\nproper logic based on Integration / Non\r\n - [x] Manual Mitigation - Ingest Pipeline\r\n - [x] Link for official Documentation\r\n \r\n ## How to setup a local environment\r\n \r\nWe will be setting up 2 different data streams, one with integration and\r\none without. Please follow the steps in the exact order\r\n \r\n1. Start Local ES and Local Kibana\r\n2. Install Nginx Integration 1st\r\n3. Ingest data as per script here -\r\nhttps://gist.github.com/achyutjhunjhunwala/03ea29190c6594544f584d2f0efa71e5\r\n4. Set the Limit for the 2 datasets\r\n\r\n```\r\nPUT logs-synth.3-default/_settings\r\n{\r\n \"mapping.total_fields.limit\": 36\r\n}\r\n\r\n// Set the limit for Nginx\r\nPUT logs-nginx.access-default/_settings\r\n{\r\n \"mapping.total_fields.limit\": 52\r\n}\r\n```\r\n\r\n5. Now uncomment line number 59 from the synthtrace script to enable\r\ncloud.project.id field and run the scenario again\r\n6. Do a Rollover\r\n\r\n```\r\nPOST logs-synth.3-default/_rollover\r\nPOST logs-nginx.access-default/_rollover\r\n```\r\n\r\n7. Get last backing index for both dataset\r\n\r\n```\r\nGET _data_stream/logs-synth.3-default/\r\nGET _data_stream/logs-nginx.access-default\r\n```\r\n\r\n8. Increase the Limit by 1 but for last backing index\r\n\r\n```\r\nPUT .ds-logs-synth.3-default-2024.10.10-000002/_settings\r\n{\r\n \"mapping.total_fields.limit\": 37\r\n}\r\n\r\nPUT .ds-logs-nginx.access-default-2024.10.10-000002/_settings\r\n{\r\n \"mapping.total_fields.limit\": 53\r\n}\r\n```\r\n\r\n9. Run the same Synthtrace scenario again.\r\n\r\nThis setup will give you 3 fields for testings\r\n\r\n1. cloud.availability_zone - Which will show the character limit isue\r\n2. cloud.project - Which will show an obsolete error which happened in\r\nthe past and now does not exists due to field limit\r\n3. cloud.project.id - A current field limit issue\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani01@gmail.com>\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"3ece9501560ae18bb6c5993db7cc889a6675857c"}}]}] BACKPORT-->
Summary
Closes #190330
This PR implements the logic to support
Demo
Not possible, to many things to display 😆
What's Pending ?
Tests
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
This setup will give you 3 fields for testings