Commit graph

56 commits

Author SHA1 Message Date
Alejandro Fernández Haro
11b750b10a
Minimize shared-common everywhere (#188606)
## Summary


![8xfggo](https://github.com/user-attachments/assets/f3d9312f-2ad3-4fa2-9daf-01e2b1ad6cac)

At the moment, our package generator creates all packages with the type
`shared-common`. This means that we cannot enforce boundaries between
server-side-only code and the browser, and vice-versa.

- [x] I started fixing `packages/core/*`
- [x] It took me to fixing `src/core/` type to be identified by the
`plugin` pattern (`public` and `server` directories) vs. a package
(either common, or single-scoped)
- [x] Unsurprisingly, this extended to packages importing core packages
hitting the boundaries eslint rules. And other packages importing the
latter.
- [x] Also a bunch of `common` logic that shouldn't be so _common_ 🙃 

### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-29 12:47:46 -06:00
Rachel Shen
9579635c25
[Share Modal Redesign] Reporting Refactor Modals (#180009)
## Summary

This PR refactors https://github.com/elastic/kibana/pull/179206 to have
each export type be registered in Reporting and then passed into the
share plugin.

This PR is focused on the redesign in terms of the export modals. Test
refactoring will be done in a separate PR.
Partially closes https://github.com/elastic/kibana-team/issues/753

- [x] Need to refactor this PR to include @eokoneyo's general modal
component
- [x] Lens needs to have Export with all three report type options - to
avoid circular dependencies move the Lens CSV stuff into the reporting
plugin vs having it in Lens
- [x] Canvas should not be affected by these changes (so the old
share/reporting code has to stay for canvas)
https://github.com/elastic/kibana/issues/151523 to keep in mind for the
redesign

Failed tests will be covered in this PR
https://github.com/elastic/kibana/pull/180406


### TO TEST 

Mark `share.new_version.enabled: true` in your kibana.dev.yml


### 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)
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))

---------

Co-authored-by: Eyo Okon Eyo <eyo.eyo@elastic.co>
Co-authored-by: Tim Sullivan <tsullivan@users.noreply.github.com>
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
2024-04-16 15:01:44 -07:00
Nick Partridge
2b344d2797
[FTR] Update getAttribute method return (#179715) 2024-04-10 10:28:03 -07:00
Davis McPhee
b4836ace2f
Unskip flaky test from #175579 (#176981)
## Summary

This PR unskips the tests skipped in #175579.

Flaky test runner x50:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/5194.

Resolves #175579.

### Checklist

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

### 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: Julia Rechkunova <julia.rechkunova@elastic.co>
2024-02-15 14:29:23 -04:00
Tre
986116133f
[FTR] Refactor toasts svc (#174222)
### Summary

Refactoring general ui service (test helpers), to a kbn package.
  - Optimize methods and drop some code duplication.
  
### Why 

  - Makes the service easily available from multiple code areas. 
- This is a preparation to potentially moving tests to plugins /
packages, where they would no longer be able to import thing from test
or x-pack/test but only from a package.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-02-14 09:24:20 +00:00
Umberto Pepato
7424285ab6
[RAM] Implement global alerts page (#175143)
Adds a global alerts page to the Stack management section to allow users
to browse alerts across different solutions/apps through a unified UX.

Refs #166709
Closes #173647
Closes #173650
Closes #173648
2024-02-13 19:57:14 +01:00
Tiago Costa
5d9dcec93f
skip flaky suite (#175579) 2024-01-25 16:44:17 +00:00
Philippe Oberti
5230db4865
[Security Solution] remove unnecessary showExpandToDetails property (#168048) 2023-10-24 16:49:25 -05:00
Cee Chen
feab0c6597
Upgrade EUI to v89.1.0 (#169135)
`v89.0.0``v89.1.0`

This upgrade also contains an EuiDataGrid refactor
(https://github.com/elastic/eui/pull/7255) not listed in the changelog
(as no end-user functionality or props changed as a result of the
refactor). The unlisted changes should only affect DOM and `className`
usages in Kibana (primarily CSS overrides and test selectors).

---

## [`89.1.0`](https://github.com/elastic/eui/tree/v89.1.0)

- Added `tokenVectorSparse` token and updated `tokenDenseVector` token
(now named `tokenVectorDense`).
([#7282](https://github.com/elastic/eui/pull/7282))

**CSS-in-JS conversions**

- Reduced default CSS prefixes generated by Emotion to only browsers
supported by EUI (latest evergreen browsers). This can be customized by
passing your own Emotion cache to `EuiProvider`.
([#7272](https://github.com/elastic/eui/pull/7272))
2023-10-19 11:41:06 -07:00
Zacqary Adam Xeper
5b1ae6683f
[RAM] Add bulk action to Untrack selected alerts (#167579)
## Summary

Part of #164059

<img width="301" alt="Screenshot 2023-09-28 at 5 38 45 PM"
src="1b9ae224-7dad-43d7-a930-adf9458e1613">
<img width="486" alt="Screenshot 2023-09-28 at 5 38 11 PM"
src="82eeec3d-af2c-4257-b78e-99aea5a6b66f">

This PR:

- Moves the `setAlertStatusToUntracked` function from the `AlertsClient`
into the `AlertsService`. This function doesn't actually need any Rule
IDs to do what it's supposed to do, only indices and Alert UUIDs.
Therefore, we want to make it possible to use outside of a created
`AlertsClient`, which requires a Rule to initialize.
- Creates a versioned internal API to bulk untrack a given set of
`alertUuids` present on `indices`. Both of these pieces of information
are readily available from the ECS fields sent to the alert table
component, from where this bulk action will be called.
- Switches the `setAlertStatusToUntracked` query to look for alert UUIDs
instead of alert instance IDs.
https://github.com/elastic/kibana/pull/164788 dealt with untracking
alerts that were bound to a single rule at a time, but this PR could be
untracking alerts generated by many different rules at once. Multiple
rules may generate the same alert instance ID names with different
UUIDs, so using UUID increases the specificity and prevents us from
untracking alert instances that the user didn't intend.
- Adds a `bulkUpdateState` method to the task scheduler.
https://github.com/elastic/kibana/pull/164788 modified the `bulkDisable`
method to clear untracked alerts from task states, but this new method
allows us to untrack a given set of alert instances without disabling
the task that generated them.

#### Why omit rule ID from this API?

The rule ID is technically readily available from the alert table, but
it becomes redundant when we already have immediate access to the alert
document's index. https://github.com/elastic/kibana/pull/164788 used the
rule ID to get the `ruleTypeId` and turn this into a corresponding
index, which we don't have to do anymore.

Furthermore, it helps to omit the rule ID from the `updateByQuery`
request, because the user can easily select alerts that were generated
by a wide variety of different rules, and untrack them all at once. We
could include the rule ID in a separate `should` query, but this adds
needless complexity to the query.

We do need to know the rule ID after performing `updateByQuery`, because
it corresponds to the task state we want to modify, but it's easier to
retrieve this using the same query params provided.

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jiawei Wu <jiawei.wu@cmd.com>
Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
2023-10-03 17:47:07 -07:00
Jiawei Wu
ba96a720f1
[RAM] Make Global Event Log Shareable (#163668)
## Summary
Resolves: https://github.com/elastic/kibana/issues/161788

Makes the global event log shareable. Plus some refactors like
converting the `rule_event_log_list_table` fetch to use React Query.

Also, fixed a bug with the `rule_status_panel` where we did not refresh
if the parent component refreshed.

### 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>
2023-08-23 09:20:34 -07:00
Rachel Shen
afb145cefb
Unskip report tests (#157885)
## Summary

Closes https://github.com/elastic/kibana/issues/156901,
https://github.com/elastic/kibana/issues/156902, and
https://github.com/elastic/kibana/issues/156106

As Tim discovered and mentioned in 156901 - these suite of tests were
skipped because of a new limit that was reverted in es
https://github.com/elastic/elasticsearch/pull/96031

Tests pass without any problems now.
2023-05-16 10:41:45 -06:00
Tiago Costa
43e48981c4
skip flaky suite (#156106) 2023-05-09 16:46:29 +01:00
Tim Sullivan
251cb77e10
Improve Reporting/Screenshotting tolerance factor for visual diff tests (#155813)
## Summary

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

I created new baseline images for the visual difference tests. I noticed
the main differences with some of the new images that were generated
were the dimensions of the PNG - which has to do with the size of the
test runner browser window.

To ensure that stays consistent, I have all the visual difference tests
explicitly set their window size in the beginning of the test.

Test runs:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2218
2023-05-04 07:33:58 -07:00
Davis McPhee
11a80ce559
[Search Sessions] Fix flaky partial results test in search examples (#155816)
## Summary

Unskip and fix flaky partial results test in search examples plugin.

Flaky test runner x100:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2172.

Fixes #116038.

### Checklist

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

### 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)
2023-04-27 20:27:59 -03:00
Spencer
1b85815402
[packages] migrate all plugins to packages (#148130)
Fixes https://github.com/elastic/kibana/issues/149344

This PR migrates all plugins to packages automatically. It does this
using `node scripts/lint_packages` to automatically migrate
`kibana.json` files to `kibana.jsonc` files. By doing this automatically
we can simplify many build and testing procedures to only support
packages, and not both "packages" and "synthetic packages" (basically
pointers to plugins).

The majority of changes are in operations related code, so we'll be
having operations review this before marking it ready for review. The
vast majority of the code owners are simply pinged because we deleted
all `kibana.json` files and replaced them with `kibana.jsonc` files, so
we plan on leaving the PR ready-for-review for about 24 hours before
merging (after feature freeze), assuming we don't have any blockers
(especially from @elastic/kibana-core since there are a few core
specific changes, though the majority were handled in #149370).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-02-08 21:06:50 -06:00
Jiawei Wu
7608dfb023
[RAM][Flapping] Make rules settings link with flapping settings shareable (#149564)
## Summary
Resolves: https://github.com/elastic/kibana/issues/148760

Makes the rules setting link that opens up the flapping settings modal
shareable from the `triggers_action_ui` plugin (`getRulesSettingsLink`).

Also adds storybook entires for this component (`rulesSettingsLink`). 

To view locally, run `yarn storybook triggers_actions_ui`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
2023-01-30 13:59:19 -08:00
Spencer
afb09ccf8a
Transpile packages on demand, validate all TS projects (#146212)
## Dearest Reviewers 👋 

I've been working on this branch with @mistic and @tylersmalley and
we're really confident in these changes. Additionally, this changes code
in nearly every package in the repo so we don't plan to wait for reviews
to get in before merging this. If you'd like to have a concern
addressed, please feel free to leave a review, but assuming that nobody
raises a blocker in the next 24 hours we plan to merge this EOD pacific
tomorrow, 12/22.

We'll be paying close attention to any issues this causes after merging
and work on getting those fixed ASAP. 🚀

---

The operations team is not confident that we'll have the time to achieve
what we originally set out to accomplish by moving to Bazel with the
time and resources we have available. We have also bought ourselves some
headroom with improvements to babel-register, optimizer caching, and
typescript project structure.

In order to make sure we deliver packages as quickly as possible (many
teams really want them), with a usable and familiar developer
experience, this PR removes Bazel for building packages in favor of
using the same JIT transpilation we use for plugins.

Additionally, packages now use `kbn_references` (again, just copying the
dx from plugins to packages).

Because of the complex relationships between packages/plugins and in
order to prepare ourselves for automatic dependency detection tools we
plan to use in the future, this PR also introduces a "TS Project Linter"
which will validate that every tsconfig.json file meets a few
requirements:

1. the chain of base config files extended by each config includes
`tsconfig.base.json` and not `tsconfig.json`
1. the `include` config is used, and not `files`
2. the `exclude` config includes `target/**/*`
3. the `outDir` compiler option is specified as `target/types`
1. none of these compiler options are specified: `declaration`,
`declarationMap`, `emitDeclarationOnly`, `skipLibCheck`, `target`,
`paths`

4. all references to other packages/plugins use their pkg id, ie:
	
	```js
    // valid
    {
      "kbn_references": ["@kbn/core"]
    }
    // not valid
    {
      "kbn_references": [{ "path": "../../../src/core/tsconfig.json" }]
    }
    ```

5. only packages/plugins which are imported somewhere in the ts code are
listed in `kbn_references`

This linter is not only validating all of the tsconfig.json files, but
it also will fix these config files to deal with just about any
violation that can be produced. Just run `node scripts/ts_project_linter
--fix` locally to apply these fixes, or let CI take care of
automatically fixing things and pushing the changes to your PR.

> **Example:** [`64e93e5`
(#146212)](64e93e5806)
When I merged main into my PR it included a change which removed the
`@kbn/core-injected-metadata-browser` package. After resolving the
conflicts I missed a few tsconfig files which included references to the
now removed package. The TS Project Linter identified that these
references were removed from the code and pushed a change to the PR to
remove them from the tsconfig.json files.

## No bazel? Does that mean no packages??
Nope! We're still doing packages but we're pretty sure now that we won't
be using Bazel to accomplish the 'distributed caching' and 'change-based
tasks' portions of the packages project.

This PR actually makes packages much easier to work with and will be
followed up with the bundling benefits described by the original
packages RFC. Then we'll work on documentation and advocacy for using
packages for any and all new code.

We're pretty confident that implementing distributed caching and
change-based tasks will be necessary in the future, but because of
recent improvements in the repo we think we can live without them for
**at least** a year.

## Wait, there are still BUILD.bazel files in the repo
Yes, there are still three webpack bundles which are built by Bazel: the
`@kbn/ui-shared-deps-npm` DLL, `@kbn/ui-shared-deps-src` externals, and
the `@kbn/monaco` workers. These three webpack bundles are still created
during bootstrap and remotely cached using bazel. The next phase of this
project is to figure out how to get the package bundling features
described in the RFC with the current optimizer, and we expect these
bundles to go away then. Until then any package that is used in those
three bundles still needs to have a BUILD.bazel file so that they can be
referenced by the remaining webpack builds.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-22 19:00:29 -06:00
Julian Gernun
0f7cfd16f7
137988 browser fields UI (#140516)
* first commit

* first commit

* get auth index and try field caps

* use esClient

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* wait for promise to finish

* logs for debugging

* format field capabilities

* add simplier browserFields mapper

* update response and remove width

* update response

* refactor

* types and refactor

* update api response

* fix column ids

* add columns toggle and reset

* sort visible columns id on toggle on

* merging info

* call api

* load info on browser field loaded

* remove logs

* add useColumns hook

* remove browser fields dependency

* update fn name

* update types

* update imported type package

* update mock object

* error message for no o11y alert indices

* add endpoint integration test

* activate commented tests

* add unit test

* comment uncommented tests

* fix tests

* review by Xavier

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* remove unnecessary api calls

* update types

* update param names + right type

* update types

* update id and index to be same type as rest

* update timelines id and index format

* add schema update on load

* add functional test

* fix tests

* reactivate skipped test

* update row action types to work with new api

* rollback basic fields as array update o11y render cell fn

* update cell render fn to handle strings too

* update column recovery on update

* recover previous deleted column stats

* add browser fields error handling

* add toast on error and avoid calling field api when in siem

* remove spread operator

* add toast mock

* update render cell cb when value is an object

* remove not needed prop

* fix browser field types

* fix reset fields action

* add missing hook dependency

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* fix browser field modal types

* update browser field types

* update render cell

* update export type

* fix default columns

* remove description column in browser field modal

* fix populate default fields on reset

* delete description field in triggers_actions_ui

* avoid to refetch the data because all the data is already there

* remove description tests

* insert new column in first pos + minor fixes

* update onToggleColumn callback to avoid innecesary calls

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
2022-09-20 16:31:25 +02:00
Spencer
5adda1f63b
[ftr/testSubjects/clickOnEnabled] retry on stale-element exceptions (#139964)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-09-06 08:28:09 -07:00
Greg Thompson
df6392a97c
Upgrade EUI to v62.2.3 (#138837)
* eui to v62.2.0

* i18n updates

* EuiDescriptionListProps imports

* eui to v62.2.1

* euitoast selector updates

* more EuiDescriptionListProps imports

* eui to v62.2.2

* snapshot updates

* snapshot updates

* toast selector updates

* more snapshot updates

* toast selector

* TRIAL: timeout for loading spinner

* do not assume a popover is closed before attempting to open it again

* Revert "do not assume a popover is closed before attempting to open it again"

This reverts commit 1b231657cb.

* remove wait

* eui to v62.2.3

* Fixx fleet unit test

* eui to v62.2.4

* snapshot updates

Co-authored-by: Nicolas Chaulet <nicolas.chaulet@elastic.co>
2022-08-24 15:02:47 -05:00
Jeramy Soucy
de9b7c6f48
Remove file-type dependency via jimp (#137214)
* Removed file-type from package.json deps.
Updated jimp to 0.16.1.
Updated light & dark dashboard baseline screenshots to resolve failure due to resize degradation.

* Replaced jimp with sharp and pixelmatch. Eliminates several deps, including file-type.
Eliminates quality degradation from image resizing.

* Fixed copy paste error, which lead to pass positives and errors.

* Integrated updateBaselines flag into dashboards report testing.
Fixed sharp resize to fit and not truncate the original image.

* Removed accidental '.only'

* Reverted area chart baseline.

* Removed explicit declaration of sharp from package.json.

* Adjusted dashboard screenshot size in attempt to eliminate layout scaling issues in CI testing.

* Reverted dashboard screenshot size. Lowered tolerance in dashboard PNG reporting tests to force failure and collect CI screenshots.

* Changed session save location for dashboard report images for better CI reporting.

* Fixed small dashboard baseline screenshot with correct aspect ratio.

* Updated 2 basline screenshots from CI. Lowered PNG match tolerance for dashboard screenshots to 1% for investigation of remaining screens.

* Update of dashboard controls light mode baseline.
Change of forced container width size in large dashboard layout test.

* Updated dashboard controls dark mode baseline screenshot.
Adjusted forced container width in large dashboard layout test for troubleshooting.

* Lowering tolerance of PNG compare tests from 9% to 1% for troubleshooting.
Replaced references to dedundant image service with existing, more adopted reporting service.
Ideally, the PNG functions of the reporting service would be merged with the screenshot service as an image service.

* Reverting tolerance of PNG compares to 0.09. Will create GH issues for specific teams to investigate.

* Implemented PngService to provide an accessible single reference to PNG compare testing.
Removed redundant implementations and references.

* Updated service reference and call to png compare function left out of last commit.

* Updated another missed PNG reference.

* Removed superfluous parameter.

* Update after bootstrap

* Updated area chart baseline to match new render with panel filters.

* Reverted limits in dashboard snapshot tests to original values.

* Merge and rebuild.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-08-24 11:24:38 -07:00
Julian Gernun
762962dcf8
[RAM] Alerts table functional tests (#137857)
* first commit

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* add triggersActionsUi as service

* use same configurationId

* add triggers action ui page object

* load infra alerts

* rollback triggers actions ui page and working test

* restore removed tests

* remove not needed fragment

* refactor test to use examples plugin

* remove import from moved resource

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-08-08 10:25:22 -07:00
Andrew Tate
42d396627e
[Lens] add new metric visualization (#136567) 2022-07-26 14:18:20 -05:00
Jiawei Wu
cd3d2d79c7
[RAM] Stack management/o11y rule details parity (#136778)
* stack management/o11y rule details parity

* Hide edit button in stack management

* Add tests

* Move fetching summary out of o11y

* Undo changes to hooks in o11y

* Fix test and add new tests

* Remove customLoadExecutionLog prop

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-07-26 13:14:05 +02:00
Jiawei Wu
09872f071c
[RAM] Refactor: move shareable component sandbox to its own plugin (#134611)
* Move shareable component sandbox to its own plugin

* Add newline and fix test

* disable lint for no-default-export on example tests

* Fix lint

* Address feedback

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-07-19 09:30:11 -07:00
Spencer
f074c397c5
[ftr] add support for launching a dedicated task runner Kibana node (#135875)
* [ftr] add support for launching a dedicated task runner Kibana node

* Update run_kibana_server.ts

* disable the optimizer in kbn-tasks proc when running locally

* remove paths module

* include decicated task proc in promises array

* add getSupertest() helper to DedicatesTaskRunner service

* avoid caching a supertest instance, just create one on request

* remove surprise dependents on KIBANA_ROOT const

* remove modifications to test/analytics/config.ts
2022-07-13 16:36:39 -05:00
Michael Dokolin
e2064ae5b1
[Screenshotting] Fix failing screenshotting functional test (#132393) 2022-05-19 15:38:05 +02:00
Tim Sullivan
8cf334468e
[Screenshotting] Add captureBeyondViewport: false to workaround a res… (#131877) 2022-05-17 14:36:44 -04:00
Spencer
542b381fa5
[ftr] automatically determine config run order (#130983)
* [ftr] automatically determine config run order

* split lens config into two groups

* support ftr configs always running against CI

* Split detection_engine_api_integration rule exception list tests

* Add configs from previous commit

* [ftr] remove testMetadata and maintain a unique lifecycle instance per run

* Revert "[ftr] remove testMetadata and maintain a unique lifecycle instance per run"

This reverts commit d2b4fdb824.

* Split alerting_api_integration/security_and_spaces tests

* Add groups to yaml

* Revert "Revert "[ftr] remove testMetadata and maintain a unique lifecycle instance per run""

This reverts commit 56232eea68.

* stop ES more forcefully and fix timeout

* only cleanup lifecycle phases when the cleanup is totally complete

* only use kill when cleaning up an esTestInstance

* fix broken import

* fix runOptions.alwaysUseSource implementation

* fix config access

* fix x-pack/ccs config

* fix ml import file paths

* update kibana build id

* revert array.concat() change

* fix baseConfig usage

* fix pie chart data

* split up maps tests

* pull in all of group5 so that es archives are loaded correctly

* add to ftr configs.yml

* fix pie chart data without breaking legacy version

* fix more pie_chart stuff in new vis lib

* restore normal PR tasks

* bump kibana-buildkite-library

* remove ciGroup validation

* remove the script which is no longer called from checks.sh

* [CI] Auto-commit changed files from 'yarn kbn run build -i @kbn/pm'

* adapt flaky test runner scripts to handle ftrConfig paths

* fix types in alerting_api_integration

* improve flaky config parsing and use non-local var name for passing explicit configs to ftr_configs.sh

* Split xpack dashboard tests

* Add configs

* [flaky] remove key from ftr-config steps

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* restore cypress builds

* remove ciGroups from FTR config files

* fixup some docs

* add temporary script to hunt for FTR config files

* use config.base.js naming for clarity

* use script to power ftr_configs.yml

* remove usage of removed x-pack/scripts/functional_tests

* fix test names in dashboard snapshots

* bump kibana-buildkite-library

* Try retrying only failed configs

* be a little quieter about trying to get testStats from configs with testRunners defined

* Remove test code

* bump kibana-buildkite-library

* update es_snapshot and on_merge jobs too

* track duration and exit code for each config and print it at the end of the script

* store results in order, rather than by key, in case there are duplicates in $config

* bash is hard

* fix env source and use +e rather than disabling e for whole file

* bash sucks

* print config summary in jest jobs too

* define results in jest_parallel.sh

* simplify config summary print, format times a little better

* fix reference to unbound time variable, use better variable name

* skip the newline between each result

* finish with the nitpicking

* sync changes with ftr_configs.sh

* refuse to execute config files which aren't listed in the .buildkite/ftr_configs.yml

* fix config.edge.js base config import paths

* fix some readmes

* resolve paths from ftr_configs manifest

* fix readConfigFile tests

* just allow __fixtures__ configs

* list a few more cypress config files

* install the main branch of kibana-buildkite-library

* split up lens group1

* move ml data_visualizer tests to their own config

* fix import paths

* fix more imports

* install specific commit of buildkite-pipeline-library

* sort configs in ftr_configs.yml

* bump kibana-buildkite-library

* remove temporary script

* fix env var for limiting config types

* Update docs/developer/contributing/development-functional-tests.asciidoc

Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>

* produce a JUnit report for saved objects field count

* apply standard concurrency limits from flaky test runner

* support customizing FTR concurrency via the env

Co-authored-by: Brian Seeders <brian.seeders@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
2022-05-04 17:05:58 -05:00
Spencer
7327155dbc
[ci] validate that all tests are in a ciGroup (#131173)
* [ci] validate that all tests are in a ciGroup

* make new checks script executable

* skip failing suite
2022-04-28 15:41:17 -05:00
spalger
3730dd0779 fix all violations 2022-04-16 01:37:30 -05:00
Michael Dokolin
3627b866a3
[Screenshotting] Documentation (#129794)
* Provide defaults for the screenshotting options to make usage closer to the zero-conf
* Add screenshotting example integration
* Add integration tests to cover screenshotting example
* Add screenshotting plugin readme
* Add tutorial to the developer guide
2022-04-15 08:29:05 +02:00
Yaroslav Kuznietsov
072fe63c0b
[XY] Expression chart. (#127150)
* added xy plugin.

* Added expressionXY limits.

* Added xy expression functions to the expression_xy plugin.

* Moved xy to a separate plugin.

* Fixed bugs, caused by the refactoring process.

* Fixed lens snapshots.

* Removed new line.

* Fixed xy_chart tests.

* Added lazy loading for xy chart.

* Fixed xy chart test.

* Fixed broken chart selectors.

* Fixed dashboard tests.

* dashboard test fixed.

* Fixed heatmap vis.

* Smokescreen test fixed.

* more fixes.

* async dashboard tests fixed.

* Fixed xy smokescreen tests selectors.

* fixed show_underlying_data tests.

* Updated snapshots.

* updated limits.

* Fixed more selectors

* Fixed persistent context test.

* Fixed some more test at ml.

* Fixed types and imports

* Fixed handlers.inspectorAdapters.tables.logDatatable

* Fixed logDatatable

* Translations fixed.

* Fixed "Visualize App ... cleans filters and query" test.

* Fixed "lens disable auto-apply tests" test.

* Updated dashboard tests.

* Fixed translations.

* Expression tests fixed.

* Cleaned up expression_xy.

* cleaned up lens xy_visualization.

* Moved XY state types to lens.

* Update src/plugins/chart_expressions/expression_xy/README.md

Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>

* [CI] Auto-commit changed files from 'node scripts/build_plugin_list_docs'

* Removed yConfig from *Layers types

* Removed not used utils and styles.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marta Bondyra <marta.bondyra@gmail.com>
2022-03-28 18:17:36 +03:00
Anton Dosov
0421f868ea
[Search] SQL search strategy (#127859) 2022-03-24 14:37:11 +01:00
Anton Dosov
b6d2149e99
Add configuration to search without bfetch (#123942) 2022-01-31 13:04:32 +01:00
Tiago Costa
9504241e71
skip flaky suite (#116038) 2022-01-24 17:34:17 +00:00
Anton Dosov
2fa5a87a5f
Update example plugins to stop using deprecated APIs (#121547) 2021-12-20 14:43:16 +01:00
Anton Dosov
8468061908
[Search] unskip tests of example plugin (#119604) 2021-11-25 10:16:32 +01:00
Tiago Costa
3004e762b3
skip flaky suites (#118921) 2021-11-18 12:45:39 +00:00
Jean-Louis Leysens
18f601dc49
[Reporting] Remove pdf-to-img (#117637)
* remove use of pdf to png conversion checker in comparison test

* remove use of pdf-to-img use in compare images service

* remove pdf-to-img dep from kibana
2021-11-05 09:05:35 -05:00
Bhavya RM
9c98c2b722
Migrate es_archives/lens/basic/ to kbnArchiver (#108120) 2021-11-03 11:19:27 -04:00
Joe Reuter
a3b71bea01
retry chart selection (#116580) 2021-11-02 17:07:10 +01:00
spalger
42857a4da9 skip flaky suite (#116537) 2021-10-28 09:03:16 +00:00
Mikhail Shustov
3c8fa527a7
[ES] Upgrade client to v8.0 (#113950)
* bump to a pre-8.0 version

* export KibanaClient from /lib sub-folder

* workaround the problem of the absence of estypes

* update es client usage in pacakges

* export estypes from another path

* import errors from root

* import errors from root 2

* update transport import

* update import path for /api/types

* update import path for /api/types

* import errors from top export

* use TransportResult instead if ApiResponse

* fix errors in client_config

* fix src/core/server/saved_objects/migrationsv2/actions/integration_tests/actions.test.ts

* use KibanaClient in mock. we dont export the original Client

* fix client mocks

* fix errors on SO

* fix remaining core errors

* update estype import path

* fix errors in data plugin

* fix data_views

* fix es_ui_shared

* fix errors in interactive_setup

* fix errors in ./test folder

* add @elastic/transport to the runtime deps

* fix errors in packages

* fix erros in src/core

* fix errors in test/

* fix an error in actions plugin

* woraround and fix errors in APM plugin

* fix errors in canvas

* fix errors in event_log

* fix errors in fleet

* fix errors in ILM

* fix errors in infra

* fix errors in ingest_pipeline

* fix errors in lens

* fix errors in license_management

* fix errors in licensing

* fix errors in logstash

* fix errors in ml

* fix errors in monitoring

* fix errors in observability

* fix errors in rule_registry

* fix errors in reporting

* fix errors in rule_registry

* fix errors in security

* fix errors in security_solution

* fix errors in snapshot_restore

* fix errors in transform

* fix errors in UA

* fix errors in uptime

* fix errors in x-pack/test

* fix eslint errors

* fix new errors

* use default HTTP Connection. Undici does not support agent config options keepAlive and maxSockets

* create does not accept require_alias option

* update deps

* use transport types exported from ES client package

* fix ErrorCause | string errors

* do not use enum

* fix errors in data plugin

* update x-pack code

* fix transport

* fix apm search request

* do not crash on reporting

* fix kbn-test build

* mute reporting error to start

* fix ftr build

* another attempt

* update import path

* address or mute new errors

* REMOVE me. pin transport version temporarily.

* remove deep imports from transport package

* fix jest crash

* fix product check tests

* remove unnecessary ts-expect-error

* fix a few failed unit tests

* bump to canary 24

* remove unnecessary ts-expect-error

* remove dependency on transport

* fix types in tests

* mute errors in xpack tests

* product check doesn;t  spam in logs anymore

* filterPath --> filter_path

* ignoreUnavailable --> ignore_unavailable

* ignoreUnavailable --> ignore_unavailable

* trackScores --> track_scores

* trackTotalHits --> track_total_hits

* fix es-arcives

* fix data plugin crashes

* fix watcher test utils

* rollback unnecessary changes

* fix another problem in es-archiver

* fix scroll. for whatever reason scroll fails when request scroll_id in body

* add meta: true in kbn-securitysolution-es-utils

* bump client to canary 25

* fix errors in accordance with the es client spec

* update securityscolution-es-utils

* unify scroll api in reporting and fix tests

* fix unit tests in watcher

* refactor APM to abort request with AbortController API

* fix missing es client calls in tests

* fix missing meta in detection engine FTR tests

* fix another bunch of errors in js tests

* fix wrong coercion

* remove test-grep pattern

* fix apm unit test

* rename terminateAfter to terminate_after in infra plugin

* rename terminateAfter to terminate_after in uptime plugin

* rename terminateAfter to terminate_after in apm plugin

* fix security roles FTR tests

* fix reference

* fix post_privilidges test

* fix post_privilidges

* bump client to 26

* add meta for index_management test helpers

* remove ts-expect-error caused by bad type in reason

* bump client to 27

* REMOVE me. workaround until fixed in the es client

* fix incorrect type casting

* swtich from camelCase params

* use `HttpConnection` for FTR-related clients

* bump client to 29

* Revert "REMOVE me. workaround until fixed in the es client"

This reverts commit c038850c09.

* fix new util

* revert repository changes

* do not crash if cannot store event_loop data

* fix new estypes imports

* fix more types

* fix security test types and add ts-ignore for custom ES client

* fix more estypes imports

* yet more ts violations

* line by line fixing is hard

* adapt `evaluateAlert` from infra as it's also used from FTR tests

* use convertToKibanaClient in FTR test instead of meta:true in plugin code

* migrate from deprecated API in fleet

* fix intergration tests

* fix fleet tests

* fix another fleet test

* fix more tests

* let's call it a day

* Removes custom header check on 404 responses, includes es client ProductNotSupportedError in EsUnavailableError conditional (#116029)

* Removes custom header check on 404 responses, includes es client ProductNotSupportedError in EsUnavailableError conditional

* Updates proxy response integration test

* disable APM until compatible with client v8

* skip async_search FTR test

* use kbnClient in integration tests

* bump version to 29

* bump to 30

* have configureClient return a KibanaClient instead of Client, remove resolved violations.

* bump to 31

* bump to 31

* Revert "bump to 31"

This reverts commit 5ac713e640.

* trigger stop to unusubscribe

* update generated docs

* remove obsolete test

* put "as" back

* cleanup

* skip test

* remove new type errors in apm package

* remove ErrorCause casting

* update a comment

* bump version to 32

* remove unnecessary ts-expect-error in apm code

* update comments

* update to client v33

* remove outdated type definition

* bump to 34 without params mutation

* unskip the test that should not fail anymore

* remove unnecessary ts-expect-error comments

* update to v35. body can be string

* move `sort` to body and use body friendly syntax

* fix a failing test. maps register the same SO that has been already registered by home

Co-authored-by: pgayvallet <pierre.gayvallet@gmail.com>
Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
2021-10-26 14:08:22 +02:00
Jean-Louis Leysens
8b66ef161d
[Reporting] Baseline capture tests (#113910)
* added page to reporting example app that contains the capture tests

* first version of PNG capture for test A

* added types file to common

* added data-shared-item attr to image, also added capture menu items

* fix image CSS by providing a fixed width and height

* explicitly add layout for print, does not seem to do anything though?

* added magic numbers of image sizes

* added reporting examples test folder

* first version of capture test for generating and comparing PNGs

* added PNG service and PNG baseline fixture

* added pdf-to-img dev dependency

* refactor compare_pngs to accept a buffer

* added comment to interface

* png service -> compare images service

* export image compare service

* added test for pdf export

* clean up log

* minor fixes and added pdf print optimized test

* added pdf and pdf print fixtures

* refactor lib function name

* Update difference thresholds

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-21 14:59:07 +02:00
Lukas Olson
6a39dc1880
[data.search] Handle warnings inside of headers (#103744)
* [data.search] Handle warnings inside of headers

* Update docs

* Add tests

* Remove isWarningResponse

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-16 21:06:19 -07:00
Joe Reuter
65ff74ff5a
[Lens] Add functional test for example integration (#103460) 2021-07-01 10:48:34 +02:00
Spencer
f466ebf1a3
[esArchiver] drop support for --dir, use repo-relative paths instead (#101345)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-08 17:37:42 -04:00
Spencer
808b44f2c1
[kbn/test] move types/ftr into src (#99555)
* [kbn/test] move types/ftr into src

* Apply eslint updates

* fix import of Lifecycle type

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-17 09:51:53 -07:00