Skip to content

Commit

Permalink
Merge branch 'main' into alerting/recovery-context-services-2
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed Feb 15, 2022
2 parents fb54b5b + c2a0103 commit 30d3f51
Show file tree
Hide file tree
Showing 402 changed files with 10,093 additions and 3,892 deletions.
3 changes: 2 additions & 1 deletion .buildkite/pipelines/hourly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ steps:

- command: .buildkite/scripts/steps/test/jest_integration.sh
label: 'Jest Integration Tests'
parallelism: 2
agents:
queue: n2-4
timeout_in_minutes: 120
timeout_in_minutes: 90
key: jest-integration

- command: .buildkite/scripts/steps/test/api_integration.sh
Expand Down
8 changes: 8 additions & 0 deletions .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@ steps:
agents:
queue: c2-8
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/on_merge_ts_refs_api_docs.sh
label: Build TS Refs and Check Public API Docs
agents:
queue: c2-4
timeout_in_minutes: 80
retry:
automatic:
- exit_status: '*'
limit: 1

- wait: ~
continue_on_failure: true
Expand Down
3 changes: 2 additions & 1 deletion .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ steps:

- command: .buildkite/scripts/steps/test/jest_integration.sh
label: 'Jest Integration Tests'
parallelism: 2
agents:
queue: n2-4
timeout_in_minutes: 120
timeout_in_minutes: 90
key: jest-integration

- command: .buildkite/scripts/steps/test/api_integration.sh
Expand Down
3 changes: 1 addition & 2 deletions .buildkite/scripts/steps/storybooks/build_and_upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const STORYBOOKS = [
'canvas',
'ci_composite',
'cloud',
'codeeditor',
'custom_integrations',
'dashboard_enhanced',
'dashboard',
Expand All @@ -31,13 +30,13 @@ const STORYBOOKS = [
'expression_tagcloud',
'fleet',
'infra',
'kibana_react',
'lists',
'observability',
'presentation',
'security_solution',
'shared_ux',
'ui_actions_enhanced',
'url_template_editor',
];

const GITHUB_CONTEXT = 'Build and Publish Storybooks';
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/scripts/steps/test/jest_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ is_test_execution_step
.buildkite/scripts/bootstrap.sh

echo '--- Jest Integration Tests'
checks-reporter-with-killswitch "Jest Integration Tests" \
node --max-old-space-size=6144 scripts/jest_integration --ci
checks-reporter-with-killswitch "Jest Integration Tests $((BUILDKITE_PARALLEL_JOB+1))" \
.buildkite/scripts/steps/test/jest_parallel.sh jest.integration.config.js
6 changes: 3 additions & 3 deletions .buildkite/scripts/steps/test/jest_parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exitCode=0
while read -r config; do
if [ "$((i % JOB_COUNT))" -eq "$JOB" ]; then
echo "--- $ node scripts/jest --config $config"
node --max-old-space-size=14336 ./node_modules/.bin/jest --config="$config" --runInBand --coverage=false
node --max-old-space-size=14336 ./node_modules/.bin/jest --config="$config" --runInBand --coverage=false --passWithNoTests
lastCode=$?

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

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

exit $exitCode
exit $exitCode
12 changes: 12 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,18 @@ module.exports = {
],
},
},
{
// require explicit return types in route handlers for performance reasons
files: ['x-pack/plugins/apm/server/**/route.ts'],
rules: {
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowTypedFunctionExpressions: false,
},
],
},
},

/**
* Fleet overrides
Expand Down
4 changes: 3 additions & 1 deletion dev_docs/tutorials/debugging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ Next we will go over how to exactly enable the inspector for different aspects o

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

`node --inspect-brk scripts/jest [TestPathPattern]`
`node --inspect-brk node_modules/.bin/jest --runInBand --config [JestConfig] [TestPathPattern]`

Additional information can be found in the [Jest troubleshooting documentation](https://jestjs.io/docs/troubleshooting).

### Functional Test Runner

Expand Down
16 changes: 1 addition & 15 deletions docs/api/upgrade-assistant/status.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,8 @@ The API returns the following:
"cluster": [
{
"message": "Cluster deprecated issue",
"details": "...",
"level": "warning",
"url": "https://docs.elastic.co/..."
}
],
"indices": [
{
"message": "Index was created before 6.0",
"details": "...",
"index": "myIndex",
"level": "critical",
"reindex": true, <1>
"url": "https://docs.elastic.co/..."
"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."
}
]
}
--------------------------------------------------

<1> To fix indices with the `reindex` attribute, set to `true` using the <<start-resume-reindex, Start or resume reindex API>>.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[discrete]
[[logging-config-changes]]
=== Logging configuration changes
== Logging configuration changes

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

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

|===

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

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

## AppLeaveConfirmAction.buttonColor property

<b>Signature:</b>

```typescript
buttonColor?: ButtonColor;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

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

## AppLeaveConfirmAction.confirmButtonText property

<b>Signature:</b>

```typescript
confirmButtonText?: string;
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ export interface AppLeaveConfirmAction

| Property | Type | Description |
| --- | --- | --- |
| [buttonColor?](./kibana-plugin-core-public.appleaveconfirmaction.buttoncolor.md) | ButtonColor | <i>(Optional)</i> |
| [callback?](./kibana-plugin-core-public.appleaveconfirmaction.callback.md) | () =&gt; void | <i>(Optional)</i> |
| [confirmButtonText?](./kibana-plugin-core-public.appleaveconfirmaction.confirmbuttontext.md) | string | <i>(Optional)</i> |
| [text](./kibana-plugin-core-public.appleaveconfirmaction.text.md) | string | |
| [title?](./kibana-plugin-core-public.appleaveconfirmaction.title.md) | string | <i>(Optional)</i> |
| [type](./kibana-plugin-core-public.appleaveconfirmaction.type.md) | AppLeaveActionType.confirm | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export declare type KibanaExecutionContext = {
readonly type: string;
readonly name: string;
readonly id: string;
readonly description: string;
readonly description?: string;
readonly url?: string;
parent?: KibanaExecutionContext;
child?: KibanaExecutionContext;
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export declare type KibanaExecutionContext = {
readonly type: string;
readonly name: string;
readonly id: string;
readonly description: string;
readonly description?: string;
readonly url?: string;
parent?: KibanaExecutionContext;
child?: KibanaExecutionContext;
};
```
2 changes: 1 addition & 1 deletion docs/osquery/osquery.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ or <<osquery-map-fields,map ECS fields>>. When you add a saved query to a pack,
. Click a pack name to view the status.
+
Details include the last time each query ran, how many results were returned, and the number of agents the query ran against.
If there are errors, expand the row to view the details.
If there are errors, expand the row to view the details, including an option to view more information in the Logs.
+
[role="screenshot"]
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]
Expand Down
2 changes: 1 addition & 1 deletion docs/setup/upgrade.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ complete the upgrade migration before bringing up the remaining instances.
[[preventing-migration-failures]]
=== Preparing for migration

There are extra steps you can follow to ensure you are ready for migration.
Take these extra steps to ensure you are ready for migration.

[float]
==== Ensure your {es} cluster is healthy
Expand Down
16 changes: 8 additions & 8 deletions docs/setup/upgrade/resolving-migration-failures.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Migrating {kib} primarily involves migrating saved object documents to be compat
with the new version.

[float]
==== Resolve saved object migration failures
==== Saved object migration failures

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

[float]
[[upgrade-migrations-old-indices]]
==== Handle old `.kibana_N` indices
==== Old `.kibana_N` indices

After the migrations complete, multiple {kib} indices are created in {es}: (`.kibana_1`, `.kibana_2`, `.kibana_7.12.0` etc).
{kib} only uses the index that the `.kibana` and `.kibana_task_manager` aliases point to.
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.

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


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

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

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

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

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

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

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

[float]
==== Handle incompatible `xpack.tasks.index` configuration setting
==== Incompatible `xpack.tasks.index` configuration setting
In {kib} 7.5.0 and earlier, when the task manager index is set to `.tasks`
with the configuration setting `xpack.tasks.index: ".tasks"`,
upgrade migrations fail. In {kib} 7.5.1 and later, the incompatible configuration
Expand Down
35 changes: 29 additions & 6 deletions docs/setup/upgrade/rollback-migration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ To roll back after a failed upgrade migration, you must also rollback the saved
. Before proceeding, {ref}/snapshots-take-snapshot.html[take a snapshot] that contains the `kibana` feature state.
By default, snapshots include the `kibana` feature state.
. To make sure no {kib} instances are performing an upgrade migration, shut down all {kib} instances.
. To delete all saved object indices, use `DELETE /.kibana*`.
. To delete all saved object indices, enter:
+
[source,sh]
--------------------------------------------
DELETE /.kibana*
--------------------------------------------

. {ref}/snapshots-restore-snapshot.html[Restore] the `kibana` feature state from the snapshot.
. Start all {kib} instances on the older version you want to rollback to.

Expand All @@ -30,12 +36,29 @@ To roll back after a failed upgrade migration, you must also rollback the saved
. Delete the version-specific indices created by the failed upgrade migration.
+
For example, to rollback from a failed upgrade
to v7.12.0, use `DELETE /.kibana_7.12.0_*,.kibana_task_manager_7.12.0_*`.
to v7.12.0, enter:
+
[source,sh]
--------------------------------------------
DELETE /.kibana_7.12.0_*,.kibana_task_manager_7.12.0_*
--------------------------------------------

. Inspect the output of `GET /_cat/aliases`.
+
If the `.kibana` or `.kibana_task_manager` aliases are missing, you must create them manually.
Find the latest index from the output of `GET /_cat/indices` and create the missing alias to point to the latest index.
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`.
. To remove the write block from the roll back indices, use
`PUT /.kibana,.kibana_task_manager/_settings {"index.blocks.write": false}`
. Start {kib} on the older version you want to rollback to.
For example, if the `.kibana` alias is missing, and the latest index is `.kibana_3`, create a new alias using:
+
[source,sh]
--------------------------------------------
POST /.kibana_3/_aliases/.kibana
--------------------------------------------

. To remove the write block from the roll back indices, enter:
+
[source,sh]
--------------------------------------------
PPUT /.kibana,.kibana_task_manager/_settings {"index.blocks.write": false}
--------------------------------------------

. Start {kib} on the older version you want to roll back to.
4 changes: 3 additions & 1 deletion docs/setup/upgrade/saved-objects-migration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ the most up-to-date saved object indices.
When you start a new {kib} installation, an upgrade migration is performed before starting plugins or serving HTTP traffic.
Before you upgrade, shut down old nodes to prevent losing acknowledged writes.
To reduce the likelihood of old nodes losing acknowledged writes, {kib} 7.12.0 and later
adds a write block to the outdated index. Table 1 lists the saved objects indices used by previous {kib} versions.
adds a write block to the outdated index.

The following tables lists the saved objects indices used by previous {kib} versions.

.Saved object indices and aliases per {kib} version
[options="header"]
Expand Down
20 changes: 10 additions & 10 deletions docs/user/troubleshooting/trace-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ Now, you can see the request to {es} has been initiated by the `[Logs] Unique Vi
[source,text]
----
[DEBUG][execution_context] stored the execution context: {
"parent": {
"type": "application",
"name": "dashboard",
"id": "edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b",
"description": "[Logs] Web Traffic","url":"/view/edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b"
"type": "application",
"name": "dashboard",
"id": "edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b",
"description": "[Logs] Web Traffic","url":"/view/edf84fe0-e1a0-11e7-b6d5-4dc382ef7f5b"
"child": {
"type": "visualization",
"name": "Vega",
"id": "cb099a20-ea66-11eb-9425-113343a037e3",
"description": "[Logs] Unique Visitor Heatmap",
"url": "/app/visualize#/edit/cb099a20-ea66-11eb-9425-113343a037e3"
},
"type": "visualization",
"name": "Vega",
"id": "cb099a20-ea66-11eb-9425-113343a037e3",
"description": "[Logs] Unique Visitor Heatmap",
"url": "/app/visualize#/edit/cb099a20-ea66-11eb-9425-113343a037e3"
}
----
Loading

0 comments on commit 30d3f51

Please sign in to comment.