## Summary
As K8S Dashboard is currently hidden on main , the code serves no
purpose other than potentially causing Tech debts whenever a refactor or
a migration happens. As such its better to remove it completely. In case
we want to bring it back later we will just pull it from git history
> [!CAUTION]
> **This should only affect Serverless and Main, 8.x.x should still be
able to see and access K8S Dashboard**
## Related Tickets
- https://github.com/elastic/security-team/issues/11418
- https://github.com/elastic/security-team/issues/10735
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Paulo Silva <paulo.henrique@elastic.co>
Co-authored-by: Maxim Kholod <maxim.kholod@elastic.co>
## Summary
This PR adds `spaceTest` interface to `kbn-scout` to run space aware
tests, that can be executed in parallel. Most of Discover tests were
converted to parallel run because we see runtime improvement with 2
parallel workers.
Experiment 1: **ES data pre-ingested**, running 9 Discover **stateful**
tests in **5 files** locally
| Run setup | Took time |
| ------------- | ------------- |
| 1 worker | `1.3` min |
| 2 workers | `58.7` sec |
| 3 workers | `48.3` sec |
| 4 workers | **tests fail** |
Conclusion: using **2** workers is the optimal solution to continue
Experiment 2: Running Discover tests for stateful/serverless in **Kibana
CI** (starting servers, ingesting ES data, running tests)
| Run setup | 1 worker | 2 workers | diff
| ------------- | ------------- |------------- |------------- |
| stateful, 9 tests / 5 files | `1.7` min | `1.2` min | `-29.4%`|
| svl ES, 8 tests / 4 files | `1.7` min | `1.3` min | `-23.5%`|
| svl Oblt, 8 tests / 4 files | `1.8` min | `1.4` min | `-22.2%`|
| svl Search, 5 tests / 2 files | `59.9` sec | `51.6` sec | `-13.8%`|
Conclusion: parallel run effectiveness benefits from tests being split
in **more test files**.
Experiment 3: Clone existing tests to have **3 times more test files**
and re-run tests for stateful/serverless in **Kibana CI** (starting
servers, ingesting ES data, running tests)
| Run setup | 1 worker | 2 workers | diff
| ------------- | ------------- |------------- |------------- |
| stateful, 27 tests / 15 files | `4.3` min | `2.7` min | `-37.2%`|
| svl ES, 24 tests / 12 files | `4.3` min | `2.7` min | `-37.2%`|
Conclusion: parallel run effectiveness is **increasing** with more test
files in place, **not linear** but with good test design we can expect
**up to 40%** or maybe a bit more.
How parallel run works:
- `scoutSpace` fixture is loaded on Playwright worker setup (using
`auto: true` config), creates a new Kibana Space, expose its id to other
fixtures and deletes the space on teardown.
- `browserAuth` fixture for parallel run caches Cookie per worker/space
like `role:spaceId`. It is needed because Playwright doesn't spin up new
browser for worker, but only new context.
- kbnClient was updated to allow passing `createNewCopies: true` in
query, it is needed to load the same Saved Objects in parallel
workers/spaces and generate new ids to work with them. `scoutSpace`
caches ids and allows to reach saved object by its name. This logic is
different from single thread run, where we can use default ids from
kbnArchives.
How to run parallel tests locally, e.g. for stateful:
```
node scripts/scout run-tests --stateful --config x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts
```
Clean up visualizations page load size by
* lazy loading actions
* avoid exporting from index files to avoid exporting unused code
* move `urlFor` and `getFullPath` into `url_utils` to avoid including
`utils/saved_visualize_utils` in page load bundle
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Closes https://github.com/elastic/logs-dev/issues/183,
https://github.com/elastic/logs-dev/issues/184 and
https://github.com/elastic/logs-dev/issues/185.
## Summary
This PR aims to support failure store in dataset quality page. The
following acceptance criteria items were resolved
### Dataset quality page
- [x] A column for Failed docs is included in the table
- [x] A tooltip is placed in the title of the column
- [x] A % of documents inside Failure store is calculated for every
dataStream
- [x] If % is lesser than 0.0001 but greater than 0 we should show ⚠
symbol next to the ~0 value (as we do with degraded docs)
- [x] Failed docs percentages greater than 0 should link to discover
🎥 Demo
https://github.com/user-attachments/assets/6d9e3f4c-02d9-43ab-88cb-ae70716b05d9
### Dataset details page
- [x] A metric, Failed docs, is included in the Overview panel under
Data set quality. This metric includes the number of documents inside
the failure store for the specific dataStream.
- [x] A tooltip is placed in the title of the Failed docs metric with
message: `The percentage of docs sent to failure store due to an issue
during ingestion.`
- [x] Degraded docs graph section is transformed to Document trends
allowing the users to switch between Degraded docs and Failed docs
trends over time.
- [x] A new chart for failed documents is created with links to
discover/Logs explorer using the right dataView
🎥 Demo
https://github.com/user-attachments/assets/6a3a1f09-2668-4e83-938e-ecdda798c199
### Failed docs ingestion issue flyout
- [x] Whenever documents are found in failure store we should list
Document indexing failed in Quality issues table
- [x] User should be able to expand Document indexing failed and see
more information in the flyout
- [x] The flyout will show Docs count, an aggregation of the number of
documents inside failure store for the selected timeframe
- [x] The flyout will show Last ocurrence, the datetime registered for
the most recent document in the failure store.
- [x] The flyout will contain a section called Error messages where a
list of unique error messages should be shown, exposing Content (error
message) and Type (Error Type).
- [x] Type should contain a tooltip where message (`Error message
category`) explain users how we are categorising the errors.
- [x] Other issues inside Quality issues table will be appended by field
ignored and the field will be shown in bold.
https://github.com/user-attachments/assets/94dc81f0-9720-4596-b256-c9d289cefd94
Note: This PR was reconstructed from
https://github.com/elastic/kibana/pull/199806 which it supersedes.
## How to test
1. Execute `failed_logs` synthtrace scenario
2. Open dataset quality page
## Follow ups
- Enable in serverless
- Deployment agnostic tests cannot be added until we enable this in
serverless
- FTR tests will be added as part of
https://github.com/elastic/logs-dev/issues/182
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## 📓 Summary
Adds a new section to the overview tab in the log details flyout in
Discover to display stacktrace information for logs and exceptions.
In a follow-up, the stacktrace could be moved to a new tab in the log
details flyout and actions can be added to the stacktrace (and quality)
icons in the document table to open the relevant sections in the flyout.
Closes https://github.com/elastic/kibana/issues/190460
### APM - Log stacktrace (library frames)
<img width="1470" alt="image"
src="https://github.com/user-attachments/assets/8991f882-d329-4bc5-aa37-424576bcee72"
/>
### APM - Exception (with cause)
<img width="1476" alt="image"
src="https://github.com/user-attachments/assets/cfbf24a7-6f82-48f1-b275-5aac977411ac"
/>
### APM - Exception (simple stacktrace)
<img width="1474" alt="image"
src="https://github.com/user-attachments/assets/fc0306c4-5fcd-4b74-bb0d-c1784a48d677"
/>
### Apache Tomcat Integration (Catalina) - Stacktrace
<img width="1472" alt="image"
src="https://github.com/user-attachments/assets/281f1822-faea-4e2d-9515-c11a9ee12f50"
/>
## 📝 Notes for reviewers
- The `@kbn/apm-types` package was marked as platform / shared as it's
being used by the
[unified_doc_viewer](https://github.com/elastic/kibana/blob/main/src/plugins/unified_doc_viewer/kibana.jsonc)
- The code used to render stacktraces in APM was moved into a new
`@kbn/event-stacktrace` package as it is reused in the
`unified_doc_viewer`
- The code used to render metadata table in APM was moved into a new
`@kbn/key-value-metadata-table` package
## 🧪 Testing instructions
The deployed environments have sample logs that can be used (time range:
Jan 1, 2025 - now). For a local setup, please follow the instructions
below:
1. Ingest sample logs with stacktraces
([gist](https://gist.github.com/gbamparop/0da21ca7f65b24c4a9c071ce9e9b97b0)).
Please note that these are test data and some fields that are not used
by stacktraces might not be consistent
2. View relevant logs in Discover (Query: `service.name: "synth-node-0"
OR apache_tomcat :*`, Time range: Jan 1, 2025 - now)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes https://github.com/elastic/kibana/issues/206967
## Summary
After some changes related to V2 migration of getting the entities,
there was an issue with the new data coming from the endpoint - the
`data_stream.type` is a string instead of an array in case of a single
data stream so this PR adds a fix to support that (and a test)
## Bug fixes
- Service overview page loads for a logs-only data stream
- After adding the fix, I saw another error related to the `useTheme`
and changed it to use the `euiTheme` similar to the other changes
related to the Borealis team upgrade
## Testing
To test the scenario with services and hosts coming from logs (without
APM / metrics) I added a new scenario in synthtrace so to test then we
should:
- Run the new scenario: `node scripts/synthtrace logs_only` (if possible
on a clean ES)
- Enable `observability:entityCentricExperience` in Stack Management >
Advanced Setting
- Go to Inventory and click on a service
- The logs-only views should be available
- Go to Inventory and click on a host
- The logs-only views should be available
https://github.com/user-attachments/assets/cfd5fd40-ac44-4807-9a29-f3ee3015d814
- Test one of the scenarios with mix of APM/metrics/logs
- Run `node scripts/synthtrace infra_hosts_with_apm_hosts`
- Enable `observability:entityCentricExperience` in Stack Management >
Advanced Setting
- Go to Inventory and click on a service from APM
- The APM views (service/traces) should be available
- Go to Inventory and click on a host
- The asset details view should be available and show metrics
https://github.com/user-attachments/assets/894c7c1a-aaa1-42cb-9dcb-05c9a5ca8177
- Infrastructure (Inventory/Hosts, etc) and Applications (Service
Inventory/Traces, etc) should load the data for this scenario and not
for the logs only (also for an oblt cluster connection)
https://github.com/user-attachments/assets/4d092cc6-a8ad-4022-b980-b443be09acc9
Resolves https://github.com/elastic/eui-private/issues/171
Resolves https://github.com/elastic/eui-private/issues/177
## Summary
This PR addresses a prior PR review
[comment](https://github.com/elastic/kibana/pull/203840/files#diff-bb850523655bac7adb30995553acabae9705435fa51e5b8bf13c483152db694a)
by removing `isServerless` from the logic determining what theme should
be used at runtime with a simple YML configuration setting instead.
I added a non-public `uiSettings.experimental.defaultTheme` config
property that defaults to `borealis` and is set to `amsterdam` in
`serverless.yml`. Since the default theme is now (and should be) set to
Borealis, I also updated `DEFAULT_THEME_NAME` and `FALLBACK_THEME_NAME`
to reflect that. This doesn't have any impact on Serverless; it will
keep using Amsterdam.
Additionally, while making these changes, I wanted to simultaneously
improve types and address earlier PR
[comment](https://github.com/elastic/kibana/pull/199748#discussion_r1840402343).
Now `SUPPORTED_THEME_NAMES` array is declared as `const` making the
`ThemeName` type strict instead of resolving a generic `string` type.
Usages were updated to use `ThemeName` instead of `string`, too.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary
* Added a few transforms to simplify package paths.
* Fixed typo causing `.mdx` files to not be processed when replacing
references.
* Added preliminary support for `--healthcheck` (to check for broken
references to files and links).
## Summary
Epic: https://github.com/elastic/security-team/issues/7998
In this PR we're breaking out the `timeline` and `notes` features into
their own feature privilege definition. Previously, access to both
features was granted implicitly through the `siem` feature. However, we
found that this level of access control is not sufficient for all
clients who wanted a more fine-grained way to grant access to parts of
security solution.
In order to break out `timeline` and `notes` from `siem`, we had to
deprecate it feature privilege definition for. That is why you'll find
plenty of changes of `siem` to `siemV2` in this PR. We're making use of
the feature privilege's `replacedBy` functionality, allowing for a
seamless migration of deprecated roles.
This means that roles that previously granted `siem.all` are now granted
`siemV2.all`, `timeline.all` and `notes.all` (same for `*.read`).
Existing users are not impacted and should all still have the correct
access. We added tests to make sure this is working as expected.
Alongside the `ui` privileges, this PR also adds dedicated API tags.
Those tags haven been added to the new and previous version of the
privilege definitions to allow for a clean migration:
```mermaid
flowchart LR
subgraph v1
A(siem) --> Y(all)
A --> X(read)
Y -->|api| W(timeline_write / timeline_read / notes_read / notes_write)
X -->|api| V(timeline_read /notes_read)
end
subgraph v2
A-->|replacedBy| C[siemV2]
A-->|replacedBy| E[timeline]
A-->|replacedBy| G[notes]
E --> L(all)
E --> M(read)
L -->|api| N(timeline_write / timeline_read)
M -->|api| P(timeline_read)
G --> Q(all)
G --> I(read)
Q -->|api| R(notes_write / notes_read)
I -->|api| S(notes_read)
end
```
### Visual changes
#### Hidden/disabled elements
Most of the changes are happening "under" the hood and are only
expressed in case a user has a role with `timeline.none` or
`notes.none`. This would hide and/or disable elements that would usually
allow them to interact with either timeline or the notes feature (within
timeline or the event flyout currently).
As an example, this is how the hover actions look for a user with and
without timeline access:
| With timeline access | Without timeline access |
| --- | --- |
| <img width="616" alt="Screenshot 2024-12-18 at 17 22 49"
src="https://github.com/user-attachments/assets/a767fbb5-49c8-422a-817e-23e7fe1f0042"
/> | <img width="724" alt="Screenshot 2024-12-18 at 17 23 29"
src="https://github.com/user-attachments/assets/3490306a-d1c3-41aa-af5b-05a1dd804b47"
/> |
#### Roles
Another visible change of this PR is the addition of `Timeline` and
`Notes` in the edit-role screen:
| Before | After |
| ------- | ------ |
| <img width="746" alt="Screenshot 2024-12-12 at 16 31 43"
src="https://github.com/user-attachments/assets/20a80dd4-c214-48a5-8c6e-3dc19c0cbc43"
/> | <img width="738" alt="Screenshot 2024-12-12 at 16 32 53"
src="https://github.com/user-attachments/assets/afb1eab4-1729-4c4e-9f51-fddabc32b1dd"
/> |
We made sure that for migrated roles that hard `security.all` selected,
this screen correctly shows `security.all`, `timeline.all` and
`notes.all` after the privilege migration.
#### Timeline toast
There are tons of places in security solution where `Investigate / Add
to timeline` are shown. We did our best to disable all of these actions
but there is no guarantee that this PR catches all the places where we
link to timeline (actions). One layer of extra protection is that the
API endpoints don't give access to timelines to users without the
correct privileges. Another one is a Redux middleware that makes sure
timelines cannot be shown in missed cases. The following toast will be
shown instead of the timeline:
<img width="354" alt="Screenshot 2024-12-19 at 10 34 23"
src="https://github.com/user-attachments/assets/1304005e-2753-4268-b6e7-bd7e22d8a1e3"
/>
### Changes to predefined security roles
All predefined security roles have been updated to grant the new
privileges (in ESS and serverless). In accordance with the migration,
all roles with `siem.all` have been assigned `siemV2.all`,
`timeline.all` and `notes.all` (and `*.read` respectively).
### Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
- [x] 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)
- [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] 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.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: PhilippeOberti <philippe.oberti@elastic.co>
Co-authored-by: Steph Milovic <stephanie.milovic@elastic.co>
## Summary
Extracted remaining easy backward-compatible unit test fixes that fail
with React@18 from https://github.com/elastic/kibana/pull/206411
The idea is that the tests should pass for both React@17 and React@18
## Summary
Only log out the number of attempts when the `retryCount` is truthy
Previously we were seeing the attempt counter, constantly reporting 0
for each attempt.
### To Run Locally
```
node scripts/jest --config packages/kbn-ftr-common-functional-services/jest.config.js
```
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary
While looking at the `packages` folder at the root of Kibana, I noticed
some files were left over in otherwise empty folders:
- 2 README files were left in the `content-management` folder
- 1 README file and 1 png file were left in the `react` folder
The rest of the content was moved to a new location as part of the
Sustainable Kibana Architecture effort (see [this
PR](https://github.com/elastic/kibana/pull/205593) and [that
one](https://github.com/elastic/kibana/pull/205924)) and I wonder if
those few files were left behind by mistake.
I did not making any changes to the content of the files, I just moved
them to their respective new locations.
Please let me know if these were left behind intentionally, or if they
should be deleted instead of moved!
### Notes
The `appex-sharedux` codeowner only appeared after pushing the second
commit which impacts the `react` folder. I realized that the codeowners
file was pointing to the folder within
`src/platform/packages/shared/content-management/content_insights` and
`src/platform/packages/shared/content-management/favorites` so update it
to point to the parent folder, which now contains the moved README
files. I hope that's ok!
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
- Updates `scripts/dependency_ownership` to use the
`@kbn/dev-cli-runner` for consistency with other CI-related CLIs.
- Adds a new `failIfUnowned` flag to exit with an error code if any
dependencies are unowned.
- Adds a new dependency ownership check to `quick_checks` and `renovate`
CI steps.
From a CI run, the additional quick check executes successfully in 3
seconds:
```sh
info [quick-checks] Passed check: /opt/buildkite-agent/builds/bk-agent-prod-gcp-abc123/elastic/kibana-pull-request/kibana/.buildkite/scripts/steps/checks/dependencies_missing_owner.sh in 3s
```
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* move actions to `registerActionAsync`
* remove global string file loaded in page load bundle
* Break constants into smaller files so only constants required by page
load bundle are exposed.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary
Extending scout-reporter with `failed-test-reporter`, that saves
failures in json summary file. For each test failure html report file is
generated and linked in summary report:
```
[
{
"name": "stateful - Discover app - saved searches - should customize time range on dashboards",
"htmlReportFilename": "c51fcf067a95b48e2bbf6098a90ab14.html"
},
{
"name": "stateful - Discover app - value suggestions: useTimeRange enabled - dont show up if outside of range",
"htmlReportFilename": "9622dcc1ac732f30e82ad6d20d7eeaa.html"
}
]
```
This PR updates `failed_tests_reporter_cli` to look for potential Scout
test failures and re-generate test failure artifacts in the same format
we already use for FTR ones.
These new artifacts are used to list failures in BK annotation:
<img width="1092" alt="image"
src="https://github.com/user-attachments/assets/09464c55-cdaa-45a4-ab47-c5f0375b701c"
/>
test failure html report example:
<img width="1072" alt="image"
src="https://github.com/user-attachments/assets/81f6e475-1435-445d-82eb-ecf5253c42d3"
/>
Note for reviewer: 3 Scout + 1 FTR tests were "broken" to show/test
reporter, those changes must be reverted before merge. See failed
pipeline
[here](https://buildkite.com/elastic/kibana-pull-request/builds/266822)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## 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.
Are you trying to rebase this PR to solve merge conflicts? Please follow
the steps describe
[here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E).
#### 1 packages(s) are going to be relocated:
| Id | Target folder |
| -- | ------------- |
| `@kbn/grid-layout` | `src/platform/packages/private/kbn-grid-layout` |
<details >
<summary>Updated references</summary>
```
./.i18nrc.json
./examples/grid_example/tsconfig.type_check.json
./package.json
./packages/kbn-ts-projects/config-paths.json
./src/platform/packages/private/kbn-grid-layout/jest.config.js
./src/platform/packages/private/kbn-repo-packages/package-map.json
./tsconfig.base.json
./tsconfig.base.type_check.json
./tsconfig.refs.json
./yarn.lock
.github/CODEOWNERS
```
</details><details >
<summary>Updated relative paths</summary>
```
src/platform/packages/private/kbn-grid-layout/jest.config.js:12
src/platform/packages/private/kbn-grid-layout/tsconfig.json:2
src/platform/packages/private/kbn-grid-layout/tsconfig.type_check.json:2
```
</details>
## Summary
This PR originally aimed at replacing the usages `styled-components`
with `@emotion/react` in the
`security_solution/public/common/components/events_viewer` folder. I
quickly realized removing some of these would require a small refactor.
This lead to making a few more changes, as many properties were actually
unused so a cleanup was welcome.
Only 2 small UI changes are introduced in this PR:
- the inspect icon on the top right corner of the tables are now always
visible instead of only visible on hover. I'm aware that this is a
different behavior from the alerts table in the alerts page, but we also
have other tables (like the one on threat intelligence page) where the
icon is always shown. Waiting on @codearos for confirmation here
- the `Grid view` and `Additional filters` button are reversed due to
the simplification of the code
No other UI changes are introduced. No behavior logic has been changed
either.
The biggest code cleanup are:
- removal of a bunch of unused properties and logic
- deletion of the RightTopMenu component: it was used in both
`StatefulEventsViewerComponent` and `getPersistentControlsHook` but none
of the internal logic was overlapping. I don't know how we got there but
its current implementation was overly complex and completely
unnecessary...
#### Alerts page

#### Rule creation page

#### Host/User/Network events tab

#### Host session view tab

### Checklist
- [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
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
It fixes#205051
<del>
Files are excluded because of `euiScrollBar` and `euiScrollBarCorner`
replacement (TBD)
-
x-pack/solutions/observability/plugins/exploratory_view/public/components/shared/exploratory_view/series_editor/series_editor.tsx
-
x-pack/solutions/observability/plugins/exploratory_view/public/components/shared/exploratory_view/series_editor/components/filter_values_list.tsx
</del>
✅ DONE
## Summary
For the most part, all of our colors translated fine into Borealis when
testing our pages. There will be more changes needed in the future to
completely replace all of the `euiThemeVars` usages, especially in
components that are shared with other teams. There are also quite a few
exported custom styled components that can't easily use the
`useEuiTheme` hook since they are not inside a react component. I didn't
want to touch those at this time.
- [x] Replace deprecated tokens to use new naming scheme ( like
successText --> textSuccess)
- [x] Use the hook `useEuiTheme()` over other methods
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Resolves EUI Visual Refresh issue #202491
This PR is part of a list of PRs to perform the changes necessary to get
the new Borealis theme working correctly. It focuses on replacing the
deprecated color "success" colors have been updated to
"accentSecondary".
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## 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.
Are you trying to rebase this PR to solve merge conflicts? Please follow
the steps describe
[here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E).
#### 2 plugin(s) are going to be relocated:
| Id | Target folder |
| -- | ------------- |
| `@kbn/entities-data-access-plugin` |
`x-pack/solutions/observability/plugins/entities_data_access` |
| `@kbn/entityManager-app-plugin` |
`x-pack/solutions/observability/plugins/entity_manager_app` |
#### 10 packages(s) are going to be relocated:
| Id | Target folder |
| -- | ------------- |
| `@kbn/core-user-settings-server` |
`src/core/packages/user-settings/server` |
| `@kbn/core-user-settings-server-internal` |
`src/core/packages/user-settings/server-internal` |
| `@kbn/core-user-settings-server-mocks` |
`src/core/packages/user-settings/server-mocks` |
| `@kbn/calculate-auto` |
`src/platform/packages/shared/kbn-calculate-auto` |
| `@kbn/charts-theme` | `src/platform/packages/shared/kbn-charts-theme`
|
| `@kbn/palettes` | `src/platform/packages/shared/kbn-palettes` |
| `@kbn/saved-search-component` |
`src/platform/packages/shared/kbn-saved-search-component` |
| `@kbn/use-tracked-promise` |
`src/platform/packages/shared/kbn-use-tracked-promise` |
| `@kbn/response-ops-rule-form` |
`src/platform/packages/shared/response-ops/rule_form` |
| `@kbn/streams-schema` |
`x-pack/solutions/observability/packages/kbn-streams-schema` |
<details >
<summary>Updated references</summary>
```
./.i18nrc.json
./docs/developer/plugin-list.asciidoc
./package.json
./packages/kbn-ts-projects/config-paths.json
./src/core/packages/user-settings/server-internal/jest.config.js
./src/core/packages/user-settings/server-mocks/jest.config.js
./src/platform/packages/private/kbn-repo-packages/package-map.json
./src/platform/packages/shared/kbn-calculate-auto/jest.config.js
./src/platform/packages/shared/kbn-charts-theme/jest.config.js
./src/platform/packages/shared/kbn-palettes/jest.config.js
./src/platform/packages/shared/kbn-saved-search-component/jest.config.js
./src/platform/packages/shared/kbn-use-tracked-promise/jest.config.js
./src/platform/packages/shared/response-ops/rule_form/jest.config.js
./tsconfig.base.json
./x-pack/solutions/observability/packages/kbn-streams-schema/jest.config.js
./x-pack/solutions/observability/plugins/entities_data_access/jest.config.js
./x-pack/solutions/observability/plugins/entity_manager_app/jest.config.js
./yarn.lock
.github/CODEOWNERS
```
</details><details >
<summary>Updated relative paths</summary>
```
src/core/packages/user-settings/server-internal/jest.config.js:12
src/core/packages/user-settings/server-internal/tsconfig.json:2
src/core/packages/user-settings/server-mocks/jest.config.js:12
src/core/packages/user-settings/server-mocks/tsconfig.json:2
src/core/packages/user-settings/server/tsconfig.json:2
src/platform/packages/shared/kbn-calculate-auto/jest.config.js:12
src/platform/packages/shared/kbn-calculate-auto/tsconfig.json:2
src/platform/packages/shared/kbn-charts-theme/jest.config.js:12
src/platform/packages/shared/kbn-charts-theme/tsconfig.json:2
src/platform/packages/shared/kbn-palettes/jest.config.js:12
src/platform/packages/shared/kbn-palettes/tsconfig.json:2
src/platform/packages/shared/kbn-saved-search-component/jest.config.js:12
src/platform/packages/shared/kbn-saved-search-component/tsconfig.json:2
src/platform/packages/shared/kbn-use-tracked-promise/jest.config.js:12
src/platform/packages/shared/kbn-use-tracked-promise/tsconfig.json:2
src/platform/packages/shared/response-ops/rule_form/jest.config.js:12
src/platform/packages/shared/response-ops/rule_form/tsconfig.json:2
x-pack/solutions/observability/packages/kbn-streams-schema/jest.config.js:10
x-pack/solutions/observability/packages/kbn-streams-schema/tsconfig.json:2
x-pack/solutions/observability/plugins/entities_data_access/jest.config.js:12
x-pack/solutions/observability/plugins/entities_data_access/tsconfig.json:2
x-pack/solutions/observability/plugins/entity_manager_app/jest.config.js:12
x-pack/solutions/observability/plugins/entity_manager_app/tsconfig.json:2
x-pack/solutions/observability/plugins/entity_manager_app/tsconfig.json:7
```
</details>
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Adds logic to support the jest vscode extension by reading the
`--testPathPattern` arg for the purpose of config lookup. This enables
running tests easily in the vscode jest extension.
## Summary
Part of #195211
In preparation for the horizontal rule form layout, move the generation
of the rule form steps into three hooks:
- `useCommonRuleFormSteps`: private hook that generates a series of
objects specifying the rule form steps, how to display them, and what
order to display them in
- `useRuleFormSteps`: hook that calls `useCommonRuleFormSteps` and
transforms them into data for the standard vertical `EuiSteps`, along
with progress tracking based on `onBlur` events
- `useRuleFormHorizontalSteps`: hook that calls hook that calls
`useCommonRuleFormSteps` and transforms them into data for
`EuiStepsHorizontal`, plus navigation functions. ***These will be used
in the smaller rule form flyout in a second PR***
Because `EuiStepsHorizontal` rely more heavily on the `EuiSteps`
`status` property, I took this opportunity to improve progress tracking
in the standard vertical steps. Most rule types will load the create
page with Step 1: Rule Definition already being in a `danger` state,
because an incomplete rule definition component immediately sends
errors, and the error API doesn't distinguish between invalid data or
incomplete data.
This PR wraps each step in a `reportOnBlur` higher-order component,
which will report the first time a step triggers an `onBlur` event.
Steps with errors will now report `incomplete` until they first trigger
an `onBlur`. The result:
1. The user loads the Create Rule page. Rule Definition is marked
`incomplete`
2. The user interacts with Rule Definition, but does not yet complete
the definition.
3. The user interacts with the Actions step, the Rule Details step, or
another part of the page. The Rule Definition is now marked `danger`.
This is inelegant compared to an error API that can actually distinguish
between an incomplete form and an invalid form, but it's an improvement
for now.
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary
Should fix TS check error `Project references may not form a circular
graph` by removing `@kbn/test-suites-xpack` from `kbn-scout` dependency
list.
Since dockerImage for Fleet package registry is just a constant, that is
used across different FTR and Scout configurations, it makes sense to
export it from `kbn-test`
## Summary
Summarize your PR. If it involves visual changes include a screenshot or
gif.
## Changes
* Adds `enableExperimental` to server `configSchema`
* Makes feature flags configurable via
`xpack.cloudSecurityPosture.enableExperimental` in `kibana.dev.yml`
* Implements `ExperimentFeatureService.get()` for accessing feature
flags
* Add passing `initliaterContext` to plugin in order to access our
plugin config
## Benefits
* Avoids circular dependency with Security Solution
`useIsExperimentalFeatureEnabled` and prop drilling feature flags from
Fleet plugin `PackagePolicyReplaceDefineStepExtensionComponentProps`
* Provides server-side configuration support
* Enables pre-release feature testing
* Creates centralized feature flag management
This allows controlled testing of new features before release through
configuration rather than code changes.
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary
* Fix an issue with the `--list` command failing the 1st run.
* Allow passing in no filters, and relocate "incorrect" modules (aka
modules that are not in the correct folder) in that case.
## Summary
This PR assigns owners for dependencies that are not yet claimed. These
assignments were a "best effort", and will likely need tweaking once
downstream teams start receiving renovate PRs.
## Summary
Fixes https://github.com/elastic/kibana/issues/199494
This PR allows to create and update rule with `notify_when` and
`throttle` attributes at rule level instead of `action.frequency` level.
### How to test
- create a rule via api where `notify_when` and `throttle` attributes
are at rule level
<details><summary>Example</summary>
Note: use your existing connector for action
```typescript
POST kbn:/api/alerting/rule
{
"tags": [],
"params": {
"searchConfiguration": {
"query": {
"query": "",
"language": "kuery"
},
"index": "ff959d40-b880-11e8-a6d9-e546fe2bba5f"
},
"timeField": "order_date",
"searchType": "searchSource",
"timeWindowSize": 5,
"timeWindowUnit": "d",
"threshold": [
10
],
"thresholdComparator": ">",
"size": 100,
"aggType": "count",
"groupBy": "all",
"termSize": 5,
"excludeHitsFromPreviousRun": false,
"sourceFields": []
},
"schedule": {
"interval": "1m"
},
"consumer": "stackAlerts",
"name": "ES query rule from devtools",
"rule_type_id": ".es-query",
"notify_when": "onThrottleInterval",
"throttle": "1h",
"actions": [
{
"group": "query matched",
"id": "ad923c8a-d27d-41a9-8c71-d33d94db4abb",
"params": {
"documents": [
{
"name": "{{rule.name}}"
}
]
}
}
],
"alert_delay": {
"active": 1
}
}
```
</details>
- open the created rule
- go to `settings` tab
- verify that dropdowns reflect notify_when and throttle value correctly
- update the rule via UI and verify the same
- update the rule via API and verify the same
### Flaky test runner:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7684
### Checklist
Check the PR satisfies following conditions.
- [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
## Summary
Turn AssetInventory plugin into a simple Security solution page based on
this conversation:
- https://github.com/elastic/security-team/issues/10346
Follow-up of this work, where we initially developed the Asset Inventory
bare-bones as a plugin:
- https://github.com/elastic/kibana/issues/201704
Part of this work stream though not originally planned:
- https://github.com/elastic/security-team/issues/11247?reload=1
### Motivation
Reasoning behind is enabling fast development changes without any major
refactors in other packages/components that need to be reused, which
seems impossible as of now with the current codebase.
### Checklist
- [x] 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)
- [x] 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.
- [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)
### Identify risks
In the future, we'll probably have to turn AssetInventory into a
sub-plugin again. Doing so doesn't bring any risk in the present, and
should only involve the re-generation of the deleted files in this PR.
---------
Co-authored-by: Paulo Henrique <paulo.henrique@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>