forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
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
[pull] main from elastic:main #698
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The index migration checks were broken, so we were not showing our warnings when upgrade mode is set to `true` <img width="1139" alt="image" src="https://github.com/elastic/kibana/assets/22172091/8ede466b-c9e9-4ad9-a21a-d7e955b82247"> Also adds the warning to the ML stack management page so it is correctly displayed rather than an access denied page. <img width="1140" alt="image" src="https://github.com/elastic/kibana/assets/22172091/b78e4a60-109b-4ea7-8c7f-021ad26a3313"> To test, set `POST _ml/set_upgrade_mode?enabled=true` Fixes #176773
…kdown is invalid (#187346)
…ttings (#187371) ## Summary Remove the "Enable Universal Profiling integration in APM" setting from Advanced Settings Tab not displayed <img width="1466" alt="image" src="https://github.com/elastic/kibana/assets/2767137/48c80f8a-5805-4740-9a58-602eddad4576"> Setting not available <img width="1724" alt="image" src="https://github.com/elastic/kibana/assets/2767137/1871c6c9-0a6b-454c-b3a5-bbb067eb27d9"> # How to test - `yarn es serverless --projectType=oblt --clean --no-ssl` - `yarn start --serverless=oblt --no-ssl` - Navigate to Advanced Settings
## Summary Updated UI FTR tests to not run with operator privileges. Fixes #184743
…down needs a semantic label for the current check (#187353) Closes: elastic/observability-dev#3689 ## Description The synthetics monitors include thumbnail screenshots that open a larger preview window. These thumbnails must take keyboard focus, manage the `Enter` and `Space` keypresses to open the modal, and return focus to the originating thumbnail when the modal is closed. Screenshots attached below. ### Steps to recreate 1. Open the [Synthetics](https://keep-serverless-fyzdg-f07c50.kb.eu-west-1.aws.qa.elastic.cloud/app/synthetics) view 2. Create a monitor if none exist 3. Click on that monitor and navigate to the full monitor detail 4. Click the ["View test run link" ](https://keep-serverless-fyzdg-f07c50.kb.eu-west-1.aws.qa.elastic.cloud/app/synthetics/monitor/8b88e937-f917-4f12-9325-8ab005cffea5/test-run/90a1abac-3579-11ef-b9d4-4e0e2c056918-1?locationId=us_central_qa)in the Last test run module (about 2/3 of the way down the page) 5. Open the "Date" dropdown in the top right 6. Either listen to the dropdown nodes with a screen reader or evaluate with Dev Tools Accessibility Tree. This will show you a standard, non-semantic div for the current check. ### What was changed?: 1. `aria-label` attribute was added to address that issue 2. similar changes were applied to 3 places: - `x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/step_details_page/step_page_nav.tsx` - `x-pack/plugins/observability_solution/uptime/public/legacy_uptime/components/monitor/synthetics/step_detail/step_page_nav.tsx` - `x-pack/plugins/observability_solution/uptime/public/legacy_uptime/pages/synthetics/checks_navigation.tsx` ### Screen <img width="1269" alt="image" src="https://github.com/elastic/kibana/assets/20072247/dc1f4711-a834-4d06-825f-8fb6d49891d0">
## Summary - Adds `weighted_avg` function definition - Adds basic smoke tests ### 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)
include entity type in EEM output docs
…eration (#187147) ## Summary After improving the synthtrace data creation for containers we were able to add more specific tests for container view, the aim of this spacetime is to add some improvements to hosts so we can in the future use synthtrace for testing ### What was done First I thought that adding `event.dataset` was needed to get the metadata, or make the request work, as I did for containers, but in containers was needed not because of the metadata query itself but the integration check to know if we need to display k8s or docker metrics. I simplified the scenarios and data generation in the tests, adding the metadata fields we need in the synthtrace clients for host and docker and k8s containers, the values of the metadata fields doesn't need to change for different scenarios, so it's ok to have them set in the client.
## Summary This PR fixes the telemetry code for annotation layers adding some dedicated unit test for the event logic. ### 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
…es under enterprise plan (#187447) ## Summary In #186871 I forgot to replace one instance of `enableReusableIntegrationPolicies` with the new hook `canUseMultipleAgentPolicies`. This could potentially cause a bug once the flag is enabled, as that component should only be visible to enterprise users. It's a very minor change anyway so I don't think there's any issue in merging after FF.
#187334) ## Summary Related to #75867 Handling multiple policies in package policy edit extension view, made changes in CSP. @elastic/kibana-cloud-security-posture Hey, could you help me how can I create an agentless policy to test with? ### 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
## Summary To bring more attention about #183512 and make sure newly added tests do not use basic auth with operator <img width="917" alt="image" src="https://github.com/elastic/kibana/assets/10977896/22926c83-f97d-49c3-99a0-3c41f744d34c">
…[scope="row"] for SR usability: 0001 (#186591) Closes: elastic/observability-dev#3533 ## Summary `rowHeader` attribute was added for the following table ![image](https://github.com/elastic/kibana/assets/20072247/215633af-bff4-4581-9d7e-a9826f1e63d4) ### Screens <img width="1585" alt="Screenshot 2024-06-21 at 10 52 51" src="https://github.com/elastic/kibana/assets/20072247/de9bbec9-737e-48fd-aa9d-73d4d2069f15">
make EntityDefinition 'type' a plain string instead of an enum
…187370) ## Summary Closes #187331 Update package policies with multiple agent policy references to remove deleted agent policy id. See steps to verify in the linked issue. - create an integration policy and add it to multiple agent policies - delete one agent policy - verify that the edit integration policy page loads, and the integration policy is linked to the remaining agent policies <img width="1305" alt="image" src="https://github.com/elastic/kibana/assets/90178898/a0c3dc22-b703-42ab-b40d-91c2723cce01"> <img width="1257" alt="image" src="https://github.com/elastic/kibana/assets/90178898/218bf1aa-7208-49f5-8bdc-e09b47c2924e"> ### 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
…187444) ## Summary Fixes #176544. Fixes #187421. Fixes #176119. Fixes #176425. Fixes #175855. Fixes #175911. Fixes #176780. Follow up to #186182. Reenables and stabilizes APM correlations API integration tests. Review hint: View with the `w=1` flag to ignore whitespace changes: https://github.com/elastic/kibana/pull/187444/files?w=1 ### 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 - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [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)
…page in ML plugin in Observability serverless. (#186509) ## Summary Part of #181111. This adds O11y AI Assistant's contextual insight to the Log Rate Analysis page in the ML plugin for O11y serverless projects.. Note the code is almost an exact copy of what's currently used in the O11y UI itself to render the contextual insight when log rate analysis gets embedded on alert details pages. As a follow up we will be able to consolidate some code. [aiops-ai-assistant-contextual-insight-0001.webm](https://github.com/elastic/kibana/assets/230104/08269a40-f45a-4eb9-bd4d-a249cdd46266) To test this you need to set up AI Assistant in your `kibana.dev.yml`: ```yml xpack.actions.preconfigured: my-gen-ai: name: Preconfigured Azure OpenAi actionTypeId: .gen-ai config: apiUrl: <YOUR-API-URL> apiProvider: 'Azure OpenAI' secrets: apiKey: <YOUR-API-KEY> ``` ### 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 - [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)
…pdate APIs (#187467) ## Summary Relates elastic/ingest-dev#3464 Added check to reject integration policy shared by multiple agent policies if Enterprise license is not available. ### Testing - Enable a local enterprise licence ([steps](https://elasticco.atlassian.net/wiki/spaces/PM/pages/46802910/Internal+License+-+X-Pack+and+Endgame)) - Enable flag `enableReusableIntegrationPolicies` - Try create/update package policy API with multiple `policy_ids`, expect to work Repeat the steps with any lower licence, the API should reject the request with a 400 error. ``` POST kbn:/api/fleet/package_policies { "policy_ids": [ "policy-1", "policy-2" ], "package": { "name": "apache", "version": "1.20.0" }, "name": "apache-4", "description": "", "namespace": "", "inputs": [] } ``` Test with Basic license: <img width="910" alt="image" src="https://github.com/elastic/kibana/assets/90178898/d99b3765-0b0b-4abd-ae4c-dc9f396a465a"> Test with Enterprise license: <img width="910" alt="image" src="https://github.com/elastic/kibana/assets/90178898/d42b761e-32f0-46b6-95a8-0a565f898532"> ### 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
…ns to timeslider (#186656) ## Summary The primary goal of this PR is to clean up the styling of the `ControlPanel` component for the new React control renderer. Specifically, this fixes the following: - I switched the inline Emotion styling to CSS classes instead - I made it so that the timeslider control renders the drag handler in edit mode and **doesn't** render the empty icon for the drag handler in view mode <p align="center"><img width="600px" src="https://github.com/elastic/kibana/assets/8698078/d5bf169b-2106-4f88-9698-f00162809d0a"/><p> - I fixed the timeslider prepend so that it no longer wraps <p align="center"><img width="500px" src="https://github.com/elastic/kibana/assets/8698078/7859d67b-1454-45b5-b7d8-7000086641a7"/><p> - I moved the error component into the `EuiFormControlLayout` component, which ensures that the drag handler is rendered for when a control has a blocking error. I also fixed the styling for the error component: <p align="center"><img width="600px" src="https://github.com/elastic/kibana/assets/8698078/13e0f041-8c51-494c-9079-323ed518c87b"/><p> When I was working on these style changes, I noticed that the timeslider control wasn't implementing `CanClearSelections` which meant that it no longer had the clear selections action. This made me realize that this interface should probably be part of the `DefaultControlApi` rather than `DefaultDataControlApi` so, I moved it and added `clearSelections` to the timeslider API. <p align="center"><img width="600px" src="https://github.com/elastic/kibana/assets/8698078/47f7b648-bb2d-4158-b058-456bfdf5cdb5"/><p> ### Checklist - [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)) ### 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 <[email protected]>
) # Summary Updated the API FTR tests to not run with operator privileges. Fixes #184742
…87064) ## Summary Part of #186530. This PR sets the basis for allowing namespaced usage counters. It relocates `usage-counters` SO type from `.kibana` to a dedicated `.kibana_usage_counters`. Furthermore, the original SO type is removed, and replaced by 2 separate types: * `server-counters` * `ui-counters` Note that these 2 steps are necessary if we want to leverage `namespaces` property of the saved objects. We can't currently update the `namespaceType: 'agnostic'` without causing a migration. Thus, these two types will be defined as `namespaceType: single`. Up until now, UI counters were stored under a special `domainId: uiCounter`. This forced a workaround that consisted in storing `appName:eventName` in the `counterName` property of the SO. Having a dedicated SO type for them allows to store `appName` as `domainId`, avoiding the need for a [workaround](https://github.com/elastic/kibana/blob/main/src/plugins/usage_collection/common/ui_counters.ts). --------- Co-authored-by: kibanamachine <[email protected]>
…source document has a non-ECS compliant sub-field with data under event field (#187384) (#187549) ## Summary Ticket #187384 These changes fix the error on saving the alert > An error occurred during rule execution: message: "[1:6778] failed to parse field [kibana.alert.original_event.action] of type [keyword] in document with id '027b925ae2799635a0dee97a6aa9d58dc87d9771'." which happens due to not stripping non-ECS compliant sub-fields of the `event.action` field. See the main ticket for steps to reproduce the issue.
This changes the resource names from being stateful to being static. This makes it easier to import them since they don't have to be passed around, and "go-to-definition" actually takes you to the implementation point instead of the types.
… mode (#187653) ## Summary fix #187570 The problem was that when the system/browser was in dark mode, the default text color became white, but the background was forced to a specific bright color, so the text became unreadable. A quick fix is to also force the text color (I used EUI text colors) <img width="858" alt="Screenshot 2024-07-05 at 12 44 11" src="https://github.com/elastic/kibana/assets/7784120/9ccefc04-60f6-46e3-a649-4e47cad043ac">
…nt (#186373) ## Summary Adds an OpenAPI schema for the timeline resolve endpoint. (Fixes #183810) Co-authored-by: Elastic Machine <[email protected]>
## Summary Closes #183196 ### Checklist - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed
## Summary This PR removes `@timestamp` from the latest index template mappings. This will help users who explore `.entities-observability.latest-v1.*` in Discover ES|QL by using the date picker to filter the results. ### Testing Using the following ES|QL in Discover: ``` FROM .entities-observability.latest-v1.* | LIMIT 10 ``` The date picker should look like this: <img width="932" alt="image" src="https://github.com/elastic/kibana/assets/41702/bf75c785-44f6-41b9-b12f-661327012819"> Co-authored-by: Milton Hultgren <[email protected]>
…API (#187261) This PR adds OpenAPI schemas for Defend Workflows API endpoints that previously didn't have them. Here are the changes made: 1. Added a schema for `/api/endpoint/isolate`, which is deprecated and now redirects as a `308` to the new path (`/api/endpoint/action/isolate`). It's tagged with `x-labels` as `ess` only. 2. Added a schema for `/api/endpoint/unisolate`, which is deprecated and now redirects as a `308` to the new path (`/api/endpoint/action/unisolate`). It's tagged with `x-labels` as `ess` only. 3. Added a schema for `/api/endpoint/protection_updates_note/{package_policy_id}`. 4. Added `x-labels` field to all existing Defend Workflows API paths for proper tagging. For more information on `x-labels`, please refer to #184348
…ES|QL (#187244) - Closes #184624 ## Summary This PR updates the logic to show Unsaved changes badge when view mode changes in ES|QL mode. ### 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: Matthias Wilhelm <[email protected]>
* Update onboarding manifest based on elastic/opentelemetry-dev#307 * Use latest snapshot
… so that it fails when new commands are added (#187491) ## Summary Updates test so that it fails whenever we add a introduce a new responder command. ### 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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed
## Summary We are updating the namings of the QG to be aligned with the requirements given by Kibana.
…#187509) ## Summary > [!WARNING] > Beware - the longest description ever for a one line change is incoming. > > ![The-Hangover-Math-GIF-source](https://github.com/elastic/kibana/assets/8698078/3ab94f20-0401-4c42-9bb2-c35b6025301b) > > **TLDR:** We were previously `await`ing the initialization of the control group before navigating to the destination dashboard, which caused a race condition where, if the control group had time to report unsaved changes before the initialization promise was resolved, the control group's input would get backed up under the wrong ID. If we no longer `await` control group initialization, we remove this race condition. Previously, on dashboard navigation, we were `await`ing the initialization of the control group before navigating to the destination dashboard - this was because, before #174201, the control group could change its selections and the dashboard needed to know the most up-to-date control group output before it could start loading its panels. However, once #175146 was merged and the control group started reporting its own unsaved changes, this caused a race condition on navigation depending on whether or not the dashboard had time to backup its unsaved changes to the session storage before the control group was initialized. ### Description of the race condition Consider the following repro steps: 1. You start at your source dashboard (which has no controls), clear your cache, and slow down your network speed. 2. You click on a markdown link to navigate to your destination dashboard (which has controls). 3. You think everything worked as expected - hoorah! 4. You click on a markdown link to navigate back to your source dashboard.... but your source dashboard now has the controls of your destination dashboard! What just happened? > [!NOTE] > If the initialization of the control group happens **before the dashboard has a chance to backup the control group input to session storage under the wrong ID**, then this bug does not happen - that is why it is important to slow down the network speed when trying to reproduce this, and it is also why this bug was more prevalent on Cloud than local instances of Kibana. https://github.com/elastic/kibana/assets/8698078/91f9b9e1-87f0-44aa-b596-577dd4a541f9 On step 2 when the markdown link is clicked, this is what happens in the code: 1. The `navigateToDashboard` method is called. 2. The control group is told to update its input and reinitialize via the call to `controlGroup.updateInputAndReinitialize` in the `initializeDashboard` method. 3. The dashboard is `await`ing the initialization of the control group before proceeding with navigation. 4. The control group is updated, which triggers its `unsavedChanges` subscription - this is comparing its own state to that of the **source** dashboard, which is the **wrong** input to be comparing against. 5. The control group reports to the dashboard that it **has** unsaved changes. 6. The dashboard backs up its unsaved changes to session storage under the wrong ID since navigation hasn't happened yet - i.e. the **destination dashboard's** control group input gets backed up under the **source dashboard's ID** 7. Finally, the control group reports that it is initialized and the dashboard can proceed with navigation - so, the dashboard ID changes and its input gets updated. 8. This triggers the control group to **once again** trigger the `unsavedChanges` subscription - this time, the comparison occurs with the **proper** dashboard input (i.e. the input from the **destination** dashboard). Assuming no previous unsaved changes, this would return **false** (i.e. the control group reports to the dashboard that it has **no** unsaved changes). On step 3, that is why the destination dashboard appears as expected - it has the correct controls, and no unsaved changes. But then, on step 4, this is what happens: 1. The `navigateToDashboard` method is called. 2. We fetch the session storage so that the "unsaved changes" can be applied to the dashboard saved object 3. Uh oh! As described in step 6 above, the session storage for the source dashboard includes the control group input from the **destination** dashboard! 4. So, when you go back to the source, the destination dashboard's controls come with you 🔥 🔥 🔥 ### Description of the fix Now, let's instead consider what happens when we **don't** `await` the control group initialization - if we go back to step 2 of the repro steps, then this is what happens in the code: 1. The `navigateToDashboard` method is called. 2. The control group is told to update its input and reinitialize via the call to `controlGroup.updateInputAndReinitialize` in the `initializeDashboard` method. 3. The dashboard is **not** waiting for initialization, so it goes ahead with navigation **before** the control group has time to report its unsaved changes (the control group's unsaved changes subscription is debounced). 4. Navigation occurs and **nothing** gets backed up to session storage! That is why, by no longer waiting for the control group to be initialized on navigation, we are no longer seeing the bug where controls were getting "replaced" on navigation: https://github.com/elastic/kibana/assets/8698078/0e45a207-ff2a-46a6-9609-11a8dc5bcf67 ### 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)
This PR aligns the naming of the entity discovery framework components to the following pattern: `entities-{schema version}-{history|latest}-{definition ID}` (with a few differences here and there, the index has a leading dot, some indices have a date after them). --------- Co-authored-by: Chris Cowan <[email protected]> Co-authored-by: kibanamachine <[email protected]>
## Summary Follow up to #187064 * Improves the `rollups.test.ts` integration test. * Adds the `count` field to the mappings, so that it can be aggregated.
Resolves: #187268 This PR classifies the verification_errors thrown by the Elasticsearch Query (ES|QL) rules as user error. ## To verify Create an Elasticsearch Query with ES|QL and use anon-existing field in the query. Let the rule run. `/api/task_manager/metrics?reset=false` should show a user error under `alerting:__es-query"` ``` "alerting:__es-query":{"success":0,"not_timed_out":1,"total":1,"total_errors":1,"user_errors":1,"framework_errors":0} ``` --------- Co-authored-by: kibanamachine <[email protected]>
…187594) This PR is a simple update of our pipeline resource definition files after the recent bumps. --------- Co-authored-by: Jonathan Budzenski <[email protected]>
Fixes #174970 Fixes #186044 ## Summary Migrates the legacy Links embeddable to the React embeddable framework. Additionally, the new embeddable factory now resolves the dashboards info prior to rendering the Links component. Prior to this change, the `DashboardLinkComponent` would be responsible for asynchronously loading dashboards info and rendering a loading icon. This change reduces the complexity of the `DashboardLinkComponent` as the resolved state is now passed in as props. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Hannah Mudge <[email protected]>
## Summary Updates to unified field list on typing are debounced - this way we don't get so many updates when typing in the search input. Flaky test runner: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6424 ## Performance comparison Test: typing the string: activem for metricbeat data (~6000 fields) before (costly update on every keystroke): <img width="669" alt="Screenshot 2024-06-28 at 17 28 38" src="https://github.com/elastic/kibana/assets/4283304/7075f7bc-2d90-4177-acac-69ac101b2ef1"> after (only one costly update when user stops typing): <img width="269" alt="Screenshot 2024-06-28 at 17 24 43" src="https://github.com/elastic/kibana/assets/4283304/8c0ce4a3-7c1a-428b-a482-f6b4d87911e0">
## Summary Skips failing tests in MKI environments.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )