-
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
[Advanced Settings] Replace old settings components in Observability apps #174712
[Advanced Settings] Replace old settings components in Observability apps #174712
Conversation
/ci |
…b.com/ElenaStoeva/kibana into settings/replace-observability-usages
/ci |
/ci |
/ci |
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
buildkite build this |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: cc @ElenaStoeva |
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.
limits.yml
only
## Summary In #174712, we integrated the new settings field component into the Universal profiling settings. The new setting field supports validation on the user input, based on the schema of the given setting. Since some of the Universal profiling settings have schema with specified restrictions, which were not enforced in the UI before, this PR adds schema validation so that they are enforced. **Settings with `schema` restrictions:** [observability:profilingCo2PerKWH](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L492): >= 0 [observability:profilingDatacenterPUE](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L469): >=0 [observability:profilingPerVCPUWattX86](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L425): >=0 [observability:profilingPervCPUWattArm64](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L440): >=0 [observability:profilingAWSCostDiscountRate](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L501): >=0 and <=100 [observability:profilingCostPervCPUPerHour](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L523): >=0 and <=100 <img width="1147" alt="Screenshot 2024-01-31 at 14 08 10" src="https://github.com/elastic/kibana/assets/59341489/ace8da2e-ae0b-4d94-997b-bec3534a4bfe"> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary In #174712, we integrated the new settings field component into APM General settings. The new setting field supports validation on the user input, based on the `schema` of the given setting. Since some of the APM General settings have `schema` with specified restrictions, which were not enforced in the UI before, this PR adds schema validation so that they are enforced. Note that this validation adds some performance overhead as it sends a request to the server (to the `internal/kibana/settings/validate` endpoint) for every user input change. It's up to the team to decide whether you think that is okay for the app and whether validation for these settings is really beneficial to have. **Settings with `schema` restrictions:** [apmServiceGroupMaxNumberOfServices](https://github.com/elastic/kibana/blob/b4d93fc145c3c09eb1096c610b7cd736f19f6a3a/x-pack/plugins/observability/server/ui_settings.ts#L189) (currently input value `0` is not validated but a fix is coming with #175957): <img width="1071" alt="Screenshot 2024-01-31 at 08 57 58" src="https://github.com/elastic/kibana/assets/59341489/35d9a4fc-4641-4603-97f9-9fbc1a76a778"> [observability:apmAWSLambdaPriceFactor](https://github.com/elastic/kibana/blob/b4d93fc145c3c09eb1096c610b7cd736f19f6a3a/x-pack/plugins/observability/server/ui_settings.ts#L315): <img width="1071" alt="Screenshot 2024-01-31 at 08 58 39" src="https://github.com/elastic/kibana/assets/59341489/810948f5-134a-49ec-8d6e-b15ea7896624"> [observability:apmAWSLambdaRequestCostPerMillion](https://github.com/elastic/kibana/blob/b4d93fc145c3c09eb1096c610b7cd736f19f6a3a/x-pack/plugins/observability/server/ui_settings.ts#L326): <img width="1071" alt="Screenshot 2024-01-31 at 08 59 36" src="https://github.com/elastic/kibana/assets/59341489/269c0a3c-d257-43b7-bcf7-2e10dffdb0b3"> **Bottom bar when there are invalid changes:** <img width="1084" alt="Screenshot 2024-01-31 at 09 04 57" src="https://github.com/elastic/kibana/assets/59341489/1d6a44a2-2659-421b-84b4-44fc693a645b">
## Summary In elastic#174712, we integrated the new settings field component into the Universal profiling settings. The new setting field supports validation on the user input, based on the schema of the given setting. Since some of the Universal profiling settings have schema with specified restrictions, which were not enforced in the UI before, this PR adds schema validation so that they are enforced. **Settings with `schema` restrictions:** [observability:profilingCo2PerKWH](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L492): >= 0 [observability:profilingDatacenterPUE](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L469): >=0 [observability:profilingPerVCPUWattX86](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L425): >=0 [observability:profilingPervCPUWattArm64](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L440): >=0 [observability:profilingAWSCostDiscountRate](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L501): >=0 and <=100 [observability:profilingCostPervCPUPerHour](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L523): >=0 and <=100 <img width="1147" alt="Screenshot 2024-01-31 at 14 08 10" src="https://github.com/elastic/kibana/assets/59341489/ace8da2e-ae0b-4d94-997b-bec3534a4bfe"> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary In elastic#174712, we integrated the new settings field component into APM General settings. The new setting field supports validation on the user input, based on the `schema` of the given setting. Since some of the APM General settings have `schema` with specified restrictions, which were not enforced in the UI before, this PR adds schema validation so that they are enforced. Note that this validation adds some performance overhead as it sends a request to the server (to the `internal/kibana/settings/validate` endpoint) for every user input change. It's up to the team to decide whether you think that is okay for the app and whether validation for these settings is really beneficial to have. **Settings with `schema` restrictions:** [apmServiceGroupMaxNumberOfServices](https://github.com/elastic/kibana/blob/b4d93fc145c3c09eb1096c610b7cd736f19f6a3a/x-pack/plugins/observability/server/ui_settings.ts#L189) (currently input value `0` is not validated but a fix is coming with elastic#175957): <img width="1071" alt="Screenshot 2024-01-31 at 08 57 58" src="https://github.com/elastic/kibana/assets/59341489/35d9a4fc-4641-4603-97f9-9fbc1a76a778"> [observability:apmAWSLambdaPriceFactor](https://github.com/elastic/kibana/blob/b4d93fc145c3c09eb1096c610b7cd736f19f6a3a/x-pack/plugins/observability/server/ui_settings.ts#L315): <img width="1071" alt="Screenshot 2024-01-31 at 08 58 39" src="https://github.com/elastic/kibana/assets/59341489/810948f5-134a-49ec-8d6e-b15ea7896624"> [observability:apmAWSLambdaRequestCostPerMillion](https://github.com/elastic/kibana/blob/b4d93fc145c3c09eb1096c610b7cd736f19f6a3a/x-pack/plugins/observability/server/ui_settings.ts#L326): <img width="1071" alt="Screenshot 2024-01-31 at 08 59 36" src="https://github.com/elastic/kibana/assets/59341489/269c0a3c-d257-43b7-bcf7-2e10dffdb0b3"> **Bottom bar when there are invalid changes:** <img width="1084" alt="Screenshot 2024-01-31 at 09 04 57" src="https://github.com/elastic/kibana/assets/59341489/1d6a44a2-2659-421b-84b4-44fc693a645b">
…apps (elastic#174712) Addresses elastic#172922 ## Summary The `src/plugins/advanced_settings` plugin will soon be removed and completely replaced by the new settings packages: `packages/kbn-management/settings`. This PR replaces the usages of the old Advanced settings component across the Observability apps **APM, Infrastructure, and Universal Profiling**. <img width="1609" alt="Screenshot 2024-01-11 at 16 40 35" src="https://github.com/elastic/kibana/assets/59341489/7123fb63-f21a-4d8e-98e2-75374241f49a"> <img width="1609" alt="Screenshot 2024-01-11 at 16 38 12" src="https://github.com/elastic/kibana/assets/59341489/8477c3ee-18f3-4401-bc3a-433f544528e6"> <!--- ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### 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](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ---> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary In elastic#174712, we integrated the new settings field component into the Universal profiling settings. The new setting field supports validation on the user input, based on the schema of the given setting. Since some of the Universal profiling settings have schema with specified restrictions, which were not enforced in the UI before, this PR adds schema validation so that they are enforced. **Settings with `schema` restrictions:** [observability:profilingCo2PerKWH](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L492): >= 0 [observability:profilingDatacenterPUE](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L469): >=0 [observability:profilingPerVCPUWattX86](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L425): >=0 [observability:profilingPervCPUWattArm64](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L440): >=0 [observability:profilingAWSCostDiscountRate](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L501): >=0 and <=100 [observability:profilingCostPervCPUPerHour](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L523): >=0 and <=100 <img width="1147" alt="Screenshot 2024-01-31 at 14 08 10" src="https://github.com/elastic/kibana/assets/59341489/ace8da2e-ae0b-4d94-997b-bec3534a4bfe"> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary In elastic#174712, we integrated the new settings field component into APM General settings. The new setting field supports validation on the user input, based on the `schema` of the given setting. Since some of the APM General settings have `schema` with specified restrictions, which were not enforced in the UI before, this PR adds schema validation so that they are enforced. Note that this validation adds some performance overhead as it sends a request to the server (to the `internal/kibana/settings/validate` endpoint) for every user input change. It's up to the team to decide whether you think that is okay for the app and whether validation for these settings is really beneficial to have. **Settings with `schema` restrictions:** [apmServiceGroupMaxNumberOfServices](https://github.com/elastic/kibana/blob/b4d93fc145c3c09eb1096c610b7cd736f19f6a3a/x-pack/plugins/observability/server/ui_settings.ts#L189) (currently input value `0` is not validated but a fix is coming with elastic#175957): <img width="1071" alt="Screenshot 2024-01-31 at 08 57 58" src="https://github.com/elastic/kibana/assets/59341489/35d9a4fc-4641-4603-97f9-9fbc1a76a778"> [observability:apmAWSLambdaPriceFactor](https://github.com/elastic/kibana/blob/b4d93fc145c3c09eb1096c610b7cd736f19f6a3a/x-pack/plugins/observability/server/ui_settings.ts#L315): <img width="1071" alt="Screenshot 2024-01-31 at 08 58 39" src="https://github.com/elastic/kibana/assets/59341489/810948f5-134a-49ec-8d6e-b15ea7896624"> [observability:apmAWSLambdaRequestCostPerMillion](https://github.com/elastic/kibana/blob/b4d93fc145c3c09eb1096c610b7cd736f19f6a3a/x-pack/plugins/observability/server/ui_settings.ts#L326): <img width="1071" alt="Screenshot 2024-01-31 at 08 59 36" src="https://github.com/elastic/kibana/assets/59341489/269c0a3c-d257-43b7-bcf7-2e10dffdb0b3"> **Bottom bar when there are invalid changes:** <img width="1084" alt="Screenshot 2024-01-31 at 09 04 57" src="https://github.com/elastic/kibana/assets/59341489/1d6a44a2-2659-421b-84b4-44fc693a645b">
## Summary In elastic#174712, we integrated the new settings field component into the Universal profiling settings. The new setting field supports validation on the user input, based on the schema of the given setting. Since some of the Universal profiling settings have schema with specified restrictions, which were not enforced in the UI before, this PR adds schema validation so that they are enforced. **Settings with `schema` restrictions:** [observability:profilingCo2PerKWH](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L492): >= 0 [observability:profilingDatacenterPUE](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L469): >=0 [observability:profilingPerVCPUWattX86](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L425): >=0 [observability:profilingPervCPUWattArm64](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L440): >=0 [observability:profilingAWSCostDiscountRate](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L501): >=0 and <=100 [observability:profilingCostPervCPUPerHour](https://github.com/elastic/kibana/blob/9ee7b79d20e982eaae96c0b803ff2d17f98bbfcc/x-pack/plugins/observability/server/ui_settings.ts#L523): >=0 and <=100 <img width="1147" alt="Screenshot 2024-01-31 at 14 08 10" src="https://github.com/elastic/kibana/assets/59341489/ace8da2e-ae0b-4d94-997b-bec3534a4bfe"> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary In elastic#174712, we integrated the new settings field component into APM General settings. The new setting field supports validation on the user input, based on the `schema` of the given setting. Since some of the APM General settings have `schema` with specified restrictions, which were not enforced in the UI before, this PR adds schema validation so that they are enforced. Note that this validation adds some performance overhead as it sends a request to the server (to the `internal/kibana/settings/validate` endpoint) for every user input change. It's up to the team to decide whether you think that is okay for the app and whether validation for these settings is really beneficial to have. **Settings with `schema` restrictions:** [apmServiceGroupMaxNumberOfServices](https://github.com/elastic/kibana/blob/b4d93fc145c3c09eb1096c610b7cd736f19f6a3a/x-pack/plugins/observability/server/ui_settings.ts#L189) (currently input value `0` is not validated but a fix is coming with elastic#175957): <img width="1071" alt="Screenshot 2024-01-31 at 08 57 58" src="https://github.com/elastic/kibana/assets/59341489/35d9a4fc-4641-4603-97f9-9fbc1a76a778"> [observability:apmAWSLambdaPriceFactor](https://github.com/elastic/kibana/blob/b4d93fc145c3c09eb1096c610b7cd736f19f6a3a/x-pack/plugins/observability/server/ui_settings.ts#L315): <img width="1071" alt="Screenshot 2024-01-31 at 08 58 39" src="https://github.com/elastic/kibana/assets/59341489/810948f5-134a-49ec-8d6e-b15ea7896624"> [observability:apmAWSLambdaRequestCostPerMillion](https://github.com/elastic/kibana/blob/b4d93fc145c3c09eb1096c610b7cd736f19f6a3a/x-pack/plugins/observability/server/ui_settings.ts#L326): <img width="1071" alt="Screenshot 2024-01-31 at 08 59 36" src="https://github.com/elastic/kibana/assets/59341489/269c0a3c-d257-43b7-bcf7-2e10dffdb0b3"> **Bottom bar when there are invalid changes:** <img width="1084" alt="Screenshot 2024-01-31 at 09 04 57" src="https://github.com/elastic/kibana/assets/59341489/1d6a44a2-2659-421b-84b4-44fc693a645b">
Addresses #172922
Summary
The
src/plugins/advanced_settings
plugin will soon be removed and completely replaced by the new settings packages:packages/kbn-management/settings
. This PR replaces the usages of the old Advanced settings component across the Observability apps APM, Infrastructure, and Universal Profiling.