Skip to content

Commit 56bcc47

Browse files
Merge branch 'main' into migrate-toolbar-button
2 parents 75c9821 + 7934cd5 commit 56bcc47

File tree

310 files changed

+8464
-3336
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

310 files changed

+8464
-3336
lines changed

.buildkite/pipelines/hourly.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,10 @@ steps:
127127

128128
- command: .buildkite/scripts/steps/test/jest_integration.sh
129129
label: 'Jest Integration Tests'
130+
parallelism: 2
130131
agents:
131132
queue: n2-4
132-
timeout_in_minutes: 120
133+
timeout_in_minutes: 90
133134
key: jest-integration
134135

135136
- command: .buildkite/scripts/steps/test/api_integration.sh

.buildkite/pipelines/on_merge.yml

+8
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,20 @@ steps:
1313
agents:
1414
queue: c2-8
1515
timeout_in_minutes: 60
16+
retry:
17+
automatic:
18+
- exit_status: '*'
19+
limit: 1
1620

1721
- command: .buildkite/scripts/steps/on_merge_ts_refs_api_docs.sh
1822
label: Build TS Refs and Check Public API Docs
1923
agents:
2024
queue: c2-4
2125
timeout_in_minutes: 80
26+
retry:
27+
automatic:
28+
- exit_status: '*'
29+
limit: 1
2230

2331
- wait: ~
2432
continue_on_failure: true

.buildkite/pipelines/pull_request/base.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,10 @@ steps:
127127

128128
- command: .buildkite/scripts/steps/test/jest_integration.sh
129129
label: 'Jest Integration Tests'
130+
parallelism: 2
130131
agents:
131132
queue: n2-4
132-
timeout_in_minutes: 120
133+
timeout_in_minutes: 90
133134
key: jest-integration
134135

135136
- command: .buildkite/scripts/steps/test/api_integration.sh

.buildkite/scripts/steps/test/jest_integration.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ is_test_execution_step
99
.buildkite/scripts/bootstrap.sh
1010

1111
echo '--- Jest Integration Tests'
12-
checks-reporter-with-killswitch "Jest Integration Tests" \
13-
node --max-old-space-size=6144 scripts/jest_integration --ci
12+
checks-reporter-with-killswitch "Jest Integration Tests $((BUILDKITE_PARALLEL_JOB+1))" \
13+
.buildkite/scripts/steps/test/jest_parallel.sh jest.integration.config.js

.buildkite/scripts/steps/test/jest_parallel.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ exitCode=0
1313
while read -r config; do
1414
if [ "$((i % JOB_COUNT))" -eq "$JOB" ]; then
1515
echo "--- $ node scripts/jest --config $config"
16-
node --max-old-space-size=14336 ./node_modules/.bin/jest --config="$config" --runInBand --coverage=false
16+
node --max-old-space-size=14336 ./node_modules/.bin/jest --config="$config" --runInBand --coverage=false --passWithNoTests
1717
lastCode=$?
1818

1919
if [ $lastCode -ne 0 ]; then
@@ -25,6 +25,6 @@ while read -r config; do
2525

2626
((i=i+1))
2727
# uses heredoc to avoid the while loop being in a sub-shell thus unable to overwrite exitCode
28-
done <<< "$(find src x-pack packages -name jest.config.js -not -path "*/__fixtures__/*" | sort)"
28+
done <<< "$(find src x-pack packages -name ${1:-jest.config.js} -not -path "*/__fixtures__/*" | sort)"
2929

30-
exit $exitCode
30+
exit $exitCode

.eslintrc.js

+12
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,18 @@ module.exports = {
886886
],
887887
},
888888
},
889+
{
890+
// require explicit return types in route handlers for performance reasons
891+
files: ['x-pack/plugins/apm/server/**/route.ts'],
892+
rules: {
893+
'@typescript-eslint/explicit-function-return-type': [
894+
'error',
895+
{
896+
allowTypedFunctionExpressions: false,
897+
},
898+
],
899+
},
900+
},
889901

890902
/**
891903
* Fleet overrides

dev_docs/tutorials/debugging.mdx

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ Next we will go over how to exactly enable the inspector for different aspects o
2121

2222
You will need to run Jest directly from the Node script:
2323

24-
`node --inspect-brk scripts/jest [TestPathPattern]`
24+
`node --inspect-brk node_modules/.bin/jest --runInBand --config [JestConfig] [TestPathPattern]`
25+
26+
Additional information can be found in the [Jest troubleshooting documentation](https://jestjs.io/docs/troubleshooting).
2527

2628
### Functional Test Runner
2729

docs/api/upgrade-assistant/status.asciidoc

+1-15
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,8 @@ The API returns the following:
3131
"cluster": [
3232
{
3333
"message": "Cluster deprecated issue",
34-
"details": "...",
35-
"level": "warning",
36-
"url": "https://docs.elastic.co/..."
37-
}
38-
],
39-
"indices": [
40-
{
41-
"message": "Index was created before 6.0",
42-
"details": "...",
43-
"index": "myIndex",
44-
"level": "critical",
45-
"reindex": true, <1>
46-
"url": "https://docs.elastic.co/..."
34+
"details":"You have 2 system indices that must be migrated and 5 Elasticsearch deprecation issues and 0 Kibana deprecation issues that must be resolved before upgrading."
4735
}
4836
]
4937
}
5038
--------------------------------------------------
51-
52-
<1> To fix indices with the `reindex` attribute, set to `true` using the <<start-resume-reindex, Start or resume reindex API>>.

docs/developer/architecture/core/logging-configuration-migration.asciidoc

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
[discrete]
21
[[logging-config-changes]]
3-
=== Logging configuration changes
2+
== Logging configuration changes
43

54
WARNING: {kib} 8.0.0 and later uses a new logging system. Before you upgrade, read the documentation for your {kib} version.
65

@@ -43,4 +42,3 @@ WARNING: {kib} 8.0.0 and later uses a new logging system. Before you upgrade, re
4342
| error | `{ message, name, stack }` | `{ message, name, stack, code, signal }`
4443

4544
|===
46-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [AppLeaveConfirmAction](./kibana-plugin-core-public.appleaveconfirmaction.md) &gt; [buttonColor](./kibana-plugin-core-public.appleaveconfirmaction.buttoncolor.md)
4+
5+
## AppLeaveConfirmAction.buttonColor property
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
buttonColor?: ButtonColor;
11+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [kibana-plugin-core-public](./kibana-plugin-core-public.md) &gt; [AppLeaveConfirmAction](./kibana-plugin-core-public.appleaveconfirmaction.md) &gt; [confirmButtonText](./kibana-plugin-core-public.appleaveconfirmaction.confirmbuttontext.md)
4+
5+
## AppLeaveConfirmAction.confirmButtonText property
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
confirmButtonText?: string;
11+
```

docs/development/core/public/kibana-plugin-core-public.appleaveconfirmaction.md

+2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ export interface AppLeaveConfirmAction
1818

1919
| Property | Type | Description |
2020
| --- | --- | --- |
21+
| [buttonColor?](./kibana-plugin-core-public.appleaveconfirmaction.buttoncolor.md) | ButtonColor | <i>(Optional)</i> |
2122
| [callback?](./kibana-plugin-core-public.appleaveconfirmaction.callback.md) | () =&gt; void | <i>(Optional)</i> |
23+
| [confirmButtonText?](./kibana-plugin-core-public.appleaveconfirmaction.confirmbuttontext.md) | string | <i>(Optional)</i> |
2224
| [text](./kibana-plugin-core-public.appleaveconfirmaction.text.md) | string | |
2325
| [title?](./kibana-plugin-core-public.appleaveconfirmaction.title.md) | string | <i>(Optional)</i> |
2426
| [type](./kibana-plugin-core-public.appleaveconfirmaction.type.md) | AppLeaveActionType.confirm | |

docs/osquery/osquery.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ or <<osquery-map-fields,map ECS fields>>. When you add a saved query to a pack,
112112
. Click a pack name to view the status.
113113
+
114114
Details include the last time each query ran, how many results were returned, and the number of agents the query ran against.
115-
If there are errors, expand the row to view the details.
115+
If there are errors, expand the row to view the details, including an option to view more information in the Logs.
116116
+
117117
[role="screenshot"]
118118
image::images/scheduled-pack.png[Shows queries in the pack and details about each query, including the last time it ran, how many results were returned, the number of agents it ran against, and if there are errors]

docs/setup/upgrade.asciidoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ complete the upgrade migration before bringing up the remaining instances.
4242
[[preventing-migration-failures]]
4343
=== Preparing for migration
4444

45-
There are extra steps you can follow to ensure you are ready for migration.
45+
Take these extra steps to ensure you are ready for migration.
4646

4747
[float]
4848
==== Ensure your {es} cluster is healthy

docs/setup/upgrade/resolving-migration-failures.asciidoc

+8-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Migrating {kib} primarily involves migrating saved object documents to be compat
55
with the new version.
66

77
[float]
8-
==== Resolve saved object migration failures
8+
==== Saved object migration failures
99

1010
If {kib} unexpectedly terminates while migrating a saved object index, {kib} automatically attempts to
1111
perform the migration again when the process restarts. Do not delete any saved objects indices to
@@ -21,14 +21,14 @@ If you're unable to resolve a failed migration, contact Support.
2121

2222
[float]
2323
[[upgrade-migrations-old-indices]]
24-
==== Handle old `.kibana_N` indices
24+
==== Old `.kibana_N` indices
2525

2626
After the migrations complete, multiple {kib} indices are created in {es}: (`.kibana_1`, `.kibana_2`, `.kibana_7.12.0` etc).
2727
{kib} only uses the index that the `.kibana` and `.kibana_task_manager` aliases point to.
2828
The other {kib} indices can be safely deleted, but are left around as a matter of historical record, and to facilitate rolling {kib} back to a previous version.
2929

3030
[float]
31-
==== Handle known issues with {fleet} beta
31+
==== Known issues with {fleet} beta
3232
If you see a`timeout_exception` or `receive_timeout_transport_exception` error,
3333
it might be from a known known issue in 7.12.0 if you tried the {fleet} beta.
3434
Upgrade migrations fail because of a large number of documents in the `.kibana` index,
@@ -45,7 +45,7 @@ For instructions on how to mitigate the known issue, refer to https://github.com
4545

4646

4747
[float]
48-
==== Handle corrupt saved objects
48+
==== Corrupt saved objects
4949
To find and remedy problems caused by corrupt documents, we highly recommend testing your {kib} upgrade in a development cluster,
5050
especially when there are custom integrations that create saved objects in your environment.
5151

@@ -87,13 +87,13 @@ The dashboard with the `e3c5fc71-ac71-4805-bcab-2bcc9cc93275` ID that belongs to
8787

8888
[float]
8989
[[unknown-saved-object-types]]
90-
==== Handle documents for unknown saved objects
90+
==== Documents for unknown saved objects
9191
Migrations will fail if saved objects belong to an unknown
9292
saved object type. Unknown saved objects are typically caused by
9393
to the {es} index, or by disabling a plugin that had previously
9494
created a saved object.
9595

96-
We recommend using the {kibana-ref-all}/7.17/upgrade-assistant.html[Upgrade Assistant]
96+
We recommend using the {kibana-ref-all}/7.17/upgrade-assistant.html[Upgrade Assistant]
9797
to discover and remedy any unknown saved object types. {kib} version 7.17.0 deployments containing unknown saved
9898
object types will also log the following warning message:
9999

@@ -110,15 +110,15 @@ Unable to complete saved object migrations for the [.kibana] index: Migration fa
110110
--------------------------------------------
111111

112112
[float]
113-
==== Handle incompatible settings or mappings
113+
==== Incompatible settings or mappings
114114
Matching index templates that specify `settings.refresh_interval` or
115115
`mappings` are known to interfere with {kib} upgrades.
116116
This can happen when index templates are defined manually.
117117

118118
To make sure the index templates won't apply to new `.kibana*` indices, narrow down the {data-sources} of any user-defined index templates.
119119

120120
[float]
121-
==== Handle incompatible `xpack.tasks.index` configuration setting
121+
==== Incompatible `xpack.tasks.index` configuration setting
122122
In {kib} 7.5.0 and earlier, when the task manager index is set to `.tasks`
123123
with the configuration setting `xpack.tasks.index: ".tasks"`,
124124
upgrade migrations fail. In {kib} 7.5.1 and later, the incompatible configuration

docs/setup/upgrade/rollback-migration.asciidoc

+29-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ To roll back after a failed upgrade migration, you must also rollback the saved
1818
. Before proceeding, {ref}/snapshots-take-snapshot.html[take a snapshot] that contains the `kibana` feature state.
1919
By default, snapshots include the `kibana` feature state.
2020
. To make sure no {kib} instances are performing an upgrade migration, shut down all {kib} instances.
21-
. To delete all saved object indices, use `DELETE /.kibana*`.
21+
. To delete all saved object indices, enter:
22+
+
23+
[source,sh]
24+
--------------------------------------------
25+
DELETE /.kibana*
26+
--------------------------------------------
27+
2228
. {ref}/snapshots-restore-snapshot.html[Restore] the `kibana` feature state from the snapshot.
2329
. Start all {kib} instances on the older version you want to rollback to.
2430

@@ -30,12 +36,29 @@ To roll back after a failed upgrade migration, you must also rollback the saved
3036
. Delete the version-specific indices created by the failed upgrade migration.
3137
+
3238
For example, to rollback from a failed upgrade
33-
to v7.12.0, use `DELETE /.kibana_7.12.0_*,.kibana_task_manager_7.12.0_*`.
39+
to v7.12.0, enter:
40+
+
41+
[source,sh]
42+
--------------------------------------------
43+
DELETE /.kibana_7.12.0_*,.kibana_task_manager_7.12.0_*
44+
--------------------------------------------
45+
3446
. Inspect the output of `GET /_cat/aliases`.
3547
+
3648
If the `.kibana` or `.kibana_task_manager` aliases are missing, you must create them manually.
3749
Find the latest index from the output of `GET /_cat/indices` and create the missing alias to point to the latest index.
38-
For example, if the `.kibana` alias is missing, and the latest index is `.kibana_3`, create a new alias using `POST /.kibana_3/_aliases/.kibana`.
39-
. To remove the write block from the roll back indices, use
40-
`PUT /.kibana,.kibana_task_manager/_settings {"index.blocks.write": false}`
41-
. Start {kib} on the older version you want to rollback to.
50+
For example, if the `.kibana` alias is missing, and the latest index is `.kibana_3`, create a new alias using:
51+
+
52+
[source,sh]
53+
--------------------------------------------
54+
POST /.kibana_3/_aliases/.kibana
55+
--------------------------------------------
56+
57+
. To remove the write block from the roll back indices, enter:
58+
+
59+
[source,sh]
60+
--------------------------------------------
61+
PPUT /.kibana,.kibana_task_manager/_settings {"index.blocks.write": false}
62+
--------------------------------------------
63+
64+
. Start {kib} on the older version you want to roll back to.

docs/setup/upgrade/saved-objects-migration.asciidoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ the most up-to-date saved object indices.
2525
When you start a new {kib} installation, an upgrade migration is performed before starting plugins or serving HTTP traffic.
2626
Before you upgrade, shut down old nodes to prevent losing acknowledged writes.
2727
To reduce the likelihood of old nodes losing acknowledged writes, {kib} 7.12.0 and later
28-
adds a write block to the outdated index. Table 1 lists the saved objects indices used by previous {kib} versions.
28+
adds a write block to the outdated index.
29+
30+
The following tables lists the saved objects indices used by previous {kib} versions.
2931

3032
.Saved object indices and aliases per {kib} version
3133
[options="header"]

package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"yarn": "^1.21.1"
7575
},
7676
"resolutions": {
77-
"**/@babel/runtime": "^7.16.7",
77+
"**/@babel/runtime": "^7.17.2",
7878
"**/@types/node": "16.10.2",
7979
"**/chokidar": "^3.4.3",
8080
"**/deepmerge": "^4.2.2",
@@ -96,7 +96,7 @@
9696
"globby/fast-glob": "3.2.7"
9797
},
9898
"dependencies": {
99-
"@babel/runtime": "^7.16.7",
99+
"@babel/runtime": "^7.17.2",
100100
"@dnd-kit/core": "^3.1.1",
101101
"@dnd-kit/sortable": "^4.0.0",
102102
"@dnd-kit/utilities": "^2.0.0",
@@ -203,7 +203,7 @@
203203
"base64-js": "^1.3.1",
204204
"bitmap-sdf": "^1.0.3",
205205
"brace": "0.11.1",
206-
"broadcast-channel": "^4.9.0",
206+
"broadcast-channel": "^4.10.0",
207207
"canvg": "^3.0.9",
208208
"chalk": "^4.1.0",
209209
"cheerio": "^1.0.0-rc.10",
@@ -424,25 +424,25 @@
424424
},
425425
"devDependencies": {
426426
"@apidevtools/swagger-parser": "^10.0.3",
427-
"@babel/cli": "^7.16.8",
428-
"@babel/core": "^7.16.12",
429-
"@babel/eslint-parser": "^7.16.5",
427+
"@babel/cli": "^7.17.0",
428+
"@babel/core": "^7.17.2",
429+
"@babel/eslint-parser": "^7.17.0",
430430
"@babel/eslint-plugin": "^7.16.5",
431-
"@babel/generator": "^7.16.8",
432-
"@babel/parser": "^7.16.12",
431+
"@babel/generator": "^7.17.0",
432+
"@babel/parser": "^7.17.0",
433433
"@babel/plugin-proposal-class-properties": "^7.16.7",
434434
"@babel/plugin-proposal-export-namespace-from": "^7.16.7",
435435
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7",
436436
"@babel/plugin-proposal-object-rest-spread": "^7.16.7",
437437
"@babel/plugin-proposal-optional-chaining": "^7.16.7",
438438
"@babel/plugin-proposal-private-methods": "^7.16.11",
439-
"@babel/plugin-transform-runtime": "^7.16.10",
439+
"@babel/plugin-transform-runtime": "^7.17.0",
440440
"@babel/preset-env": "^7.16.11",
441441
"@babel/preset-react": "^7.16.7",
442442
"@babel/preset-typescript": "^7.16.7",
443-
"@babel/register": "^7.16.9",
444-
"@babel/traverse": "^7.16.10",
445-
"@babel/types": "^7.16.8",
443+
"@babel/register": "^7.17.0",
444+
"@babel/traverse": "^7.17.0",
445+
"@babel/types": "^7.17.0",
446446
"@bazel/ibazel": "^0.15.10",
447447
"@bazel/typescript": "4.0.0",
448448
"@cypress/code-coverage": "^3.9.12",

0 commit comments

Comments
 (0)