Commit graph

2313 commits

Author SHA1 Message Date
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
Søren Louv-Jansen
a5a9be439a
Bump backport v8.9.2 (#136620) 2022-07-19 10:29:55 -05: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
renovate[bot]
99a01902ca
Update dependency core-js to ^3.23.5 (main) (#136489)
* Update dependency core-js to ^3.23.5

* dedupe

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Budzenski <jon@elastic.co>
2022-07-18 11:07:21 -05:00
Patryk Kopyciński
f0325b2f7d
Renovate react-query (#136480) 2022-07-18 17:57:28 +02: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
renovate[bot]
68edf82552
Update ftr (main) (#136434)
* Update ftr

* dedupe

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Budzenski <jon@elastic.co>
2022-07-18 08:01:25 -07:00
renovate[bot]
74e0b586f6
Update dependency @elastic/charts to v46.13.0 (#136250)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Marta Bondyra <4283304+mbondyra@users.noreply.github.com>
2022-07-18 23:09:56 +09:30
Jonathan Budzenski
4498161a47
Bump moment-timezone to 0.5.34 (#136406)
Fixes a warning during bootstrap:
`info [bazel] warning " > @elastic/charts@46.12.0" has incorrect peer
dependency "moment-timezone@^0.5.32".`
2022-07-14 15:40:54 -05: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
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
Jonathan Budzenski
9f70605c62
Remove api-{extractor,documenter} (#136357)
With the merges of https://github.com/elastic/kibana/pull/134313 and
https://github.com/elastic/kibana/pull/135163 we no longer use these
dependencies.
2022-07-14 08:45:25 -07:00
Jonathan Budzenski
3d582f33f5
Bump html-loader to 1.3.2 (#136360) 2022-07-14 09:38:32 -05:00
Carlos Crespo
b58d07e05b
[Stack Monitoring] Add OpenTelemetry metrics to Monitoring Collection plugin (#135999)
* Add otel metrics to alerting plugin

* clean up otel poc

* Bump @opentelemetry/api-metrics and @opentelemetry/exporter-metrics-otlp-grpc versions to 0.30.0

* Add integration test for prometheus endpoint; improve reademe.md

* Fix tsconfig.base.json missing entries

* Bump @opentelemetry/sdk-metrics-base; clean up

* Rename PrometheusExporter properties

* Readme formatting tweaks

* Fix incorrect path

* Remove grpc dependency

* Add grpc back for handling auth headers

* Fix comment positioning

* Include authenticated OTLP in readme

* Extract dynamic route into a new file

* Enable otlp logging and compatibility with env vars

* Enable OTEL_EXPORTER_OTLP_ENDPOINT env var

Co-authored-by: Mat Schaffer <mat@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-07-14 13:29:09 +02: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
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
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
Jonathan Budzenski
e815df9c08
Remove chai dependency (#136052)
* Remove chai dependency

This replaces tests sill using chai with @kbn/expect

* fix missing test

* a->an(Error)
2022-07-11 09:14:18 -07:00
renovate[bot]
6200837594
Update dependency @elastic/charts to v46.12.0 (main) (#135946)
* Update dependency @elastic/charts to v46.12.0

* fix: breaking changes with Metric API

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
Co-authored-by: nickofthyme <nicholas.partridge@elastic.co>
2022-07-11 08:25:22 -07:00
Jonathan Budzenski
d8553f5647
Remove shelljs (#136049)
This is only used to remove a file.  We can use del instead.
2022-07-11 10:01:50 -05:00
Jonathan Budzenski
dec89726c6
Bump node-sass to 7.0.1 (#136034) 2022-07-11 10:01:12 -05: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
Spencer
1134d35e03
[jest] refactor config check (#135960) 2022-07-08 08:54:38 -05:00
Jonathan Budzenski
87dc294f4f
Bump moment to 2.29.4 (#135862) 2022-07-06 17:33:36 -05: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
Brian Seeders
1f0287caa4
[backport] Bump backport to 8.8.0 and add structured data to created backport PRs (#135597) 2022-07-06 13:46:22 -04:00
Walter Rafelsberger
04907932c4
[ML] Explain log rate spikes: Add DualBrush component. (#135318)
Adds the code for the dual brush component for users to be able select log rate spikes in histogram charts.
For this PR a new package @kbn/aiops-components was created that also includes ProgressControls from @kbn/aiops-utils now. The reason for this is: The brush component includes code from d3 that cannot be imported on the server side which aiops-utils was also used for.
2022-07-06 14:08:05 +02:00
Vadim Yakhin
54a32d3e1c
Upgrade Search UI and fix all type errors (#135737)
* Update Search UI dependencies

* Fix type errors after the upgrade

* Fix documents search being broken after recent backend changes

* Ignore TS error caused by bug in Search UI

View passed to Paging component should accept any additional props (for example for data- or area- attributes).

* Fix test - we don't expect snippet for number  field
2022-07-05 15:07:38 -07:00
Jonathan Budzenski
5d85008aa9
Bump prettier to 2.7.1 (#135143)
* Bump prettier to 2.7.1

* bump eslint-config-prettier

* update .eslintrc
2022-07-05 14:39:20 -05:00
Jonathan Budzenski
8f8ea8dd49
Bump license-checker to 25.0.1 (#135252)
* Bump license-checker to 25.0.1

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

* fix jszip

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-07-05 14:20:25 -05:00
Jonathan Budzenski
0618dd97fa
Remove underscore from dependencies (#135439)
This package is not used
2022-07-05 09:36:54 -05:00
Jonathan Budzenski
3ab6e966d2
Bump mocha to 10.0.0 (#135269) 2022-07-05 09:25:13 -05:00
Dmitry Tomashevich
789e2e9ceb
[Graph] Remove Venn diagram dependency (#135007)
* [Graph] remove venn diagram dependency

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

* [Discover] add license changes

* Update x-pack/plugins/graph/public/components/venn_diagram/vennjs/LICENSE

Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>

* [Graph] apply suggestions

* [Graph] update yarn lock

Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
2022-07-05 15:04:28 +03:00
Pierre Gayvallet
aceea297c0
Introduce the @kbn/es-errors package (#135613)
* create the package, move the files

* adapt imports

* fix more imports

* fix import from security plugin
2022-07-04 10:33:37 +02:00
Jonathan Budzenski
a38064b841
Bump terser to 5.14.1 (#134963) 2022-06-30 14:17:43 -07:00
Clint Andrew Hall
e564f1f5bc
[home] Create Sample Data Card package (#135472)
* [home] Create Sample Data Card package

* Fix issues found in CI

* Update packages/home/sample_data_cards/src/sample_data_card.component.tsx

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

* Update packages/home/sample_data_cards/src/footer/remove_footer.tsx

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

* Addressing review feedback

* Fix i18n, reduce dependencies

* Update docs and snaps; add tests

Co-authored-by: Caroline Horn <549577+cchaos@users.noreply.github.com>
2022-06-30 15:53:08 -05:00
Mark Hopkin
4179903a2f
[Fleet] Add GPG verify function to fleet (#135223)
* add LGPL-3.0+ to list of allowed licenses

* Add openpgp (LGPLv3 license)to kibana

* Add jsdom TextEncoder and TextDecoder polyfills

* Use opengpg to read gpg key

* add basic verification function

* add lgpl to license overrides for now

* Revert "add lgpl to license overrides for now"

This reverts commit 3730eb07540d8b537712267a5430085f54c088c0.

* collect verification result

* use Key ID of the verification key

* add @openpgp/web-stream-tools as a dev dependency

* verified -> isVerified

* only allow LGPL-v3 for openpgp

* fix: use @ as separator when checking license overrides

* fix isValidIndexName test
2022-06-30 11:00:27 +01:00
Jonathan Budzenski
a34db6986b
Bump archiver to 5.3.1 (#135264) 2022-06-29 10:57:48 -05:00
Pierre Gayvallet
111b6f4b99
Move server-side executionContext service to packages (#135396)
* create the empty server execution-context packages

* move src/core/server/execution-context into packages

* update READMEs

* adapt first server/mocks imports

* move ECC type to public package

* adapt mock imports

* adapt more imports

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

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-06-29 15:29:31 +02:00
renovate[bot]
c5c7247f47
Update dependency elastic-apm-node to ^3.36.0 (#134530)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-29 02:30:08 -07:00
Pierre Gayvallet
e08e4b4c0c
Migrate server-side environment service to packages (#135075)
* create the empty packages

* move src/core/server/environment into the new packages

* adapt some imports

* fix more imports

* export dep type

* restore delete packages or idk

* update READMEs

* address review comments
2022-06-29 00:09:16 -07:00
Luke Elmers
cf6ae210ef
Adds node.roles configuration & exposes via PluginInitializerContext (#135272) 2022-06-28 15:22:43 -07:00
Constance
de20876b30
Upgrade EUI to v60.0.0 (#134919)
* Upgrade EUI to v60.0.0

* reorganize style tag injection using EuiProvider.cache options

* Convert Jest snapshots for EUI Emotion classNames to a static `emotion-` prefix instead of a dynamic hash

- The goal of this is to reduce thrashing on downstream Kibana snapshots whenever EUI CSS changes

+ Add serializer to Canvas' storyshots tests as well

+ Switch several .html() snapshots to .render() - render uses the new serializer logic, but .html() does not and will still output CSS hashes, plus is more difficult to read

* Update downstream tests for EuiStat Emotion/className changes

* Fix WithEuiTheme(EuiAccordionClass) references

* Rename mounted snapshots of EuiButtonContent to EuiButtonContentDeprecated

* add emotion/cache to kbn-ui-shared-deps

* Fix non-rendering server-side Emotion CSS

* Fix failing Security Cypress test

- the Cypress query/command being used wasn't working correctly

Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-28 11:23:59 -07:00