Commit graph

2795 commits

Author SHA1 Message Date
Spencer
703580f944
[eslint/module_migration] add exact option (#137000) 2022-07-22 14:59:14 -07:00
Spencer
757001f3c6
[bazel] on CI, log buffered log lines that start with INFO: (#136981) 2022-07-22 12:03:28 -07:00
Jonathan Budzenski
b8f41a0eea
Bump cssnano to ^5 (#136864)
* Bump cssnano to ^5

* include in css configuration

* fix

* cleanup
2022-07-22 12:15:07 -05:00
Marshall Main
0fe480c87b
[Security Solution][Alerts] New terms security rule type (#134526)
* WIP new value rule type

* Finish implementation and add integration tests

* Remove experimental value list exception implementation

* Reorganize aggregation and runtime mapping builders

* Add new terms field to UI and tests

* Add new fields in more places

* Add Cypress test for new terms rule creation

* Change historyWindowStart references on UI to historyWindowSize

* Fix more tests that break when more rule types are added

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

* Fix UI form schema description

* Test implementation for phased new terms search implementation

* New terms using composite agg for history search phase

* Implementation using terms agg for phase 2

* Add alert creation logic back, add more unit tests

* Update buildNewTermsAggregation snapshot

* Type and test fixes

* Fix merge

* More merge conflict fixes

* Mock and test fixes

* API test fix

* More test fixes

* Try fixing cypress test

* Fix cypress test again

* Fix new terms field text

* Add new terms rule type to patch converter function

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

* UX feedback: rule card icon and field box description

* Fix types post merge main

* Remove duplicate switch case

* Add special investigate in timeline action for new terms alerts

* PR comments: naming, improved schema error message

* PR comments: update cypress test, fix copied error messages

* Add README in new terms folder

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-07-22 10:11:27 -07:00
Baturalp Gurdin
d5fdeefb1c
fix apm label isPr&prId (#136869) 2022-07-22 13:22:57 +02:00
nastasha-solomon
fbf47c8f24
[DOCS] Added keyword for the threat intel integration docs (#136851) 2022-07-21 12:46:53 -04:00
Bree Hall
44f7338f76
Upgrade EUI to v60.3.0 (#136405)
* Upgrade EUI to version 60.3.0

* Updated i18n translation mappings

* Updated snapshot for i18n test file

* Updated the regex pattern responsible for checking datagrid row and column names to match the updated pattern in the latest version of EUI

* update regex catpure group order

* update regex capture groups to ignore categorical info for text

Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
2022-07-21 08:28:37 -04:00
Dzmitry Lemechko
10cd177456
[kbn-performance-testing-dataset-extractor] update json structure, filter out static resources on ci (#136651)
* [kbn-performance-testing-dataset-extractor] update json structure, filter out static res on ci

* convert body to string

* update schema and ftr configs

* update extractor

* fix headers combining

* update json structure

* re-order fields for easy read
2022-07-21 10:42:36 +02:00
Jonathan Budzenski
96e284fdf4
Bump webpack-dev-server, cli (#136352) 2022-07-21 08:58:30 +02:00
Spencer
b9436617f1
[ftr] prevent configs from using --oss flag (#136756) 2022-07-20 12:20:58 -07:00
Pierre Gayvallet
3508350446
Migrate server-side ES domain to packages (#136297)
* create es types package

* start moving client types to @kbn/core-elasticsearch-server

* move ElasticsearchClientConfig to package

* start adapting usages

* start fixing imports

* fix more imports

* just a bit more

* move service types

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

* fix more internal types

* move retry call cluster helpers outside of client package

* move client code and mocks to packages

* fix imports

* adapt external usages

* adapt more external usages

* adapt more external usages 2

* fix mocked module

* create empty domain packages

* more external usages fix

* move ALL the things (again)

* mock external import fix

* fix tests, add test dependencies

* fix some internal usages

* fix more internal usages

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

* fix cli_setup usage

* desperate times force desperate decisions

* fix misc stuff

* update snapshots (?!)

* fix mocked package

* self review

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-07-20 10:07:48 +02:00
Marshall Main
aaa3107dbc
[Security Solution][Alerts] Detection engine wildcard exceptions (#136147)
* Implement wildcard exceptions for detection rules

* Fix index pattern retrieval on edit exceptions flyout

* Fix API integration test logic

* Fix entry_renderer linting

* Remove bad fix idea

* Add 'does not match' operator to UI

* Fix test

* Add unit tests

* Add wildcard exceptions to list of DE exception operators

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-07-19 15:03:47 -07:00
Jonathan Budzenski
88d64408c9
Bump postcss to ^8 (#136303)
* Bump postcss to ^8

* fixes

* fix config path

* fix path

* cleanup
2022-07-19 14:06:20 -05:00
Tiago Costa
302bd423f3
chore(NA): eslint rule for disallowing naked eslint-disable (#136408)
* chore(NA): eslint rule for disallowing naked eslint-disable

* chore(NA): export new rule and update docs

* chore(NA): creation of rule in ts

* chore(NA): new corrected rule in ts

* refact(NA): remove old logic from older plugin

* docs(NA): update documentation

* docs(NA): update documentation

* docs(NA): update documentation

* refact(NA): include edge cases for better locating errors

* chore(NA): changed regex name

* docs(NA): correct name rule on docs

* refact(NA): use dedent in the template literals

* refact(NA): check for undefined

* fix(NA): introduces support for eslint-disable-line

* chore(NA): fix extra space

* test(NA): created more test cases

* chore(NA): rename plugin to eslint-plugin-disable

* docs(NA): update nav and operations landing page ids for eslint rule

* test(NA): use messageIds on test

* chore(NA): complete naked eslint disables with specific rules

* chore(NA): specific rules for a few naked eslint disable

* chore(NA): add focused eslint disable on big reindex_operation_with_large_error_message.ts file

* chore(NA): changes according PR feedback

* chore(NA): include specific eslint rules on latest naked eslint disable

* chore(NA): missing eslint disable specific rule

* fix(NA): remove comment for js annotator

* chore(NA): re add eslint focused disable rule to x-pack/plugins/osquery/cypress/support/coverage.ts

* chore(NA): re add eslint focused disable rule to x-pack/plugins/osquery/cypress/support/coverage.ts

* chore(NA): re add eslint focused disable rule to x-pack/plugins/osquery/cypress/support/coverage.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-07-19 17:11:04 +01:00
Yara Tercero
ff3853cfa9
[Security Solution][Exceptions] - Fixes exception builder bug that includes matches operator (#136340)
## Summary

Addresses Kibana issue #36224
2022-07-19 08:15:49 -07:00
Julia Rechkunova
92a46f5344
[Discover] Allow for custom number of rows in the results and save the specified number with a Saved Search (#135726)
* [Discover] Persist rowsPerPage in app state and URL

* [Discover] Persist rowsPerPage in saved search objects

* [Discover] Make sure that rowsPerPage is persisted in saved search objects

* [Discover] Support rowsPerPage in embeddables

* [Discover] Allow to save a custom rowsPerPage option

* [Discover] Reflect custom size in the grid dropdown

* [Discover] Fix changing rowsPerPage on Dashboard page

* [Discover] Skip saving rowsPerPage for legacy view

* [Discover] Fix sample size for rendering an embeddable

* [Discover] Update tests

* [Discover] Update tests

* [Discover] Update mapping

* [Discover] Revert setting a default state

* [Discover] Remove rowsPerPage input from SaveSearch modal

* [Discover] Update tests

* [Discover] Ignore the setting for legacy view

* [Discover] Add `discover:sampleRowsPerPage` setting to Advaced Settings

* [Discover] Allow to save rowsPerPage on Dashboard for legacy view too

* [Discover] Add tests

* [Discover] Add tests

* [Discover] Extend "select" type to return values as numbers too

* [Discover] Fix values changes

* [Discover] Update types to support also lists with numbers

* [Discover] Fix disclaimer updates

* [Discover] Update setting copy

* [Discover] Simplify saving of rowsPerPage

* [Discover] Extend number of rowsPerPage options for the legacy view too

* [Discover] Move to utils

* [Discover] Fix deps

* [Discover] Add tests

* [Discover] Update settings copy

* [Discover] Limit max number of rows per page for an embedded legacy table

* [Discover] Prevent invalid values for a custom rows per page

* [Discover] Add tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-07-19 15:54:17 +02:00
Pierre Gayvallet
0aa12c36fd
Migrate browser-side integrations service to packages (#136514)
* create empty packages

* move files to packages

* adapt imports

* add copy-files argument
2022-07-19 15:46:17 +02:00
Dzmitry Lemechko
b72601c283
[performance] Re-enable apm extraction step (#136555)
* [kbn-performance-testing-dataset-extractor] add extra logging

* re-enable step
2022-07-19 09:35:54 +02:00
Giorgos Bamparopoulos
5c56102bf0
Top erroneous transactions (#134929)
* Add table for top erroneous transactions in error detail page

* Add table for top errors in transaction details page

* Add top errors to a new row on small viewports

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-07-18 08:57:54 -07:00
Spencer
a07fb3063b
[cli-dev-mode/base-path-proxy] switch to integration tests (#136545) 2022-07-18 10:49:22 -05:00
Spencer
4f817ad8a0
[kbn/pm] rewrite to avoid needing a build process (#136207)
* [kbn/pm] rewrite to avoid needing a build process

* uncomment timing reporting

* throw in a few missing comments

* Update README.md

* remove extra SomeDevLog interface from ci-stats-core

* remove non-stdio logging from bazel_runner, improve output formatting

* use private fields instead of just ts private props

* promote args to a positional arg

* optionally require the ci-stats-reporter after each command

* allow opt-ing out of vscode config management

* reduce to a single import

* add bit of docs regarding weird imports and package deps of kbn/pm

* clean extraDirs from Kibana's package.json file too

* tweak logging of run-in-packages to use --quiet and not just CI=true

* remove unlazy-loader

* add readme for @kbn/yarn-lock-validator

* convert @kbn/some-dev-logs docs to mdx

* remove missing navigation id and fix id in dev-cli-runner docs

* fix title of some-dev-logs docs page

* typo
2022-07-18 08:46:13 -07:00
Luke Elmers
71d375848e
[logging] Add mechanism for setting global meta & set service.node.roles for all logs. (#136243) 2022-07-14 14:03:59 -06:00
Jonathan Budzenski
33b743c84e
Revert "Remove percy based visual regression tests (#136359)" (#136437)
* Revert "Remove percy based visual regression tests (#136359)"

This reverts commit a91aeb42ff.

* update codeowners
2022-07-14 14:53:12 -05:00
István Zoltán Szabó
86a16274eb
[ML] Changes Learn more link URL on start deployment modal (#136381) 2022-07-14 20:59:22 +02:00
Spencer
7231d7c5a1
[ftr] use correct script path when running outside of repo root (#136397) 2022-07-14 13:14:59 -05:00
Jonathan Budzenski
a91aeb42ff
Remove percy based visual regression tests (#136359)
* Remove percy based visual regression tests

These have been disabled for ~3 years, the agent is deprecated, and our
snapshot environment is inactive.

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

* update codeowners

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-07-14 10:03:49 -07:00
Christiane (Tina) Heiligers
8e7d411aa4
Migrates core uiSettings client-side service to packages (#136354) 2022-07-14 09:59:24 -07:00
Spencer
a1c2220566
[checks] disable spinners in CI to cut-down on log sizes (#136341) 2022-07-13 23:37:39 -05:00
Christiane (Tina) Heiligers
318530ef54
Migrates core's client-side deprecations service to packages (#136164)
* Creates packages for shared types: core-deprecations-common and core-deprecations-common-internal, moves types accordingly, updates src/core/public|server imports

* Moves more internal types to package

* Changes widely used internal deprecations-related types to public types, moves these to publically accessible packages

* Updates import, updates bazel build file

* Creates package core-deprecations-browser-internal and moves implementation and tests into package

* Updates imports of public deprecations implementations

* Creates package core-deprecations-browser-mocks, moves mock and deletes core-deprecations-common-internal

* Updates types in src/core

* Updates README's and build bazel files for core's client-side deprecations service

* Updates imports

* exports shared DeprecationsDetails from core/server

* Adds deprecations to i18n rc

* replace targetted core packages with top level packages for core in i18nrc file, cleans up tsconfig and bazel build files, addresses prefered style in core
2022-07-13 15:58:41 -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
Pierre Gayvallet
84db06c15d
Move server-side http implementation to packages (#136105)
* create context packages

* move context files into packages

* adapt imports

* create empty router packages

* fix more context imports

* move router code to packages

* fix import

* woups

* start adapting router imports

* fix more imports

* fix more core imports

* start adapting external usages

* export kibanaResponseFactory from server index...

* Revert "start adapting external usages"

This reverts commit 47ee463fbb.

* adapt external usages

* fix console test

* create empty packages

* start moving all the things

* fix tests

* start adapting imports

* that's a lot of usages

* that's a lot of usages bis

* fix bad paths

* use export type

* lint

* fix external unit tests

* self review

* switch to `import type`

* stop re-exporting the router mock from the other mock package

* update codeowners for CSP folder
2022-07-13 11:06:40 +02:00
Joey F. Poon
1469d60490
[Security Solution] bubble up macos system extension errors (#136038) 2022-07-12 16:40:18 -05:00
Yuliia Naumenko
5c8eaa3ef9
[Security Solution] Migrate to fields API (#136163)
* -

* fixed tests

* fixed linting rules

* fixed mocks

* removed docValueFields

* -

* fixed tests

* -

* fixed tests

* fixed tests

* -

* changed the recursive approach

* fixed tests

* fixed tests

* fixed tests data according to the new fields api results

* -

* fixed tests

* -

* -

* fixed types

* -

* Fixed threat enrichment

* Fixed unmapped alert details test

* improved naming

* Fixed rule detections tests, by parsing nested structure only for ECS objects

* Fixed tests

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

* Fixed type checks

* Fixed merge issues

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

* Fixed snapshot

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-07-12 13:08:11 -07:00
Clint Andrew Hall
cd8a4ae677
[Shared UX] Move Page Template Solution Nav to package (#134974)
* [Shared UX] Move Page Template Solution Nav to package

* Fixing test import; fix i18n scope.

* Update packages/shared-ux/page/solution_nav/src/collapse_button.scss

* Address feedback, simplify generic

* Tweak types

* Addressing review feedback

* REverting mistakes, ugh

* Fix Observability tour

* Apply suggestions from code review

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Addressing review feedback

* Addressing review feedback

* Fix i18n keys

* Apply suggestions from code review

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>

* Fix solution nav collapse

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
2022-07-12 08:34:27 -07:00
Jonathan Budzenski
cbe94c6db6
Remove fast-glob (#136125)
* Remove fast-glob

This is not used.

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

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-07-12 10:00:10 -05:00
Trevor Pierce
e21e5069a7
Bumping EUI to v60.1.2. (#135373)
* Bumping EUI to v60.1.0.

* Bumping to bugfixed v60.1.1.

* Updating snapshots for EUI Emotion changes.

* Updating a theme icon size declaration.

* Updating tests for Emotion and new EUI theme objects.

* Updating Lens drag and drop to account for Emotion wrapper.
* Updating icon size in EUI theme object for test.
* Updating Lens Editor Frame test to assert 1 click instead of 2.

* Updating two Jest tests for Emotion extra wrapper.

* Changing a Cypress selector for Emotion classnames.

* Update removed EuiIcon classes

-isLoaded was deprecated in favor of data-attrs - hook should still work

* Remove static EuiIcon classes from static SVG

- these classNames no longer output meaningful CSS and should not be used

* Fix theme JSON imports not to rely on any iconSizes keys

- (which will soon be deprecated by Emotion conversion)
- use the generic euiSizes instead, which will likely be the last to be deprecated

* Fix one more euiIcon-isLoaded className change

- we should be using the `data-is-loaded` attribute that it was switched to

* Bumping EUI to 60.1.2 patch release.

* Updating Storyshots for EUI 60.1.2.

* Removing two assertions from instances_table.spec to match localhost instance UI.

Co-authored-by: Constance Chen <constance.chen@elastic.co>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-07-11 16:33:16 -05:00
Jonathan Budzenski
15f194143b
Replace npm zlib with native zlib (#136139)
This is built-in to node, we no longer need to use this package.
2022-07-11 14:56:25 -05:00
Gerard Soldevila
4824d9da8c
Migrate types to packages: Client-side HTTP service (#135562)
* Migrate types to packages: Client-side HTTP service

* Fix linting issues, compactify some imports

* Fix incorrect typing, remove unnecessary exports

* Remove unnecessary export

* Fix trailing spaces removed by mistake

* Move Sha256 to new @kbn/crypto-browser package

* Support deprecated 'req' property in isHttpFetchError() method

* Fix failing UT in lens

* Update API docs

* Reorder imports, absolute imports first

* Provide createHttpFetchError() convenience method

* Fix typing issue

* Fix rebase issues

* Fix incorrect import

* Avod using core internals for plugin testing

* Fix automerge issues

* Misc enhancements following PR review
2022-07-11 12:25:55 -07:00
Jonathan Budzenski
000f39b4a0
Remove spawn-sync (#136127)
spawnSync is included in our node version now, we no longer need this
package.
2022-07-11 13:45:58 -05:00
Spencer
9ff26f9de9
[jest] throw on module collision in node presets (#136012) 2022-07-11 07:02:21 -07:00
Dzmitry Lemechko
b0c0c1ba6d
[kbn-performance-testing-dataset-extractor] filter out transactions with static resources (#135222)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-07-11 15:26:15 +02:00
Pierre Gayvallet
885e80a1cd
Migrate server-side http types to @kbn/core-http-server (#135808)
* create empty packages

* create more packages

* start moving most types to `@kbn/core-http-server`

* export moved types

* add bazel dependencies for `@kbn/core-http-server`

* create explicit responseFactory types

* start adapting imports

* adapt imports in http/router

* continue adapting imports

* revert creation of other packages

* adapt lifecycle types

* move lifecycle types

* move missing types

* adapt more usages

* fix entrypoint exports

* fix internal request handler contexts

* ok let's wait for CI now

* ok just a last one

* gotcha

* clean some tsdoc

* start fixing violations

* move router types to sub folder

* fix more violations

* lint

* more test violations

* lint 2

* fix violations external to core

* move ICspConfig to package

* move external url types

* move IBasePath to package

* move more types

* start fixing violations due to latest moves

* fix server/types

* move auth_header types

* move context container type

* move contract types

* tsdoc

* fix violations due to latests moves

* fix import in reporting

* fix type in canvas

* move context container out of nested folder

* update README

* self-review

* remove duplicate entry from codeowners file

* create the @kbn/hapi-mocks package

* move router mocks to correct package
2022-07-11 13:28:39 +02:00
Christiane (Tina) Heiligers
6ed1d88678
Migrate server-side preboot service to packages (#136060)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-07-11 08:17:24 +02:00
Andrew Tate
3891aeb95f
[Chart expressions] new metric vis expression (#135461) 2022-07-08 12:07:43 -05:00
Yulia Čech
eb6e6477b2
Added a gif module to be able to import gif files (#136015) 2022-07-08 17:43:10 +02:00
Spencer
f5688a68a5
[ftr] rework kibana arg parsing, extend loggers correctly (#135944) 2022-07-08 08:54:56 -05:00
Spencer
1134d35e03
[jest] refactor config check (#135960) 2022-07-08 08:54:38 -05:00
Giorgos Bamparopoulos
876f9d5884
[APM] Add scenario for AWS lambda to synthtrace (#135019)
* Add a scenario for AWS lambda to synthtrace
2022-07-07 15:48:03 +01:00
Spencer
a3b2757e4e
[type-summarizer] reimplement for broader support (#135163)
* [type-summarizer] reimplement for broader support

* Enable sourceMaps in all packages

* include naming collision in summarizePackage test

* fix readmes

* remove unnecessary transient dependency

* remove code that was commented out

* remove outdated todo comment

* ensure errors triggered by untyped-exports are ligible

* remove unused import

* break out snippet generation from AstIndexer

* refactor several massive files into smaller pieces and add more inline docs

* fix typos

* update jest snapshots

* add sections to readme that points people to the useful parts of the source code along with a high-level overview of how the type-summarizer works

* remove --dump flag, it doesn't work

* use decName instead of calling names.get a second time

* include `export` as invalid name
2022-07-06 13:48:45 -05:00
Marta Bondyra
f0965a39b6
[Lens] Rank top values by custom metric (#134811)
* [Lens] order by custom agg

* type check to only allow allowed columns to be included

* remove unused code

* adjusting to the design, correcting full Width everywhere

* change that will make a lot of tests to break

* fix updating only ref column, not full column

* fix cyclic dependency

* remove outdated comment

* added custom labels

* inline modules, ugly code

* fix tests

* clone the aggConfigParams to avoid the Cannot assign to read only property schema of object

* feedback

* Revert "clone the aggConfigParams to avoid the Cannot assign to read only property schema of object"

This reverts commit c4931aad06.

* cr feedback

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2022-07-06 14:37:30 +02:00