Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into kbn-93823-move-ap…
Browse files Browse the repository at this point in the history
…m-script
  • Loading branch information
pgayvallet committed Mar 10, 2021
2 parents 16bcc2b + 6044f8a commit 331c6f5
Show file tree
Hide file tree
Showing 441 changed files with 5,912 additions and 2,454 deletions.
1 change: 1 addition & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ rules:
- return
- for
- at-root
- warn
comment-no-empty: true
no-duplicate-at-import-rules: true
no-duplicate-selectors: true
Expand Down
16 changes: 8 additions & 8 deletions api_docs/case.json → api_docs/cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@
"children": [
{
"tags": [],
"id": "def-server.CaseRequestContext.getCaseClient",
"id": "def-server.CaseRequestContext.getCasesClient",
"type": "Function",
"label": "getCaseClient",
"label": "getCasesClient",
"description": [],
"source": {
"path": "x-pack/plugins/case/server/types.ts",
"path": "x-pack/plugins/cases/server/types.ts",
"lineNumber": 14
},
"signature": [
"() => ",
{
"pluginId": "case",
"pluginId": "cases",
"scope": "server",
"docId": "kibCasePluginApi",
"section": "def-server.CaseClient",
"text": "CaseClient"
"section": "def-server.CasesClient",
"text": "CasesClient"
}
]
}
],
"source": {
"path": "x-pack/plugins/case/server/types.ts",
"path": "x-pack/plugins/cases/server/types.ts",
"lineNumber": 13
},
"initialIsOpen": false
Expand All @@ -60,4 +60,4 @@
"misc": [],
"objects": []
}
}
}
2 changes: 1 addition & 1 deletion api_docs/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -4242,7 +4242,7 @@
"type": "string",
"label": "actionPath",
"description": [
"The path (without the basePath) that the user should be redirect to to address this warning."
"The path (without the basePath) that the user should be redirect to address this warning."
],
"source": {
"path": "src/core/server/saved_objects/import/types.ts",
Expand Down
2 changes: 1 addition & 1 deletion api_docs/core_application.json
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,7 @@
"deprecated"
],
"description": [
"\nA handler that will be executed before leaving the application, either when\ngoing to another application or when closing the browser tab or manually changing\nthe url.\nShould return `confirm` to to prompt a message to the user before leaving the page, or `default`\nto keep the default behavior (doing nothing).\n\nSee {@link AppMountParameters} for detailed usage examples.\n"
"\nA handler that will be executed before leaving the application, either when\ngoing to another application or when closing the browser tab or manually changing\nthe url.\nShould return `confirm` to prompt a message to the user before leaving the page, or `default`\nto keep the default behavior (doing nothing).\n\nSee {@link AppMountParameters} for detailed usage examples.\n"
],
"source": {
"path": "src/core/public/application/types.ts",
Expand Down
2 changes: 1 addition & 1 deletion api_docs/core_saved_objects.json
Original file line number Diff line number Diff line change
Expand Up @@ -10080,7 +10080,7 @@
"type": "string",
"label": "actionPath",
"description": [
"The path (without the basePath) that the user should be redirect to to address this warning."
"The path (without the basePath) that the user should be redirect to address this warning."
],
"source": {
"path": "src/core/server/saved_objects/import/types.ts",
Expand Down
2 changes: 1 addition & 1 deletion api_docs/saved_objects_tagging.json
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@
"type": "string",
"label": "tagFeatureId",
"description": [
"\nThe id of the tagging feature as registered to to `features` plugin"
"\nThe id of the tagging feature as registered to `features` plugin"
],
"source": {
"path": "x-pack/plugins/saved_objects_tagging/common/constants.ts",
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/getting-started/debugging.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ cd ../kibana
----

. Change the elasticsearch credentials in your `kibana.yml` configuration file to match those needed by elasticsearch and the APM server (see the apm-integration-testing repo's https://github.com/elastic/apm-integration-testing#logging-in[README] for users provided to test different scenarios).
. Make sure that the APM agent is active and points to the local APM server by adding the following configuration settings to to a config file under `config/apm.dev.js`:
. Make sure that the APM agent is active and points to the local APM server by adding the following configuration settings to a config file under `config/apm.dev.js`:
+
Example `config/apm.dev.js` file:
+
Expand Down
2 changes: 1 addition & 1 deletion docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ Failure to have auth enabled in Kibana will make for a broken UI. UI-based error
|"Never look back. The past is done. The future is a blank canvas." ― Suzy Kassem, Rise Up and Salute the Sun
|{kib-repo}blob/{branch}/x-pack/plugins/case/README.md[case]
|{kib-repo}blob/{branch}/x-pack/plugins/cases/README.md[cases]
|Experimental Feature
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
> [AppMountParameters.onAppLeave](./kibana-plugin-core-public.appmountparameters.onappleave.md) has been deprecated in favor of [ScopedHistory.block](./kibana-plugin-core-public.scopedhistory.block.md)
>
A handler that will be executed before leaving the application, either when going to another application or when closing the browser tab or manually changing the url. Should return `confirm` to to prompt a message to the user before leaving the page, or `default` to keep the default behavior (doing nothing).
A handler that will be executed before leaving the application, either when going to another application or when closing the browser tab or manually changing the url. Should return `confirm` to prompt a message to the user before leaving the page, or `default` to keep the default behavior (doing nothing).

See [AppMountParameters](./kibana-plugin-core-public.appmountparameters.md) for detailed usage examples.

Expand Down
2 changes: 1 addition & 1 deletion docs/development/core/public/kibana-plugin-core-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| Type Alias | Description |
| --- | --- |
| [AppLeaveAction](./kibana-plugin-core-public.appleaveaction.md) | Possible actions to return from a [AppLeaveHandler](./kibana-plugin-core-public.appleavehandler.md)<!-- -->See [AppLeaveConfirmAction](./kibana-plugin-core-public.appleaveconfirmaction.md) and [AppLeaveDefaultAction](./kibana-plugin-core-public.appleavedefaultaction.md) |
| [AppLeaveHandler](./kibana-plugin-core-public.appleavehandler.md) | A handler that will be executed before leaving the application, either when going to another application or when closing the browser tab or manually changing the url. Should return <code>confirm</code> to to prompt a message to the user before leaving the page, or <code>default</code> to keep the default behavior (doing nothing).<!-- -->See [AppMountParameters](./kibana-plugin-core-public.appmountparameters.md) for detailed usage examples. |
| [AppLeaveHandler](./kibana-plugin-core-public.appleavehandler.md) | A handler that will be executed before leaving the application, either when going to another application or when closing the browser tab or manually changing the url. Should return <code>confirm</code> to prompt a message to the user before leaving the page, or <code>default</code> to keep the default behavior (doing nothing).<!-- -->See [AppMountParameters](./kibana-plugin-core-public.appmountparameters.md) for detailed usage examples. |
| [AppMount](./kibana-plugin-core-public.appmount.md) | A mount function called when the user navigates to this app's route. |
| [AppSearchDeepLink](./kibana-plugin-core-public.appsearchdeeplink.md) | Input type for registering secondary in-app locations for an application.<!-- -->Deep links must include at least one of <code>path</code> or <code>searchDeepLinks</code>. A deep link that does not have a <code>path</code> represents a topological level in the application's hierarchy, but does not have a destination URL that is user-accessible. |
| [AppUnmount](./kibana-plugin-core-public.appunmount.md) | A function called when an application should be unmounted from the page. This function should be synchronous. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## SavedObjectsImportActionRequiredWarning.actionPath property

The path (without the basePath) that the user should be redirect to to address this warning.
The path (without the basePath) that the user should be redirect to address this warning.

<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface SavedObjectsImportActionRequiredWarning

| Property | Type | Description |
| --- | --- | --- |
| [actionPath](./kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.actionpath.md) | <code>string</code> | The path (without the basePath) that the user should be redirect to to address this warning. |
| [actionPath](./kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.actionpath.md) | <code>string</code> | The path (without the basePath) that the user should be redirect to address this warning. |
| [buttonLabel](./kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.buttonlabel.md) | <code>string</code> | An optional label to use for the link button. If unspecified, a default label will be used. |
| [message](./kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.message.md) | <code>string</code> | The translated message to display to the user. |
| [type](./kibana-plugin-core-public.savedobjectsimportactionrequiredwarning.type.md) | <code>'action_required'</code> | |
Expand Down
2 changes: 1 addition & 1 deletion docs/development/core/server/kibana-plugin-core-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [SavedObjectAttributeSingle](./kibana-plugin-core-server.savedobjectattributesingle.md) | Don't use this type, it's simply a helper type for [SavedObjectAttribute](./kibana-plugin-core-server.savedobjectattribute.md) |
| [SavedObjectMigrationFn](./kibana-plugin-core-server.savedobjectmigrationfn.md) | A migration function for a [saved object type](./kibana-plugin-core-server.savedobjectstype.md) used to migrate it to a given version |
| [SavedObjectSanitizedDoc](./kibana-plugin-core-server.savedobjectsanitizeddoc.md) | Describes Saved Object documents that have passed through the migration framework and are guaranteed to have a <code>references</code> root property. |
| [SavedObjectsClientContract](./kibana-plugin-core-server.savedobjectsclientcontract.md) | Saved Objects is Kibana's data persisentence mechanism allowing plugins to use Elasticsearch for storing plugin state.<!-- -->\#\# SavedObjectsClient errors<!-- -->Since the SavedObjectsClient has its hands in everything we are a little paranoid about the way we present errors back to to application code. Ideally, all errors will be either:<!-- -->1. Caused by bad implementation (ie. undefined is not a function) and as such unpredictable 2. An error that has been classified and decorated appropriately by the decorators in [SavedObjectsErrorHelpers](./kibana-plugin-core-server.savedobjectserrorhelpers.md)<!-- -->Type 1 errors are inevitable, but since all expected/handle-able errors should be Type 2 the <code>isXYZError()</code> helpers exposed at <code>SavedObjectsErrorHelpers</code> should be used to understand and manage error responses from the <code>SavedObjectsClient</code>.<!-- -->Type 2 errors are decorated versions of the source error, so if the elasticsearch client threw an error it will be decorated based on its type. That means that rather than looking for <code>error.body.error.type</code> or doing substring checks on <code>error.body.error.reason</code>, just use the helpers to understand the meaning of the error:<!-- -->\`\`\`<!-- -->js if (SavedObjectsErrorHelpers.isNotFoundError(error)) { // handle 404 }<!-- -->if (SavedObjectsErrorHelpers.isNotAuthorizedError(error)) { // 401 handling should be automatic, but in case you wanted to know }<!-- -->// always rethrow the error unless you handle it throw error; \`\`\`<!-- -->\#\#\# 404s from missing index<!-- -->From the perspective of application code and APIs the SavedObjectsClient is a black box that persists objects. One of the internal details that users have no control over is that we use an elasticsearch index for persistance and that index might be missing.<!-- -->At the time of writing we are in the process of transitioning away from the operating assumption that the SavedObjects index is always available. Part of this transition is handling errors resulting from an index missing. These used to trigger a 500 error in most cases, and in others cause 404s with different error messages.<!-- -->From my (Spencer) perspective, a 404 from the SavedObjectsApi is a 404; The object the request/call was targeting could not be found. This is why \#14141 takes special care to ensure that 404 errors are generic and don't distinguish between index missing or document missing.<!-- -->See [SavedObjectsClient](./kibana-plugin-core-server.savedobjectsclient.md) See [SavedObjectsErrorHelpers](./kibana-plugin-core-server.savedobjectserrorhelpers.md) |
| [SavedObjectsClientContract](./kibana-plugin-core-server.savedobjectsclientcontract.md) | Saved Objects is Kibana's data persisentence mechanism allowing plugins to use Elasticsearch for storing plugin state.<!-- -->\#\# SavedObjectsClient errors<!-- -->Since the SavedObjectsClient has its hands in everything we are a little paranoid about the way we present errors back to application code. Ideally, all errors will be either:<!-- -->1. Caused by bad implementation (ie. undefined is not a function) and as such unpredictable 2. An error that has been classified and decorated appropriately by the decorators in [SavedObjectsErrorHelpers](./kibana-plugin-core-server.savedobjectserrorhelpers.md)<!-- -->Type 1 errors are inevitable, but since all expected/handle-able errors should be Type 2 the <code>isXYZError()</code> helpers exposed at <code>SavedObjectsErrorHelpers</code> should be used to understand and manage error responses from the <code>SavedObjectsClient</code>.<!-- -->Type 2 errors are decorated versions of the source error, so if the elasticsearch client threw an error it will be decorated based on its type. That means that rather than looking for <code>error.body.error.type</code> or doing substring checks on <code>error.body.error.reason</code>, just use the helpers to understand the meaning of the error:<!-- -->\`\`\`<!-- -->js if (SavedObjectsErrorHelpers.isNotFoundError(error)) { // handle 404 }<!-- -->if (SavedObjectsErrorHelpers.isNotAuthorizedError(error)) { // 401 handling should be automatic, but in case you wanted to know }<!-- -->// always rethrow the error unless you handle it throw error; \`\`\`<!-- -->\#\#\# 404s from missing index<!-- -->From the perspective of application code and APIs the SavedObjectsClient is a black box that persists objects. One of the internal details that users have no control over is that we use an elasticsearch index for persistance and that index might be missing.<!-- -->At the time of writing we are in the process of transitioning away from the operating assumption that the SavedObjects index is always available. Part of this transition is handling errors resulting from an index missing. These used to trigger a 500 error in most cases, and in others cause 404s with different error messages.<!-- -->From my (Spencer) perspective, a 404 from the SavedObjectsApi is a 404; The object the request/call was targeting could not be found. This is why \#14141 takes special care to ensure that 404 errors are generic and don't distinguish between index missing or document missing.<!-- -->See [SavedObjectsClient](./kibana-plugin-core-server.savedobjectsclient.md) See [SavedObjectsErrorHelpers](./kibana-plugin-core-server.savedobjectserrorhelpers.md) |
| [SavedObjectsClientFactory](./kibana-plugin-core-server.savedobjectsclientfactory.md) | Describes the factory used to create instances of the Saved Objects Client. |
| [SavedObjectsClientFactoryProvider](./kibana-plugin-core-server.savedobjectsclientfactoryprovider.md) | Provider to invoke to retrieve a [SavedObjectsClientFactory](./kibana-plugin-core-server.savedobjectsclientfactory.md)<!-- -->. |
| [SavedObjectsClientWrapperFactory](./kibana-plugin-core-server.savedobjectsclientwrapperfactory.md) | Describes the factory used to create instances of Saved Objects Client Wrappers. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Saved Objects is Kibana's data persisentence mechanism allowing plugins to use E

\#\# SavedObjectsClient errors

Since the SavedObjectsClient has its hands in everything we are a little paranoid about the way we present errors back to to application code. Ideally, all errors will be either:
Since the SavedObjectsClient has its hands in everything we are a little paranoid about the way we present errors back to application code. Ideally, all errors will be either:

1. Caused by bad implementation (ie. undefined is not a function) and as such unpredictable 2. An error that has been classified and decorated appropriately by the decorators in [SavedObjectsErrorHelpers](./kibana-plugin-core-server.savedobjectserrorhelpers.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## SavedObjectsImportActionRequiredWarning.actionPath property

The path (without the basePath) that the user should be redirect to to address this warning.
The path (without the basePath) that the user should be redirect to address this warning.

<b>Signature:</b>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface SavedObjectsImportActionRequiredWarning

| Property | Type | Description |
| --- | --- | --- |
| [actionPath](./kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.actionpath.md) | <code>string</code> | The path (without the basePath) that the user should be redirect to to address this warning. |
| [actionPath](./kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.actionpath.md) | <code>string</code> | The path (without the basePath) that the user should be redirect to address this warning. |
| [buttonLabel](./kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.buttonlabel.md) | <code>string</code> | An optional label to use for the link button. If unspecified, a default label will be used. |
| [message](./kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.message.md) | <code>string</code> | The translated message to display to the user. |
| [type](./kibana-plugin-core-server.savedobjectsimportactionrequiredwarning.type.md) | <code>'action_required'</code> | |
Expand Down
2 changes: 1 addition & 1 deletion docs/management/upgrade-assistant/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ and guides you through the process of resolving issues, including reindexing.

Before you upgrade, make sure that you are using the latest released minor
version of {es} to see the most up-to-date deprecation issues.
For example, if you want to upgrade to to 7.0, make sure that you are using 6.8.
For example, if you want to upgrade to 7.0, make sure that you are using 6.8.

[float]
=== Required permissions
Expand Down
2 changes: 1 addition & 1 deletion docs/settings/reporting-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ reports, you might need to change the following settings.
Valid values are `year`, `month`, `week`, `day`, and `hour`. Defaults to `week`.

| `xpack.reporting.queue.pollEnabled` {ess-icon}
| Set to `true` (default) to enable the {kib} instance to to poll the index for
| Set to `true` (default) to enable the {kib} instance to poll the index for
pending jobs and claim them for execution. Setting this to `false` allows the
{kib} instance to only add new jobs to the reporting queue, list jobs, and
provide the downloads to completed report through the UI.
Expand Down
2 changes: 1 addition & 1 deletion docs/user/graph/troubleshooting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ of any statistical correlation with the sample.
required to assert a relationship.

[discrete]
=== What can I do to to improve performance?
=== What can I do to improve performance?

With the default setting of `use_significance` set to `true`, the Graph API
performs a background frequency check of the terms it discovers as part of
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@
"file-saver": "^1.3.8",
"form-data": "^4.0.0",
"formsy-react": "^1.1.5",
"geckodriver": "^1.21.2",
"geckodriver": "^1.22.2",
"glob-watcher": "5.0.3",
"graphql-code-generator": "^0.18.2",
"graphql-codegen-add": "^0.18.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,5 @@
* Side Public License, v 1.
*/

export default function (kbnServer, server) {
server.decorate('server', 'config', function () {
return kbnServer.config;
});
}
require('../src/setup_node_env');
require('../src/dev/chromium_version');
Loading

0 comments on commit 331c6f5

Please sign in to comment.