Closes https://github.com/elastic/kibana/issues/187752
## Summary
Display a warning to users when a role mapping is created/updated to
include empty `any` or `all` rules
### Screenshots
<img width="1480" alt="image"
src="https://github.com/user-attachments/assets/6cb7e505-95d9-43c6-b8b7-a1f9114cdcda">
### Release notes
Display a warning to users whenever role mappings with empty `any` or
`all` rules are created or updated.
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary
This PR updates the Kibana What's new page with 8.15 changes, based on
the highlights document produced by PMs.
Closes: https://github.com/elastic/platform-docs-team/issues/441
---------
Co-authored-by: lcawl <lcawley@elastic.co>
Co-authored-by: marciw <333176+marciw@users.noreply.github.com>
## Summary
Three major changes:
- Created my own streaming function
- If on cloud, fill up the response so that exceeds the network buffer
that cloud puts into place
- this buffer entry is ignored on the frontend
- use abortController instead of a variable. Subscribe to changes to the
network request to abort controller signal
- there was a random wait timeout for each chunk. This was introduced
with the error handling though im unsure why its needed. This causes a
big delay in the responses.
### 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
- [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
- [ ] [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>
Currently, if you attempt to create a data view with a index pattern
where some of the segments aren't matched, you can't select a timestamp
field. This is a common use case for security and observability. This PR
allows a timestamp selection as expected.
Closes https://github.com/elastic/kibana/issues/189024
## Summary
Removing an unused feature flag called `alertTypeEnabled`. The feature
was added in 8.7 (https://github.com/elastic/kibana/pull/152872) but was
never enabled.
This PR removed unused components and renamed directory from
`alert_by_type_panel` to `alerts_by_rule_panel`.
### 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
Only adds the build - this won't be released until Chrome binaries for
reporting have been added, it's been discussed and we have test
coverage. For now this is helpful for testing Windows fixes natively.
For reviewers: I expect most of us don't have a Windows ARM dev
environments. This isn't hooked into anything yet, e.g. enabling uploads
will require another round of review. I've run a smoke test on my end
and am planning on adding incremental support.
## Summary
Partially addresses https://github.com/elastic/kibana/issues/182255
- Implements the `Visitor` pattern for ES|QL AST trees. Unlike the
`Walker` (which automatically traverses the whole tree exactly once),
the `Visitor` pattern allows to control the traversal. The developer has
to manually call children "visitor" routines. This manual handling
enables:
- The AST tree can be traversed any number of times.
- Only a specific subset of the tree can be travered.
- Each visitor receives a *context* object, which can provide the global
context as well as a linked list to all parent nodes.
- The context object also provides node-specific read/write
functionality.
- Each visitor can receive *input* from its parent node.
- Each visitor can return *output* to its parent node.
- The visitor nodes are strictly typed: the context object as well as
inputs and outputs have specific types. Also the inputs and outputs
TypeScript types are inferred automatically from the callback signature
the developer specifies and then the correct input/output usage is
enforced in other callbacks.
- The "scenarios" test file contains real-world usage scenarios, like:
- [Changing the
`LIMIT`](https://github.com/elastic/kibana/pull/189516/files#diff-571e21fd50dbdb664e71297e2edd72c1a1b2b96f346248f0360558ef8ceb75f7R20)
- [Removing a "filter", a `WHERE`
command](https://github.com/elastic/kibana/pull/189516/files#diff-571e21fd50dbdb664e71297e2edd72c1a1b2b96f346248f0360558ef8ceb75f7R57)
### Checklist
Delete any items that are not applicable to this PR.
- [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
### For maintainers
- [x] 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: Elastic Machine <elasticmachine@users.noreply.github.com>
## Summary
Use `retryTransientEsErrors` when fetching agent status to avoid flaky
ES errors throwing a 500.
I'd love to add tests for this, but it's a bit challenging as these
methods rely heavily on an ES runtime field to populate the status
values. The amount of mocking necessary to add Jest tests for these was
getting a bit ridiculous, so maybe FTR is a better way to go?
## Summary
New feature flag added: `dataIngestionHubEnabled` and implemented in
`onboarding` page.
### Checklist
Delete any items that are not applicable to this PR.
- [ ] [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
This PR resolves https://github.com/elastic/search-team/issues/7993
Recently, a backend https://github.com/elastic/elasticsearch/pull/111366
was merged to elasticsearch which basically replaces 'model_id' with
'inference_id' in the GET inference api. This change was also backported
to v8.15. Due to this change, the frontend works related to
semantic_text UI and Inference Endpoints view are broken.
---------
Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
Resolves https://github.com/elastic/kibana/issues/189566
## Summary
This PR removes tech preview from the ES query ES|QL rule form
### To verify
- Create an ES query ES|QL rule and verify that the tech preview badge
is removed from the ui.
## Summary
Resolves https://github.com/elastic/kibana/issues/186838
Prevents checking for Uptime data on plugin register when the user does
not have Uptime privileges
## Background Context
Uptime is hidden by default. However, there are two ways that the Uptime
app can become accessible.
1. Turning on the Uptime app in the advanced settings
2. If you have data in your Uptime indices within the past 7 days.
The data check present in Uptime plugin register is intended to enable
Uptime if there is Uptime data within the past 7 days. However, there's
no need to check this data if the user does not have privileges.
### Testing
1. Create a user without Uptime Kibana privileges
2. Open up the network tab in dev tools
3. Refresh any page in Kibana
4. You should not see a call to `internal/uptime/index_status`
The EBT pacakge has been moved to a separate NPM package
([@elastic/ebt](https://www.npmjs.com/package/@elastic/ebt))
The npm package is on version `0.0.x` until we finish the reviews then
i'll publish the `1.0.0` version before merging this PR.
The PR is mostly code deletes after moving the code to the public ebt
github repo https://github.com/elastic/ebt
The significant changes are:
1. removed the `packages/analytics/ebt` package from kibana
2. remove @kbn/ebt references in favor of the npm package.
3. Added a util package to provide the package with the telemetry
endpoint and headers
This was previously backed into the package but now i've rewired it be
provided from Kibana, this way we have more control over the URL and
headers we use to send EBT telemetry for our elastic endpoint, which
will probably be different between users of this package and this way
we'll also avoid republishing the package if we ever want to change
these details.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
Partially fixes. #189072
## Summary
In this PR, we pass the `query:allowLeadingWildcards` for the optional
filter to the custom threshold (specifically
`getSearchConfigurationBoolQuery` function that generates the related ES
Query).
|Before|After|
|----|---|
||
#### Rule
<img
src="https://github.com/user-attachments/assets/70d2de37-2285-450f-88bf-45aa88954019"
width=500 />
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
I noticed `elastic/appex-qa` is pinged for quite many PRs.
with #188606 some test folders became packages with `"owner":
"@elastic/appex-qa",`, that autmatically updated CODEOWNERS file with
appex-qa listed for basically every test path.
https://github.com/elastic/kibana/pull/188606/files#diff-3d36a1bf06148bc6ba1ce2ed3d19de32ea708d955fed212c0d27c536f0bd4da7R878-R881
This PR removes `owner` for the following test "packages"
- x-pack/test_serverless
- test
- x-pack/test
and CODEOWNERS file keeps these paths without specific owner.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes https://github.com/elastic/kibana/issues/187348
This changes adds an optional `history.settings.lookbackPeriod` property
that will default to `1h` if none is provided. The main point is to
prevent accidental processing of the entire dataset when creating a
definition.
I took the opportunity to do some refactoring:
- `durationSchema` was transforming a literal duration (eg `1h`) into a
`moment.Duration` with overriden `toJSON` property. since we don't use
any of the `moment` functionalities in consuming code the schema now
returns the raw string after regex validation
- split the `generateHistoryTransform` in `generateHistoryTransform` and
`generateBackfillHistoryTransform`