Commit graph

81161 commits

Author SHA1 Message Date
Kibana Machine
35195651bc skip failing test suite (#197475) 2024-11-21 11:46:06 +11:00
Tiago Costa
12801ca9d4
skip flaky suite (#201037) 2024-11-21 00:43:31 +00:00
Sandra G
d39d0d67a5
[data usage] add line series for totals (#201038)
## Summary

add line series for totals

<img width="2294" alt="Screenshot 2024-11-20 at 3 04 11 PM"
src="https://github.com/user-attachments/assets/275214b9-a1c5-45a9-ae1e-d42c4ef31cb9">


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] 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)

### 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.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
2024-11-20 19:03:59 -05:00
github-actions[bot]
269e02a943
deps: Bump ironbank version to 9.5 (#200863)
<Actions>
<action
id="ad27da7f660d61c82c61599e0e6945827ced1590f4bf36a5f74db07e99c04215">
        <h3>deps: Bump ironbank version</h3>
<details
id="21fe544f0edf8039d0165187f8204a62da22d72e50fa57839d823beb83c0df2e">
            <summary>deps(ironbank): Bump ubi version to 9.5</summary>
<p>changed lines [7] of file
&#34;/tmp/updatecli/github/elastic/kibana/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/Dockerfile&#34;</p>
        </details>
<details
id="99cabf4d5a2b44b2d93b4c18590b8ccd5df3002e8d9d506c038c9011e8e93734">
            <summary>deps(ironbank): Bump ubi version to 9.5</summary>
<p>change detected:&#xA;&#x9;* key &#34;$.args.BASE_TAG&#34; updated
from &#34;\&#34;9.4\&#34;&#34; to &#34;\&#34;9.5\&#34;&#34;, in file
&#34;src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/hardening_manifest.yaml&#34;</p>
        </details>
<a
href="1192767741">GitHub
Action workflow link</a>
    </action>
</Actions>

---

<table>
  <tr>
    <td width="77">
<img src="https://www.updatecli.io/images/updatecli.png" alt="Updatecli
logo" width="50" height="50">
    </td>
    <td>
      <p>
Created automatically by <a
href="https://www.updatecli.io/">Updatecli</a>
      </p>
      <details><summary>Options:</summary>
        <br />
<p>Most of Updatecli configuration is done via <a
href="https://www.updatecli.io/docs/prologue/quick-start/">its
manifest(s)</a>.</p>
        <ul>
<li>If you close this pull request, Updatecli will automatically reopen
it, the next time it runs.</li>
<li>If you close this pull request and delete the base branch, Updatecli
will automatically recreate it, erasing all previous commits made.</li>
        </ul>
        <p>
Feel free to report any issues at <a
href="https://github.com/updatecli/updatecli/issues">github.com/updatecli/updatecli</a>.<br
/>
If you find this tool useful, do not hesitate to star <a
href="https://github.com/updatecli/updatecli/stargazers">our GitHub
repository</a> as a sign of appreciation, and/or to tell us directly on
our <a
href="https://matrix.to/#/#Updatecli_community:gitter.im">chat</a>!
        </p>
      </details>
    </td>
  </tr>
</table>

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-11-20 15:35:19 -08:00
Georgii Gorbachev
c9e782030a
[Security Solution] Fix flaky test for multiline diff algorithm (#201019)
**Fixes: https://github.com/elastic/kibana/issues/201014**
**Related to:** https://github.com/elastic/kibana/pull/199388

## Summary

This PR increases the threshold (time limit) value for the test by 2x
from 500 ms to 1000 ms. Hope it should be enough to eliminate flakiness
on CI.
2024-11-20 15:12:02 -06:00
Sid
4ffdb35b14
[Docs] Update feature privilege docs to reflect new route authorization (#201017)
## Summary

Updates developer documentation on Feature privileges to reflect changes
to Route Authorization.


### Screenshots
Before
<img width="400" alt="Screenshot 2024-11-20 at 18 52 02"
src="https://github.com/user-attachments/assets/0bb01bd0-e41a-48ee-bcaf-bd4119037f1b">

After
<img width="400" alt="Screenshot 2024-11-20 at 18 49 26"
src="https://github.com/user-attachments/assets/2d5712ce-c277-4ecd-831e-750df8309933">


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
2024-11-20 14:52:58 -06:00
Jordan McAlpine
83b282a63a
fix: kibana dev server not restarting for external plugin #171260 (#198246)
## Summary

Fixes #171260 the Kibana dev server not restarting during external
plugin development for server side code.

### Checklist


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)
- [ ] This will appear in the **Release Notes** and follow the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

## Release note
Fixes #171260 the Kibana dev server not restarting during external
plugin development for server side code.

---------

Co-authored-by: Brad White <Ikuni17@users.noreply.github.com>
2024-11-20 20:24:58 +00:00
Kibana Machine
393ffa58a0 skip failing test suite (#191707) 2024-11-21 07:17:08 +11:00
Tiago Costa
59d501683b
skip flaky suite (#197985) 2024-11-20 20:12:35 +00:00
elastic-renovate-prod[bot]
5f716a2f4e
Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to 32099b9 (main) (#199974)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.elastic.co/wolfi/chainguard-base | digest | `26caa6b` ->
`32099b9` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOk9wZXJhdGlvbnMiLCJyZWxlYXNlX25vdGU6c2tpcCJdfQ==-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Brad White <Ikuni17@users.noreply.github.com>
2024-11-20 12:06:19 -08:00
Philippe Oberti
cb02853d14
[Security Solution] - enable running threat hunting investigations api integration tests in QA quality gate (#200820)
## Summary

This PR enables the Threat Hunting Investigations api integration tests
to the release quality gate.

https://github.com/elastic/kibana/issues/181687
2024-11-20 13:53:40 -06:00
Eyo O. Eyo
3648a33adf
update docs on automatically generating a report (#191067)
## Summary

Closes https://github.com/elastic/kibana/issues/188640


Updates steps in docs for automatically generating a report to match the
UI expectation especially that the share experience got an overhaul
since 8.14.

<!--
### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;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&mdash;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: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
2024-11-20 19:49:37 +00:00
Kyle Pollich
60431164a2
[Fleet] Remove output columns from agent list table (#201001)
## Summary

Closes https://github.com/elastic/kibana/issues/200914

Removes the output columns from the agent list table, as they can't be
filtered or sorted meaningfully without performance concerns.
2024-11-20 14:46:23 -05:00
Pierre Gayvallet
3c8f0777f4
[inference] add pre-bound versions of chatComplete and output APIs (#200568)
## Summary

Fix https://github.com/elastic/kibana/issues/199084

Introduce pre-bound versions of the inference APIs.

Accessing the bound versions can be done using the same `getClient` API,
via an additional `bindTo` parameter:

**without bindings**
```ts
const inferenceClient = myStartDeps.inference.getClient({ request });

const chatResponse = inferenceClient.chatComplete({
  connectorId: 'my-connector-id',
  functionCalling: 'simulated',
  messages: [{ role: MessageRole.User, content: 'Do something' }],
});
```

**with bindings**
```ts
const inferenceClient = myStartDeps.inference.getClient({
  request,
  bindTo: {
   connectorId: 'my-connector-id',
   functionCalling: 'simulated',
  }
});

const chatResponse = inferenceClient.chatComplete({
  messages: [{ role: MessageRole.User, content: 'Do something' }],
});
```

*Note: this is only done for the server-side, as there isn't much value
in scoping APIs on the browser side in my opinion*

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-11-20 13:09:11 -06:00
Dzmitry Lemechko
c04d80b03f
[Dependency ownership] move enzyme to shared-ux (#200964)
## Summary

According to `Kibana Dependency ownership report` majority of React
dependencies are owned by `elastic/appex-sharedux` team.

We had a chat and agreed that it makes sense to change ownership for
React testing libraries like `enzyme` to `elastic/appex-sharedux` for
consistency (testing dependencies are usually updated together with
React ones)

Ownership report was updated.
2024-11-20 13:01:11 -06:00
Sandra G
5d1a30aae9
[Data Usage] remove autoops.api.tls.ca config (#200808)
## Summary

Remove unused `autoops.api.tls.ca` config.


### Checklist

Reviewers should verify this PR satisfies this list as well.

- [ ] 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_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### 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.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

Co-authored-by: Ash <1849116+ashokaditya@users.noreply.github.com>
2024-11-20 13:59:45 -05:00
Davis McPhee
96fd4b682b
[Data Views] Mitigate issue where has_es_data check can cause Kibana to hang (#200476)
## Summary

This PR mitigates an issue where the `has_es_data` check can hang when
some remote clusters are unresponsive, leaving users stuck in a loading
state in some apps (e.g. Discover and Dashboard) until the request times
out. There are two main changes that help mitigate this issue:
- The `resolve/cluster` request in the `has_es_data` endpoint has been
split into two requests -- one for local data first, then another for
remote data second. In cases where remote clusters are unresponsive but
there is data available in the local cluster, the remote check is never
performed and the check completes quickly. This likely resolves the
majority of cases and is also likely faster in general than checking
both local and remote clusters in a single request.
- In cases where there is no local data and the remote `resolve/cluster`
request hangs, a new `data_views.hasEsDataTimeout` config has been added
to `kibana.yml` (defaults to 5 seconds) to abort the request after a
short delay. This scenario is handled in the front end by displaying an
error toast to the user informing them of the issue, and assuming there
is data available to avoid blocking them. When this occurs, a warning is
also logged to the Kibana server logs.

![CleanShot 2024-11-18 at 23 47
34@2x](https://github.com/user-attachments/assets/6ea14869-b6b6-4d89-a90c-8150d6e6b043)

Fixes #200280.

### Notes
- Modifying the existing version of the `has_es_data` endpoint in this
way should be backward compatible since the behaviour should remain
unchanged from before when the client and server versions don't match
(please validate if this seems accurate during review).
- For a long term fix, the ES team is investigating the issue with
`resolve/cluster` and will aim to have it behave like `resolve/index`,
which fails quickly when remote clusters are unresponsive. They may also
implement other mitigations like a configurable timeout in ES:
https://github.com/elastic/elasticsearch/issues/114020. The purpose of
this PR is to provide an immediate solution in Kibana that mitigates the
issue as much as possible.
- If ES ends up providing another performant method for checking if
indices exist instead of `resolve/cluster`, Kibana should migrate to
that. More details in
https://github.com/elastic/elasticsearch/issues/112307.

### Testing notes

To reproduce the issue locally, follow these steps:
- Follow [these
instructions](https://gist.github.com/lukasolson/d0861aa3e6ee476ac8dd7189ed476756)
to set up a local CCS environment.
- Stop the remote cluster process.
- Use Netcat on the remote cluster port to listen to requests but not
respond (e.g. on macOS: `nc -l 9600`), simulating an unresponsive
cluster. See https://github.com/elastic/elasticsearch/issues/32678 for
more context.
- Navigate to Discover and observe that the `has_es_data` request hangs.
When testing in this PR branch, the request will only wait for 5 seconds
before assuming data exists and displaying a toast.

### Checklist

- [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)
- [ ]
[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
- [ ] 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.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-11-20 14:52:47 -04:00
Tiago Costa
035c32e5c4
skip flaky suite (#191707) 2024-11-20 18:35:17 +00:00
Tiago Costa
ec61a5fa83
skip flaky suite (#162852) 2024-11-20 18:34:37 +00:00
Tiago Costa
613c702fb3
skip flaky suite (#200154) 2024-11-20 18:32:49 +00:00
Tiago Costa
3168538df9
skip flaky suite (#200888) 2024-11-20 18:30:31 +00:00
Kfir Peled
34656ae59a Added technical preview tag 2024-11-20 18:23:21 +00:00
Kibana Machine
d703d77502 skip failing test suite (#200962) 2024-11-21 05:21:31 +11:00
Tiago Costa
5c52d601eb
skip flaky suite (#200967) 2024-11-20 18:20:23 +00:00
Nathan Reese
eb68fb2713
[canvas] disable canvas application when there are no workpads (#200203)
Closes https://github.com/elastic/kibana/issues/197370

### Test instructions
1) open new kibana installation
2) verify canvas is not available in menu or application search bar
3) use saved object import to import canvas workpad. Reload browser
4) verify canvas is available in menu and application search bar

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-11-20 10:51:07 -07:00
Jen Huang
0aa63a7ecc
[UII] Expose advanced file logging config in UI (#200274)
## Summary

Resolves [#192237](https://github.com/elastic/kibana/issues/192237).
This PR exposes the following Elastic Agent file logging configuration
options in the agent policy advanced settings UI:

```
agent.logging.to_files
agent.logging.files.rotateeverybytes 
agent.logging.files.keepfiles
agent.logging.files.interval
```

<img width="1237" alt="image"
src="https://github.com/user-attachments/assets/8de9023c-29a0-4ecf-803a-d8c0c4b87616">

This PR also does some clean up on the default values for all these
configured advanced settings so that when user has not touched them, the
default values do not get written into the agent policy saved object.
[More info
here](https://github.com/elastic/kibana/pull/200274#discussion_r1849142612).

It also fixes adds missing response schemas for the advanced settings.

### 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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-11-20 09:41:50 -08:00
Matthias Wilhelm
e082cd1dfa
[Discover] Unskip Discover-Lens functional test suite (#200687)
Catching an invalid state of properties propagated to the UnifiedHistogram which is using the Lens embeddable in Discover, that causes a rendering error when e.g. ad hoc data views are being edited. Therefore the skipped testview can be unskipped.
2024-11-20 11:38:05 -06:00
Sander Philipse
0cafc7be9e
Search rename to elasticsearch (#200774)
This renames the Search solution to Elasticsearch to fit with our
rebranding efforts.
2024-11-20 18:14:26 +01:00
Tre
115e4dbd3e
[Ownership] Assign test files to presentation team (#200943)
## Summary

Assign test files to presentation team

Contributes to: #192979
2024-11-20 16:56:17 +00:00
Kfir Peled
708300d2a2 Added FTR to test e2e expanded flyout filtering 2024-11-20 16:53:48 +00:00
Pierre Gayvallet
67171e15c2
[inference] add support for openAI native stream token count (#200745)
## Summary

Fix https://github.com/elastic/kibana/issues/192962

Add support for native openAI token count for streaming APIs.

This is done by adding the `stream_options: {"include_usage": true}`
parameter when `stream: true` is being used
([doc](https://platform.openai.com/docs/api-reference/chat/create#chat-create-stream_options)),
and then using the `usage` entry for the last emitted chunk.

**Note**: this was done only for the `OpenAI` and `AzureAI`
[providers](83a701e837/x-pack/plugins/stack_connectors/common/openai/constants.ts (L27-L31)),
and **not** for the `Other` provider. The reasoning is that not all
openAI """compatible""" providers fully support all options, so I didn't
want to risk adding a parameter that could cause some models using an
openAI adapter to reject the requests. This is also the reason why I did
not change the way
[getTokenCountFromOpenAIStream](8bffd61805/x-pack/plugins/actions/server/lib/get_token_count_from_openai_stream.ts (L15))
function, as we want that to work for all providers.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-11-20 10:53:44 -06:00
Tre
7c02b3279c
[Ownership] Assign test files to fleet team (#200939)
## Summary

Assign test files to fleet team

Contributes to: #192979
2024-11-20 10:41:57 -06:00
Philippe Oberti
7ee9f0065e
[Security Solution] - fixes small issues in ftr security configs (#199389)
## Summary

This PR moves a couple of entries from
`.buildkite/ftr_security_stateful_configs.yml` to
`.buildkite/ftr_security_serverless_configs.yml` as they seemed to be
related to serverless.
2024-11-20 10:39:18 -06:00
Tre
cd7d0ab6f0
[Ownership] Assign test files to observability-ui team (#200942)
## Summary

Assign test files to observability-ui team

Contributes to: #192979
2024-11-20 10:38:11 -06:00
Tre
ad03671873
[Ownership] Assign test files to obs-ux-infra_services-team (#200937)
## Summary

Assign test files to obs-ux-infra_services-team

Contributes to: #192979
2024-11-20 10:37:10 -06:00
Kibana Machine
0043379b98
Authorized route migration for routes owned by @elastic/security-defend-workflows (#198197)
### Authz API migration for authorized routes

This PR migrates `access:<privilege>` tags used in route definitions to
new security configuration.
Please refer to the documentation for more information: [Authorization
API](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization)

### **Before migration:**
Access control tags were defined in the `options` object of the route:

```ts
router.get({
  path: '/api/path',
  options: {
    tags: ['access:<privilege_1>', 'access:<privilege_2>'],
  },
  ...
}, handler);
```

### **After migration:**
Tags have been replaced with the more robust
`security.authz.requiredPrivileges` field under `security`:

```ts
router.get({
  path: '/api/path',
  security: {
    authz: {
      requiredPrivileges: ['<privilege_1>', '<privilege_2>'],
    },
  },
  ...
}, handler);
```

### What to do next?
1. Review the changes in this PR.
2. You might need to update your tests to reflect the new security
configuration:
  - If you have tests that rely on checking `access` tags.
  - If you have snapshot tests that include the route definition.
- If you have FTR tests that rely on checking unauthorized error
message. The error message changed to also include missing privileges.

## Any questions?
If you have any questions or need help with API authorization, please
reach out to the `@elastic/kibana-security` team.

Co-authored-by: Joey F. Poon <joey.poon@elastic.co>
Co-authored-by: Gergő Ábrahám <gergo.abraham@elastic.co>
Co-authored-by: Tomasz Ciecierski <tomasz.ciecierski@elastic.co>
2024-11-20 10:31:19 -06:00
Alberto Blázquez
2bef2c0d2c
Remove Container Workload Protection link from Assets page (#200895)
## Summary

Closes https://github.com/elastic/security-team/issues/10741.

As the name suggests, it simply removes the link to the "Container
Workload Protection" link from the Cloud section in the Assets page. The
Cloud section is kept though, since the screenshot in the ticket doesn't
highlight it.

### Testing

> [!NOTE]
>  Note this page is only accessible in Serverless.

Authenticate to Docker Registry with
```bash
docker login -u albertoblaz -p <YOUR_PASSWORD> docker.elastic.co
```

Then run ES with

```bash
yarn es serverless --projectType security --kill
```

Alternatively, run Kibana with
```bash
yarn serverless-security
```

### Screenshot

Link removed, but Cloud section is kept:

<details><summary>Before</summary>
<img width="2043" alt="before"
src="https://github.com/user-attachments/assets/e0421c83-6f62-49f9-bb46-26e8e828f10b">
</details> 

<details><summary>After</summary>
<img width="2514" alt="Screenshot 2024-11-20 at 12 05 01"
src="https://github.com/user-attachments/assets/51ac7f1f-086a-4fe2-846a-5511fc8e0f82">
</details> 

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2024-11-20 10:30:57 -06:00
Mark Hopkin
4c295893ba
[Entity Analytics] Sort asset criticality by @timestamp by default + unskip serverless tests (#200712)
## Summary

Closes https://github.com/elastic/kibana/issues/189067

These asset criticality tests were failing in serverless because it
seems queries without a specified sort order behave differently in
serverless vs ESS.

I have made it so that asset criticality sorts by timestamp by default,
this makes serverless the same as ESS.

I have backported to 8.16 as I think the more tests that run, the
better.
2024-11-20 17:27:42 +01:00
Thomas Neirynck
1378c10a4f
[Docs] fix typo (#200812)
## Summary

Fix typo in PR template.

### 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]
[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_node:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)~

### 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.
2024-11-20 11:15:57 -05:00
florent-leborgne
d2dac36116
[Docs] Add release notes for 8.16.1 (#200693)
This PR adds release notes for the 8.16.1 release of Kibana.

Closes: https://github.com/elastic/platform-docs-team/issues/566
Rel: https://github.com/elastic/dev/issues/2884
2024-11-20 17:04:18 +01:00
Sergi Romeu
d0b5a57cca
[APM] Migrate /transactions to deployment agnostic test (#200694)
## Summary

Closes https://github.com/elastic/kibana/issues/198997
Part of https://github.com/elastic/kibana/issues/193245

This PR contains the changes to migrate `transactions` test folder to
Deployment-agnostic testing strategy.

### How to test

- Serverless

```
node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.apm.serverless.config.ts
```

It's recommended to be run against
[MKI](https://github.com/elastic/kibana/blob/main/x-pack/test_serverless/README.md#run-tests-on-mki)

- Stateful
```
node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.apm.stateful.config.ts
```

## Checks

- [x] (OPTIONAL, only if a test has been unskipped) Run flaky test suite
- [x] local run for serverless
- [x] local run for stateful
- [x] MKI run for serverless 

<!--ONMERGE {"backportTargets":["8.x"]} ONMERGE-->
2024-11-20 09:48:14 -06:00
Dzmitry Lemechko
88a280c250
[chore] remove unused nyc configs and dependencies (#200909)
## Summary

nyc (istanbuljs) cleanup as we no longer collect code coverage for
functional tests
2024-11-20 16:41:30 +01:00
Kevin Delemme
684a1308d2
chore(slo): remove deprecated theme provider and usage of styled-components (#200248) 2024-11-20 10:37:32 -05:00
Shahzad
c9540d9d54
[Synthetics] SLO Availability sync delay field to use timestamp instead of event.ingested !! (#199308)
## Summary

Fixes https://github.com/elastic/kibana/issues/196548

SLO Availability sync delay field to use `@timestamp` instead of
`event.ingested` !!


### Testing

- Make sure Synthetics availability SLOs works as expected in serverless
and stateful
- Make sure when SLO is updated, it continues to work
2024-11-20 16:36:33 +01:00
Jusheng Huang
c82e6edb97
[Index Management] Feature add button handler for the ilm banner via extension service (#199077)
## Summary

Close #27159 

Add a button handler for the ilm banner. 


![image](https://github.com/user-attachments/assets/c3314a4d-8632-4913-8ea5-6dba5f9d3659)

UI reference Eui callout component style.
[https://eui.elastic.co/#/display/callout#warning](https://eui.elastic.co/#/display/callout#warning)


![image](https://github.com/user-attachments/assets/92f4afcf-3a14-491f-9ce8-31d4b4efc430)
2024-11-20 15:28:50 +00:00
Larry Gregory
8ce1c466e3
Dependency ownership for Shared UX team, part 1 (#200794)
## Summary

This updates our `renovate.json` configuration to mark the Shared UX
team as owners of their set of dependencies. I made an attempt to group
the dependencies into logical groups, but this is easily changed if
desired.
2024-11-20 08:59:52 -06:00
Tim Sullivan
226924eafe
[Spaces UI] Role Editor Flyout Should Match in Roles Mgmt (#198182)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1242

**Fixes for alignment of the Role editor flyout**
1. Remove the warning callout regarding global privileges that impact
other privileges
1. Unify the info callouts regarding combination of privileges
1. set "Customize" as the default selected option when assigning new
privileges
1. update placeholders for selector box when assigning privileges
1. Hide privileges controls if no spaces are selected
1. Update button group label text to "Define privileges" and align
helper texts below
1. Align headers for assign/edit states
1. Remove descriptions under headers
1. Update size of info callout above button group to small
1. Reduce text size for the "Manage roles" link
1. Remove the "Additional Stack Management permissions can be found
outside of this menu..." test for the Spaces Management context.

**Polish fixes**
1. Remove features visible column
1. ~~Remove identifier column from spaces grid~~
1. Fix vertical alignment of non-current space name in table
1. Ordered the listing of assigned roles during and after search
1. Removing a role from the space shows a confirmation modal
1. Update columns widths in the spaces grid
1. Remove the "By default your current view is Classic" callout

### Checklist

Delete any items that are not applicable to this PR.

- [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] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] 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))
- [x] 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))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
2024-11-20 07:39:41 -07:00
Elena Shostak
d435b8a892
[Spaces] spaces selector page background (#199981)
Removed `panelled` property that was covering the background image.
From [EUI
docs](https://eui.elastic.co/#/templates/page-template/examples#simple-page-with-header-and-sections)
`panelled` - adds a white background and shadow to define the area.

__Closes: https://github.com/elastic/kibana/issues/194193__

## Release Note
Removed `panelled` property that was covering the background image for
Spaces Selector page.
2024-11-20 08:23:45 -06:00
Paulina Shakirova
971c1f3c35
fix: make panel top nav menu item button full width on mobile (#200823)
## Summary

This PR solves [[Dashboard] Center Save top nav button for small
viewport](https://github.com/elastic/kibana/issues/180093#top) issue.

![Screenshot 2024-11-19 at 23 02
16](https://github.com/user-attachments/assets/ac643c61-62d5-4512-af35-33c396f6aba1)

![Screenshot 2024-11-19 at 23 01
31](https://github.com/user-attachments/assets/4d2021fb-a08b-4626-a203-07b52f3cbe55)

The change only affects the mobile menu.
2024-11-20 14:56:41 +01:00
elastic-renovate-prod[bot]
942848413a
Update dependency @elastic/request-converter to ^8.16.1 (main) (#200885) 2024-11-20 14:51:34 +01:00