Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Check for indices before enabling get search profile in serverless (#201630) #202972

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…lastic#201630)

Closes [elastic#195342](elastic#195342)

## Summary
In serverless, the default query for the search profiler fails if there
is not indices. For avoiding this error, when there are no indices
present, this PR disabled the "Profile" button and add a tooltip
explaining why it is disabled.

### New strings
This is the tooltip for string verification @kibana-docs
[[Code](https://github.com/elastic/kibana/pull/201630/commits/5832a76683ad0cf55558655ca5981d623f344b72?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R154-R1552?diff=unified&w=0#diff-bf48cd9834b39a2a1634680225fc63c9a4ddb3ca881d9120f648006ad0277046R155)]:
<img width="460" alt="Screenshot 2024-11-25 at 16 15 08"
src="https://github.com/user-attachments/assets/a3395cfb-fc5e-4c22-9dd8-954a60fd1b5d">

### How to test
* Run Kibana in serverless
* Go to Index Management and verify you haven't indices (or delete them
if you do have indices).
* Go to Dev Tools and click the Search Profiler tab. Verify that the
button is disabled and the tooltip displayed if you hover over it.
* Go back to Index Management and create one or more indices.
* Go back to Dev Tools > Search Profiler. Now the button should be
enabled and the profile should be created if you click it.

### Demo

https://github.com/user-attachments/assets/9bda072e-7897-4418-a906-14807e736c44

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

---------

Co-authored-by: Elastic Machine <[email protected]>
(cherry picked from commit 41bd2af)
@kibanamachine kibanamachine merged commit a692f65 into elastic:8.x Dec 4, 2024
11 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
searchprofiler 78 79 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
searchprofiler 48.2KB 48.8KB +587.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
searchprofiler 15.5KB 15.7KB +132.0B

cc @SoniaSanzV

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants