-
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
EUI Refresh Testing and Theme Updates #202382
Conversation
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
import { RiskSeverity } from '../../../../../common/search_strategy'; | ||
import { RiskScoreLevel } from '.'; | ||
import { SEVERITY_COLOR } from '../../../../overview/components/detection_response/utils'; | ||
import { RISK_SEVERITY_COLOUR } from '../../../common/utils'; |
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.
Updated from SEVERITY_COLOR to the RISK_SEVERITY_COLOUR constant for consistency, aligning the test with the current implementation. This also removes dependency on euiThemeVars. All related constants have been updated as well.
61be698
to
1fd0123
Compare
…2679) - Closes elastic#196501 ## Summary The PR removes `discover:searchFieldsFromSource` Advanced Setting and the associated code. This breaking change is planned for v9. The setting was marked as deprecated in v8.15 elastic#185871 ### Checklist - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [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 - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
…c#202607) ## Summary **Reviewers: Please test the code paths affected by this PR. See the "Risks" section below.** Part of work for enabling "high contrast mode" in Kibana. See elastic#176219 **Background:** Kibana will soon have a user profile setting to allow users to enable "high contrast mode." This setting will activate a flag with `<EuiProvider>` that causes EUI components to render with higher contrast visual elements. Consumer plugins and packages need to be updated selected places where `<EuiProvider>` is wrapped, to pass the `UserProfileService` service dependency from the CoreStart contract. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [X] [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 - [X] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ### Risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [medium/high] The implementor of this change did not manually test the affected code paths and relied on type-checking and functional tests to drive the changes. Code owners for this PR need to manually test the affected code paths. - [ ] [medium] The `UserProfileService` dependency comes from the CoreStart contract. If acquiring the service causes synchronous code to become asynchronous, check for race conditions or errors in rendering React components. Code owners for this PR need to manually test the affected code paths.
…entities` (elastic#202713) ## Summary This PR aims at relocating some of the Kibana modules (plugins and packages) into a new folder structure, according to the _Sustainable Kibana Architecture_ initiative. > [!IMPORTANT] > * We kindly ask you to: > * Manually fix the errors in the error section below (if there are any). > * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the source code (Babel and Eslint config files), and update them appropriately. > * Manually review `.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that any CI pipeline customizations continue to be correctly applied after the changed path names > * Review all of the updated files, specially the `.ts` and `.js` files listed in the sections below, as some of them contain relative paths that have been updated. > * Think of potential impact of the move, including tooling and configuration files that can be pointing to the relocated modules. E.g.: > * customised eslint rules > * docs pointing to source code > [!NOTE] > This PR has been auto-generated. > Do not attempt to push any changes unless you know what you are doing. > Please use [#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E) Slack channel for feedback. #### 3 plugin(s) are going to be relocated: | Id | Target folder | | -- | ------------- | | `@kbn/entities-data-access-plugin` | `x-pack/solutions/observability/plugins/observability_solution/entities_data_access` | | `@kbn/entityManager-app-plugin` | `x-pack/solutions/observability/plugins/observability_solution/entity_manager_app` | | `@kbn/entityManager-plugin` | `x-pack/platform/plugins/shared/entity_manager` | #### 1 package(s) are going to be relocated: | Id | Target folder | | -- | ------------- | | `@kbn/entities-schema` | `x-pack/platform/packages/shared/kbn-entities-schema` | <details> <summary>Updated references</summary> ``` ./docs/developer/plugin-list.asciidoc ./package.json ./packages/kbn-repo-packages/package-map.json ./packages/kbn-ts-projects/config-paths.json ./tsconfig.base.json ./x-pack/platform/packages/shared/kbn-entities-schema/jest.config.js ./x-pack/platform/plugins/shared/entity_manager/jest.config.js ./x-pack/plugins/entity_manager/docs/entity_definitions.md ./x-pack/solutions/observability/plugins/observability_solution/entities_data_access/jest.config.js ./x-pack/solutions/observability/plugins/observability_solution/entity_manager_app/jest.config.js ./yarn.lock ``` </details> <details> <summary>Updated relative paths</summary> ``` x-pack/platform/packages/shared/kbn-entities-schema/jest.config.js:10 x-pack/platform/packages/shared/kbn-entities-schema/scripts/generate.js:8 x-pack/platform/packages/shared/kbn-entities-schema/scripts/generate_oas.js:65 x-pack/platform/packages/shared/kbn-entities-schema/scripts/generate_oas.js:8 x-pack/platform/packages/shared/kbn-entities-schema/scripts/serve_oas_ui.js:8 x-pack/platform/packages/shared/kbn-entities-schema/tsconfig.json:2 x-pack/platform/plugins/shared/entity_manager/jest.config.js:10 x-pack/platform/plugins/shared/entity_manager/tsconfig.json:2 x-pack/platform/plugins/shared/entity_manager/tsconfig.json:7 x-pack/solutions/observability/plugins/observability_solution/entities_data_access/jest.config.js:12 x-pack/solutions/observability/plugins/observability_solution/entities_data_access/tsconfig.json:2 x-pack/solutions/observability/plugins/observability_solution/entity_manager_app/jest.config.js:12 x-pack/solutions/observability/plugins/observability_solution/entity_manager_app/tsconfig.json:2 x-pack/solutions/observability/plugins/observability_solution/entity_manager_app/tsconfig.json:7 ``` </details> <details> <summary>Script errors</summary> ``` ``` </details> --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Rudolf Meijering <[email protected]>
…#203244) ## Summary Hiding this until it can be fixed via elastic#201805 !! <img width="1341" alt="image" src="https://github.com/user-attachments/assets/64d86aca-9c0e-4e94-9449-5f6a1c6a3288">
… request headers for Kibana 9.0 (elastic#203188)
…er (elastic#203303) ## Summary Addresses: elastic#202606 (comment) This discards the > unused portions of core, before adding them to the context value, but still allow people to pass the entire construct if we were to need something else cc @clintandrewhall ---- ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. **none** ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. **none** --------- Co-authored-by: kibanamachine <[email protected]>
## Summary Combine some Renovate groups. Disable TS group. Closes elastic#189415. Disable Webpack group until elastic#191106 is finished.
…ated and freezing is unavailable (elastic#198746) ## Summary Remove the `unfreeze` test since the api is deprecated and its essentially a noop. More info - https://www.elastic.co/guide/en/elasticsearch/reference/current/unfreeze-index-api.html
… details (elastic#11360) (elastic#203035) ## Summary [Internal link](elastic/security-team#10820) to the feature details These changes add functionality that allows to display matched prebuilt rules details. ### New route There is a new route `/internal/siem_migrations/rules/{migration_id}/prebuilt_rules` that will return all prebuilt rules matched by translated rules within a specific migration. ### UI changes The rule migration details flyout was updated to display matched prebuilt rule data in both `Translation` and `Overview` tabs. https://github.com/user-attachments/assets/3da49653-e0ab-4d8b-892e-dd05cf73743b ### Other changes Also, as part of this PR, batching of a rule installation/creation was added. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Sergi Massaneda <[email protected]>
Closes [elastic#148241](elastic#148241) ## Summary This PR introduces a few changes in the snapshot and restore plugin. #### Snapshots tab * The state column has been aded to the table * In the detail flyout, it has been changed the way in which the status is displayed (icon and text). * No new test needed since this info was already there. The related tests have been updated. <table> <tr> <td style="padding-right: 10px;"> <img alt="Screenshot 2024-11-27 at 15 17 03" src="https://github.com/user-attachments/assets/92b5c5cf-d90b-454c-9cf7-2eb101562c5f"> </td> <td> <img alt="Screenshot 2024-11-27 at 15 54 32" src="https://github.com/user-attachments/assets/62395bad-4c70-44bb-84b3-c8a30ae9278a"> </td> </tr> </table> #### Policies tab * The copy of the callout for warning that two or more policies have the same schedule has been changed. For testing that, you need to have two or more policies that have the same time por execution. No test added for this, is only a copy change [[code](https://github.com/elastic/kibana/pull/199622/files#diff-e8e12f0dfdc97e4e064f8a07965312c8c91ca66578bdcaf5ee807e879cebcb6eR207)] <img width="1249" alt="Screenshot 2024-11-27 at 15 17 25" src="https://github.com/user-attachments/assets/5417910f-573a-4c22-a5e2-44ec2ce256b3"> * A new callout has been added to warn that the SLM status is different from “running”. SLM status is "running" by default, but it could happen that the user stop it for any reason and then does not restart it. This causes policies not to run when they are scheduled. To known the SLM status a new api call has been introduced (`GET _slm/status`). * I've created a new doc link to https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html * I've added new tests for the new api call. <img width="1246" alt="Screenshot 2024-11-27 at 15 59 56" src="https://github.com/user-attachments/assets/cd5ae491-16a4-4a68-a223-f44ce398ac2f"> ## Testing You will need to have at least one policy to test this. For that, you can run Elastic using the following: ``` yarn es snapshot --license=trial -E path.repo=/tmp/es-backups ``` From the console, you can add a repository (you can also do it from the UI): ``` PUT /_snapshot/my_backup { "type": "fs", "settings": { "location": "/tmp/es-backups", "chunk_size": "10mb" } } ```` And for creating a policy you can run this: ``` PUT _slm/policy/nightly-snapshots { "schedule": "0 30 1 * * ?", "name": "<nightly-snap-{now/d}>", "repository": "my_backup1", "retention": { "expire_after": "30d", "min_count": 5, "max_count": 50 } } ``` SLM status should be started by default (unless you have stopped it). For starting it you can use `POST /_slm/start` and for stop it `POST /_slm/stop` ## Demo https://github.com/user-attachments/assets/b83cd3ba-4821-4295-87f2-ecf427ec46e0 --------- Co-authored-by: shainaraskas <[email protected]>
…lastic#203106) ## Release note Use Data stream name for data_stream.dataset value in input manifests ## Summary Closes elastic#201478 This PR uses the user-supplied data stream name as the `data_stream.dataset` value instead of a generic placeholder. Custom Fleet integrations default to a generic dataset (data_stream.dataset) value - something like `http_endpoint.generic.` Since users configure their own options for a custom integration, this workflow makes sense. Elastic integrations, on the other hand, default to a predetermined naming convention based on the integration package + datastream name for dataset - something like github.issues for the issues data stream from the Github package. Hence defaulting it to `package_name.datastream_name` <img width="729" alt="Screenshot 2024-12-05 at 15 12 32" src="https://github.com/user-attachments/assets/2dad5de3-a329-403f-be46-2dbc76906b03"> <img width="868" alt="Screenshot 2024-12-05 at 15 12 16" src="https://github.com/user-attachments/assets/2959e26a-8095-4efa-bf9b-c5e953e849b9"> ### Checklist Check the PR satisfies following conditions. - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
…na-esql` (elastic#202722) ## Summary This PR aims at relocating some of the Kibana modules (plugins and packages) into a new folder structure, according to the _Sustainable Kibana Architecture_ initiative. > [!IMPORTANT] > * We kindly ask you to: > * Manually fix the errors in the error section below (if there are any). > * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the source code (Babel and Eslint config files), and update them appropriately. > * Manually review `.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that any CI pipeline customizations continue to be correctly applied after the changed path names > * Review all of the updated files, specially the `.ts` and `.js` files listed in the sections below, as some of them contain relative paths that have been updated. > * Think of potential impact of the move, including tooling and configuration files that can be pointing to the relocated modules. E.g.: > * customised eslint rules > * docs pointing to source code > [!NOTE] > This PR has been auto-generated. > Do not attempt to push any changes unless you know what you are doing. > Please use [#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E) Slack channel for feedback. #### 2 plugin(s) are going to be relocated: | Id | Target folder | | -- | ------------- | | `@kbn/esql` | `src/platform/plugins/shared/esql` | | `@kbn/esql-datagrid` | `src/platform/plugins/shared/esql_datagrid` | #### 5 package(s) are going to be relocated: | Id | Target folder | | -- | ------------- | | `@kbn/esql-ast` | `src/platform/packages/shared/kbn-esql-ast` | | `@kbn/esql-editor` | `src/platform/packages/private/kbn-esql-editor` | | `@kbn/esql-utils` | `src/platform/packages/shared/kbn-esql-utils` | | `@kbn/esql-validation-autocomplete` | `src/platform/packages/shared/kbn-esql-validation-autocomplete` | | `@kbn/language-documentation` | `src/platform/packages/private/kbn-language-documentation` | <details> <summary>Updated references</summary> ``` ./.buildkite/scripts/steps/esql_generate_function_metadata.sh ./.buildkite/scripts/steps/esql_grammar_sync.sh ./.eslintignore ./.eslintrc.js ./.i18nrc.json ./docs/developer/plugin-list.asciidoc ./examples/esql_ast_inspector/public/plugin.ts ./examples/esql_validation_example/public/plugin.ts ./package.json ./packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts ./packages/kbn-monaco/BUILD.bazel ./packages/kbn-repo-packages/package-map.json ./packages/kbn-ts-projects/config-paths.json ./packages/kbn-ui-shared-deps-src/BUILD.bazel ./src/dev/storybook/aliases.ts ./src/platform/packages/private/kbn-esql-editor/jest.config.js ./src/platform/packages/private/kbn-language-documentation/jest.config.js ./src/platform/packages/private/kbn-language-documentation/package.json ./src/platform/packages/shared/kbn-esql-ast/jest.config.js ./src/platform/packages/shared/kbn-esql-utils/jest.config.js ./src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md ./src/platform/packages/shared/kbn-esql-validation-autocomplete/jest.config.js ./src/platform/packages/shared/kbn-esql-validation-autocomplete/jest.integration.config.js ./src/platform/packages/shared/kbn-esql-validation-autocomplete/package.json ./src/platform/packages/shared/kbn-esql-validation-autocomplete/src/autocomplete/helper.ts ./src/platform/plugins/shared/esql/jest.config.js ./src/platform/plugins/shared/esql_datagrid/jest.config.js ./tsconfig.base.json ./yarn.lock ``` </details> <details> <summary>Updated relative paths</summary> ``` src/platform/packages/private/kbn-esql-editor/jest.config.js:12 src/platform/packages/private/kbn-esql-editor/tsconfig.json:2 src/platform/packages/private/kbn-language-documentation/jest.config.js:12 src/platform/packages/private/kbn-language-documentation/package.json:12 src/platform/packages/private/kbn-language-documentation/tsconfig.json:2 src/platform/packages/shared/kbn-esql-ast/jest.config.js:12 src/platform/packages/shared/kbn-esql-ast/tsconfig.json:2 src/platform/packages/shared/kbn-esql-utils/jest.config.js:12 src/platform/packages/shared/kbn-esql-utils/tsconfig.json:2 src/platform/packages/shared/kbn-esql-validation-autocomplete/jest.config.js:12 src/platform/packages/shared/kbn-esql-validation-autocomplete/jest.integration.config.js:12 src/platform/packages/shared/kbn-esql-validation-autocomplete/package.json:10 src/platform/packages/shared/kbn-esql-validation-autocomplete/package.json:11 src/platform/packages/shared/kbn-esql-validation-autocomplete/scripts/generate_function_definitions.ts:389 src/platform/packages/shared/kbn-esql-validation-autocomplete/tsconfig.json:2 src/platform/plugins/shared/esql/jest.config.js:12 src/platform/plugins/shared/esql/tsconfig.json:2 src/platform/plugins/shared/esql/tsconfig.json:7 src/platform/plugins/shared/esql_datagrid/jest.config.js:12 src/platform/plugins/shared/esql_datagrid/tsconfig.json:2 src/platform/plugins/shared/esql_datagrid/tsconfig.json:7 ``` </details> <details> <summary>Script errors</summary> ``` ``` </details> --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Rudolf Meijering <[email protected]>
…on (elastic#203374) ## Summary This PR disables the _Elastic managed_ and _Self-managed_ setup options after clicking the _Generate configuration_ button in order to avoid the error described in this ticket elastic/search-team#8665 when changing deployment method after generating the config. ![CleanShot 2024-12-09 at 10 32 08@2x](https://github.com/user-attachments/assets/dafea7ac-5d50-44a0-a59d-03ee29043dec)
… (elastic#199286) ## Summary Closes elastic#183245 Closes elastic#197630 [Observability AI Assistant] Partially migrate to inference client replacing `inferenceClient.chatComplete` to `observabilityAIAssistantClient.chat` - `observabilityAIAssistantClient.complete` does a bunch of stuff on top of `chat`. keepping `observabilityAIAssistantClient.chat` as a wrapper for now because it also adds instrumentation and logging.
…sing a filter (elastic#203003) Closes elastic#202979 ## Summary This PR fixes inconsistencies between the alerts shown on hosts view and inventory and the alerts page. The fix includes using consistent rule types and filters for both getting the alert count and filters applied on the alert page ## How to Test Service Alert ( Inventory ) https://github.com/user-attachments/assets/f3b626da-1a49-42dc-a989-48b13d15ae2c Hosts view (+filters) Alerts (Inventory & Custom Threshold rule) https://github.com/user-attachments/assets/2a490ad4-e2a4-43b5-b00f-d00ac27f9fd3 Single Host https://github.com/user-attachments/assets/7c6a8cf7-f2a2-41f0-9f98-7e7543d4e7d5 cc: @roshan-elastic Ping to check the videos of the fix :)
…ic#202796) ## Summary Graph changes: ![image](https://github.com/user-attachments/assets/54ad563b-9023-4e46-a80c-73ba6b61cf70) This PR focuses on adding the functionality to retrieve currrently available prebuilt rules and create a new index with semantic_text mappings to allow the SIEM migration process to use it for RAG usecases. The below changes are some specific mentions that the PR changes: - Move the creation of the RAG indicies from `/create` to `/start`, also removes the `await` for `prepare` when `/start` is called. - Move all retrievers to a new `retriever` folder, together with a new `RuleMigrationsRetriever` class to encapsulate all the different retrievers at one place. - Adds timeout to integration and prebuilt rule bulk requests to ES because of the possible time it can take to generate initial embeddings. - Move some nodes from Translate Rule subgraph to the main agent graph, as semantic queries are used now for both translate and matching prebuilt.
Part of elastic/kibana-team#1016 (comment) Our plan for React@18 packages upgrade is to let kibana contributors now that we're going to bump React packages couple weeks in advance. In addtion to the final PR with green tests and Kibana deployed, we want to give simple instructions on how to run React@18 locally easilly: This PR allows to quickly toggle between version of React locally without having to do anything beyond an environment variable. `REACT_18=true yarn bootstrap` will alias `react` and `react-dom` to v18 in the build. I check that this works as expected when starting from: - local dev server `yarn start` - local ftr `node scripts/functional_tests_server.js` - local unit tests `REACT_18=true yarn test:jest ...` Please note: - **This PR doesn't implement this switch for dist build, as I don't think we need this for our purposes.** - The plan is that we remove this switch soon after we merge React@18 upgrade to main. In addition to the switch this PR mutes a very noisy warning from React@18 about legacy root `Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17.`. This warning is expected as after we upgrade to React@18 packages (Phase 1) we will be in the process of migrating to the new createRoot API (Phase 2). However, it is very noisy and we want to mute it for now. Co-authored-by: Anton Dosov <[email protected]>
… obs-ux-management-team (elastic#201164) This PR migrates test suites that use `renderHook` from the library `@testing-library/react-hooks` to adopt the equivalent and replacement of `renderHook` from the export that is now available from `@testing-library/react`. This work is required for the planned migration to react18. ## Context In this PR, usages of `waitForNextUpdate` that previously could have been destructured from `renderHook` are now been replaced with `waitFor` exported from `@testing-library/react`, furthermore `waitFor` that would also have been destructured from the same renderHook result is now been replaced with `waitFor` from the export of `@testing-library/react`. ***Why is `waitFor` a sufficient enough replacement for `waitForNextUpdate`, and better for testing values subject to async computations?*** WaitFor will retry the provided callback if an error is returned, till the configured timeout elapses. By default the retry interval is `50ms` with a timeout value of `1000ms` that effectively translates to at least 20 retries for assertions placed within waitFor. See https://testing-library.com/docs/dom-testing-library/api-async/#waitfor for more information. This however means that for person's writing tests, said person has to be explicit about expectations that describe the internal state of the hook being tested. This implies checking for instance when a react query hook is being rendered, there's an assertion that said hook isn't loading anymore. In this PR you'd notice that this pattern has been adopted, with most existing assertions following an invocation of `waitForNextUpdate` being placed within a `waitFor` invocation. In some cases the replacement is simply a `waitFor(() => new Promise((resolve) => resolve(null)))` (many thanks to @kapral18, for point out exactly why this works), where this suffices the assertions that follow aren't placed within a waitFor so this PR doesn't get larger than it needs to be. It's also worth pointing out this PR might also contain changes to test and application code to improve said existing test. ### What to do next? 1. Review the changes in this PR. 2. If you think the changes are correct, approve the PR. ## Any questions? If you have any questions or need help with this PR, please leave comments in this PR. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
… security-generative-ai (elastic#201160) This PR migrates test suites that use `renderHook` from the library `@testing-library/react-hooks` to adopt the equivalent and replacement of `renderHook` from the export that is now available from `@testing-library/react`. This work is required for the planned migration to react18. ## Context In this PR, usages of `waitForNextUpdate` that previously could have been destructured from `renderHook` are now been replaced with `waitFor` exported from `@testing-library/react`, furthermore `waitFor` that would also have been destructured from the same renderHook result is now been replaced with `waitFor` from the export of `@testing-library/react`. ***Why is `waitFor` a sufficient enough replacement for `waitForNextUpdate`, and better for testing values subject to async computations?*** WaitFor will retry the provided callback if an error is returned, till the configured timeout elapses. By default the retry interval is `50ms` with a timeout value of `1000ms` that effectively translates to at least 20 retries for assertions placed within waitFor. See https://testing-library.com/docs/dom-testing-library/api-async/#waitfor for more information. This however means that for person's writing tests, said person has to be explicit about expectations that describe the internal state of the hook being tested. This implies checking for instance when a react query hook is being rendered, there's an assertion that said hook isn't loading anymore. In this PR you'd notice that this pattern has been adopted, with most existing assertions following an invocation of `waitForNextUpdate` being placed within a `waitFor` invocation. In some cases the replacement is simply a `waitFor(() => new Promise((resolve) => resolve(null)))` (many thanks to @kapral18, for point out exactly why this works), where this suffices the assertions that follow aren't placed within a waitFor so this PR doesn't get larger than it needs to be. It's also worth pointing out this PR might also contain changes to test and application code to improve said existing test. ### What to do next? 1. Review the changes in this PR. 2. If you think the changes are correct, approve the PR. ## Any questions? If you have any questions or need help with this PR, please leave comments in this PR. Co-authored-by: Elastic Machine <[email protected]>
- small refactor of _search code which is now resilient to source-level failure. We now return `{ entities: EntityV2[], errors: string[] }` where `errors` lists source failures while still collecting successful sources in `entities` - add integration tests - fixes some issues in the merging logic uncovered by the tests - change metadata aggregation from `VALUES` to `TOP 10` since the former is in tech preview --------- Co-authored-by: kibanamachine <[email protected]>
## Summary Fixes styling popover controls alignment. Fixes elastic#202121 <img width="505" alt="Screenshot 2024-12-03 at 5 30 55 PM" src="https://github.com/user-attachments/assets/a44c2a85-7bac-497c-8354-acab6e48ba38"> ### Checklist - [ ] 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 - [ ] 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 was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Marta Bondyra <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
…ic#203842) ## Summary Pre-requisite to update elastic#202766
## Summary Clean up e2e test helpers
## Summary Commits titles are self-explanatory
… Profiling pages in new solution navigation (elastic#203545) Closes elastic#197401 ### Summary This PR adds ability to preserve `kuery` filters when switching between pages in Universal Profiling using `solution navigation`. The missing filters were considered regression in comparison to `classic navigation`. ### Testing Expected behavior with **classic navigation** for comparison: ![Screen Recording 2024-12-10 at 14 40 26](https://github.com/user-attachments/assets/db066c2e-3a47-4ac1-9860-f00364716c19) Before with **solution navigation**: ![Screen Recording 2024-12-10 at 14 50 21](https://github.com/user-attachments/assets/23481d63-37ee-4983-b8ef-5b3e6da2f55d) After with **solution navigation**: ![Screen Recording 2024-12-10 at 14 45 30](https://github.com/user-attachments/assets/216b6c8d-bfb4-4f32-b4f8-40cf17f5847d)
…ai-assistant` (elastic#202763) ## Summary This PR aims at relocating some of the Kibana modules (plugins and packages) into a new folder structure, according to the _Sustainable Kibana Architecture_ initiative. > [!IMPORTANT] > * We kindly ask you to: > * Manually fix the errors in the error section below (if there are any). > * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the source code (Babel and Eslint config files), and update them appropriately. > * Manually review `.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that any CI pipeline customizations continue to be correctly applied after the changed path names > * Review all of the updated files, specially the `.ts` and `.js` files listed in the sections below, as some of them contain relative paths that have been updated. > * Think of potential impact of the move, including tooling and configuration files that can be pointing to the relocated modules. E.g.: > * customised eslint rules > * docs pointing to source code > [!NOTE] > * This PR has been auto-generated. > * Any manual contributions will be lost if the 'relocate' script is re-run. > * Try to obtain the missing reviews / approvals before applying manual fixes, and/or keep your changes in a .patch / git stash. > * Please use [#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E) Slack channel for feedback. #### 5 plugin(s) are going to be relocated: | Id | Target folder | | -- | ------------- | | `@kbn/ai-assistant-management-plugin` | `src/platform/plugins/shared/ai_assistant_management/selection` | | `@kbn/data-usage-plugin` | `x-pack/platform/plugins/private/data_usage` | | `@kbn/observability-ai-assistant-app-plugin` | `x-pack/solutions/observability/plugins/observability_ai_assistant_app` | | `@kbn/observability-ai-assistant-management-plugin` | `x-pack/solutions/observability/plugins/observability_ai_assistant_management` | | `@kbn/observability-ai-assistant-plugin` | `x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant` | #### 2 packages(s) are going to be relocated: | Id | Target folder | | -- | ------------- | | `@kbn/observability-ai-common` | `x-pack/solutions/observability/packages/observability_ai/observability_ai_common` | | `@kbn/observability-ai-server` | `x-pack/solutions/observability/packages/observability_ai/observability_ai_server` | <details > <summary>Updated references</summary> ``` ./.github/paths-labeller.yml ./.i18nrc.json ./docs/developer/plugin-list.asciidoc ./package.json ./packages/kbn-repo-packages/package-map.json ./packages/kbn-ts-projects/config-paths.json ./src/dev/storybook/aliases.ts ./src/platform/plugins/shared/ai_assistant_management/selection/jest.config.js ./src/platform/plugins/shared/discover/tsconfig.type_check.json ./tsconfig.base.json ./tsconfig.base.type_check.json ./tsconfig.refs.json ./x-pack/.i18nrc.json ./x-pack/platform/plugins/private/data_usage/jest.config.js ./x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/jest.config.js ./x-pack/plugins/enterprise_search/kibana.jsonc ./x-pack/plugins/observability_solution/observability_ai_assistant/server/functions/index.ts ./x-pack/plugins/observability_solution/observability_ai_assistant_app/tsconfig.type_check.json ./x-pack/plugins/search_connectors/kibana.jsonc ./x-pack/solutions/observability/packages/observability_ai/observability_ai_common/jest.config.js ./x-pack/solutions/observability/packages/observability_ai/observability_ai_server/jest.config.js ./x-pack/solutions/observability/plugins/observability_ai_assistant_app/jest.config.js ./x-pack/solutions/observability/plugins/observability_ai_assistant_app/scripts/evaluation/README.md ./x-pack/solutions/observability/plugins/observability_ai_assistant_management/jest.config.js ./x-pack/test/tsconfig.type_check.json ./x-pack/test_serverless/tsconfig.type_check.json ./yarn.lock ``` </details><details > <summary>Updated relative paths</summary> ``` src/platform/plugins/shared/ai_assistant_management/selection/jest.config.js:12 src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.json:2 src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.type_check.json:18 src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.type_check.json:2 src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.type_check.json:21 src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.type_check.json:24 src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.type_check.json:27 src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.type_check.json:30 src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.type_check.json:33 src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.type_check.json:36 src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.type_check.json:39 src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.type_check.json:42 src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.type_check.json:45 src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.type_check.json:48 src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.type_check.json:51 src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.type_check.json:54 src/platform/plugins/shared/ai_assistant_management/selection/tsconfig.type_check.json:57 x-pack/platform/plugins/private/data_usage/jest.config.js:10 x-pack/platform/plugins/private/data_usage/tsconfig.json:11 x-pack/platform/plugins/private/data_usage/tsconfig.json:2 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/jest.config.js:10 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.json:2 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.json:7 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:100 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:103 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:2 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:22 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:25 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:28 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:31 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:34 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:37 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:40 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:43 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:46 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:49 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:52 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:55 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:58 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:61 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:64 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:67 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:70 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:73 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:76 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:79 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:82 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:85 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:88 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:9 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:91 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:94 x-pack/platform/plugins/shared/observability_solution/observability_ai_assistant/tsconfig.type_check.json:97 x-pack/solutions/observability/packages/observability_ai/observability_ai_common/jest.config.js:10 x-pack/solutions/observability/packages/observability_ai/observability_ai_common/tsconfig.json:2 x-pack/solutions/observability/packages/observability_ai/observability_ai_server/jest.config.js:10 x-pack/solutions/observability/packages/observability_ai/observability_ai_server/tsconfig.json:2 x-pack/solutions/observability/plugins/observability_ai_assistant_app/jest.config.js:10 x-pack/solutions/observability/plugins/observability_ai_assistant_app/scripts/evaluation/read_kibana_config.ts:16 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.json:2 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.json:7 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:100 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:103 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:106 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:109 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:112 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:118 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:121 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:124 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:127 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:130 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:133 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:136 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:139 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:142 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:145 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:148 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:151 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:154 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:157 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:160 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:163 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:166 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:169 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:172 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:175 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:178 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:181 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:184 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:190 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:193 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:2 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:22 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:28 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:31 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:34 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:37 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:40 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:43 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:46 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:49 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:52 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:55 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:58 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:61 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:64 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:67 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:70 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:73 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:76 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:79 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:82 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:85 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:88 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:9 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:91 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:94 x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.type_check.json:97 x-pack/solutions/observability/plugins/observability_ai_assistant_management/jest.config.js:10 x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.json:2 x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.type_check.json:18 x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.type_check.json:2 x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.type_check.json:21 x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.type_check.json:24 x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.type_check.json:27 x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.type_check.json:30 x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.type_check.json:33 x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.type_check.json:36 x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.type_check.json:39 x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.type_check.json:45 x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.type_check.json:48 x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.type_check.json:51 x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.type_check.json:54 x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.type_check.json:60 x-pack/solutions/observability/plugins/observability_ai_assistant_management/tsconfig.type_check.json:63 ``` </details>
## Summary Closes elastic/ingest-dev#4324 - Added tour component for Export CSV feature, it goes away on`Close tour` - Removed search in column selection - Tried a few ways to fix the search not to remove the existing selection (see in elastic#203103), but doesn't seem possible with EuiTable. Removed for now as there aren't that many columns, and don't want to leave it in as is. <img width="1772" alt="image" src="https://github.com/user-attachments/assets/464f8247-bc2d-45d5-8fd4-96d790a40833"> <img width="860" alt="image" src="https://github.com/user-attachments/assets/5d3058f0-2e52-4248-af34-0dfa1c149417">
…risk severity updated to use RISK_SEVERITY_COLOUR instead of SEVERITY_COLOUR
1fd0123
to
cee8d6e
Compare
Summary
This PR covers required updates for EUI refresh.
The updates should only cover Entity Owned components.
File Path:
x-pack/plugins/security_solution/public/entity_analytics/*
Serverless File Path:
x-pack/plugins/security_solution_serverless/public/entity_analytics/*
Success and accentSecondary
color tags as per specification
Instances of 'success' tag found are all health / affirmative, semantic meaning and not branding, therefore were not changed to accentSecondary
Instances of 'success' color found in
x-pack/plugins/security_solution/public/entity_analytics/*
:/components/asset_criticality_file_uploader/components/validation_step.tsx
/components/asset_criticality_file_uploader/components/result_step.tsx
/components/risk_score_enable_section.tsx
None found in
x-pack/plugins/security_solution_serverless/public/entity_analytics/*
All usages of JSON tokens have been removed in favor of color tokens, where possible.
More details about each section #199715
Main change:
/x-pack/plugins/security_solution/public/entity_analytics/components/asset_criticality_file_uploader/components/file_picker_step.tsx
Before:
After: