Skip to content

Commit

Permalink
Merge master into feature-ingest
Browse files Browse the repository at this point in the history
This only contains a few commits but was not a straightforward merge. I initially got a warning about too many renames and suggesting I increase `merge.renameLimit`

There were also ~100 files with merge conflicts. In general, I accepted incoming changes but I did go through each file and try to make sure what was being staged was desired.

I started by clearing the conficts in both `package.json`s (new react-router version) then ran `yarn kbn bootstrap` and went back to merging.

There were some files like i18n.json and security where accepting incoming would have erased a fleet/ingest/epm setting so I chose both there.

There were aslso some *really* weird merge conflict markers in some files. Things I've not seent before. Roughly:

```
<<<<<<< HEAD path/to/file/we/are/viewing
code
=======
entirely different code
>>>>>>> 802423d:path/to/VERY/different/place
```

In those cases, I opened the file on master in github to check the correct code and either took the code between the markers or copied/pasted from GitHub. Many of them were from this specific SHA.

I also updated these files based on the changes in elastic#52445

x-pack/legacy/plugins/fleet/public/components/navigation/connected_link.tsx
x-pack/legacy/plugins/fleet/public/components/navigation/connected_link.tsx
x-pack/legacy/plugins/fleet/public/hooks/with_url_state.tsx
  • Loading branch information
John Schulz committed Dec 12, 2019
1 parent 9b0ba9b commit a12484b
Show file tree
Hide file tree
Showing 343 changed files with 8,262 additions and 6,847 deletions.
6 changes: 0 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,6 @@ module.exports = {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/plugins/eui_utils/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['src/plugins/kibana_react/**/*.{js,ts,tsx}'],
rules: {
Expand Down
19 changes: 19 additions & 0 deletions docs/apm/troubleshooting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,22 @@ Finally, this problem can also occur if you've changed the index name that you w
The default index pattern can be found {apm-server-ref}/elasticsearch-output.html#index-option-es[here].
If you change this setting, you must also configure the `setup.template.name` and `setup.template.pattern` options.
See {apm-server-ref}/configuration-template.html[Load the Elasticsearch index template].

==== Unknown route

The {apm-app-ref}/transactions.html[transaction overview] will only display helpful information
when the transactions in your services are named correctly.
If you're seeing "GET unknown route" or "unknown route" in the APM app,
it could be a sign that something isn't working like it should.

Elastic APM Agents come with built-in support for popular frameworks out-of-the-box.
This means, among other things, that the Agent will try to automatically name HTTP requests.
As an example, the Node.js Agent uses the route that handled the request, while the Java Agent uses the Servlet name.

"Unknown route" indicates that the Agent can't determine what to name the request,
perhaps because the technology you're using isn't supported, the Agent has been installed incorrectly,
or because something is happening to the request that the Agent doesn't understand.

To resolve this, you'll need to head over to the relevant {apm-agents-ref}[Agent documentation].
Specifically, view the Agent's supported technologies page.
You can also use the Agent's public API to manually set a name for the transaction.
1 change: 1 addition & 0 deletions docs/development/core/server/kibana-plugin-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,5 +197,6 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [SavedObjectsClientContract](./kibana-plugin-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-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.<!-- -->\#\#\# 503s from missing index<!-- -->Unlike all other methods, create requests are supposed to succeed even when the Kibana index does not exist because it will be automatically created by elasticsearch. When that is not the case it is because Elasticsearch's <code>action.auto_create_index</code> setting prevents it from being created automatically so we throw a special 503 with the intention of informing the user that their Elasticsearch settings need to be updated.<!-- -->See [SavedObjectsClient](./kibana-plugin-server.savedobjectsclient.md) See [SavedObjectsErrorHelpers](./kibana-plugin-server.savedobjectserrorhelpers.md) |
| [SavedObjectsClientFactory](./kibana-plugin-server.savedobjectsclientfactory.md) | Describes the factory used to create instances of the Saved Objects Client. |
| [SavedObjectsClientWrapperFactory](./kibana-plugin-server.savedobjectsclientwrapperfactory.md) | Describes the factory used to create instances of Saved Objects Client Wrappers. |
| [SharedGlobalConfig](./kibana-plugin-server.sharedglobalconfig.md) | |
| [UiSettingsType](./kibana-plugin-server.uisettingstype.md) | UI element type to represent the settings. |

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

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [SharedGlobalConfig](./kibana-plugin-server.sharedglobalconfig.md)

## SharedGlobalConfig type


<b>Signature:</b>

```typescript
export declare type SharedGlobalConfig = RecursiveReadonly<{
kibana: Pick<KibanaConfigType, typeof SharedGlobalConfigKeys.kibana[number]>;
elasticsearch: Pick<ElasticsearchConfigType, typeof SharedGlobalConfigKeys.elasticsearch[number]>;
path: Pick<PathConfigType, typeof SharedGlobalConfigKeys.path[number]>;
}>;
```
Binary file added docs/images/kibana-status-page-7_5_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/kibana-status-page.png
Binary file not shown.
Binary file added docs/maps/images/top_hits.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 0 additions & 5 deletions docs/maps/indexing-geojson-data-tutorial.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@ aggregation.
The remaining default settings are good, but there are a couple of
settings that you might want to change.

. Under *Source settings* > *Grid resolution*, select from the different heat map resolutions.
+
The default "Coarse" looks
good, but feel free to select a different resolution.

. Play around with the *Layer Style* >
*Color range* setting.
+
Expand Down
15 changes: 10 additions & 5 deletions docs/maps/maps-aggregations.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,23 @@ The point location is the weighted centroid for all geo-points in the gridded ce

[role="xpack"]
[[maps-top-hits-aggregation]]
=== Most recent entities
=== Top hits per entity

Most recent entities uses {es} {ref}/search-aggregations-bucket-terms-aggregation.html[terms aggregation] to group your documents by entity.
Then, {ref}/search-aggregations-metrics-top-hits-aggregation.html[top hits metric aggregation] accumulates the most recent documents for each entry.
You can display the most relevant documents per entity, for example, the most recent GPS tracks per flight.
To get this data, {es} first groups your data using a {ref}/search-aggregations-bucket-terms-aggregation.html[terms aggregation],
then accumulates the most relevant documents based on sort order for each entry using a {ref}/search-aggregations-metrics-top-hits-aggregation.html[top hits metric aggregation].

Most recent entities is available for <<vector-layer, vector layers>> with *Documents* source.
To enable most recent entities, click "Show most recent documents by entity" and configure the following:
Top hits per entity is available for <<vector-layer, vector layers>> with *Documents* source.
To enable top hits:

. In *Sorting*, select the *Show documents per entity* checkbox.
. Set *Entity* to the field that identifies entities in your documents.
This field will be used in the terms aggregation to group your documents into entity buckets.
. Set *Documents per entity* to configure the maximum number of documents accumulated per entity.

[role="screenshot"]
image::maps/images/top_hits.png[]

[role="xpack"]
[[point-to-point]]
=== Point to point
Expand Down
2 changes: 1 addition & 1 deletion docs/maps/search.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ The most common cause for empty layers are searches for a field that exists in o

You can prevent the search bar from applying search context to a layer by configuring the following:

* In *Source settings*, clear the *Apply global filter to source* checkbox to turn off the global search context for the layer source.
* In *Filtering*, clear the *Apply global filter to layer data* checkbox to turn off the global search context for the layer source.

* In *Term joins*, clear the *Apply global filter to join* checkbox to turn off the global search context for the <<terms-join, term join>>.

Expand Down
9 changes: 5 additions & 4 deletions docs/setup/access.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
== Accessing Kibana

Kibana is a web application that you access through port 5601. All you need to do is point your web browser at the
machine where Kibana is running and specify the port number. For example, `localhost:5601` or
`http://YOURDOMAIN.com:5601`.
machine where Kibana is running and specify the port number. For example, `localhost:5601` or `http://YOURDOMAIN.com:5601`.
If you want to allow remote users to connect, set the parameter `server.host` in `kibana.yml` to a non-loopback address.

When you access Kibana, the <<discover,Discover>> page loads by default with the default index pattern selected. The
time filter is set to the last 15 minutes and the search query is set to match-all (\*).
Expand All @@ -15,9 +15,10 @@ If you still don't see any results, it's possible that you don't *have* any docu
[[status]]
=== Checking Kibana Status

You can reach the Kibana server's status page by navigating to `localhost:5601/status`. The status page displays
You can reach the Kibana server's status page by navigating to the status endpoint, for example, `localhost:5601/status`. The status page displays
information about the server's resource usage and lists the installed plugins.

image::images/kibana-status-page.png[]
[role="screenshot"]
image::images/kibana-status-page-7_5_0.png[]

NOTE: For JSON-formatted server status details, use the API endpoint at `localhost:5601/api/status`
34 changes: 16 additions & 18 deletions docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ if you installed {kib} from an archive distribution (`.tar.gz` or `.zip`), by
default it is in `$KIBANA_HOME/config`. By default, with package distributions
(Debian or RPM), it is in `/etc/kibana`.

The default settings configure Kibana to run on `localhost:5601`. To change the
host or port number, or connect to Elasticsearch running on a different machine,
you'll need to update your `kibana.yml` file. You can also enable SSL and set a
The default host and port settings configure {kib} to run on `localhost:5601`. To change this behavior and allow remote users to connect, you'll need to update your `kibana.yml` file. You can also enable SSL and set a
variety of other options. Finally, environment variables can be injected into
configuration using `${MY_ENV_VAR}` syntax.

Expand All @@ -32,7 +30,7 @@ strongly recommend that you keep the default CSP rules that ship with Kibana.

`csp.strict:`:: *Default: `true`* Blocks access to Kibana to any browser that
does not enforce even rudimentary CSP rules. In practice, this will disable
support for older, less safe browsers like Internet Explorer.
support for older, less safe browsers like Internet Explorer.
See <<csp-strict-mode, Content Security Policy>> for more information.

`csp.warnLegacyBrowsers:`:: *Default: `true`* Shows a warning message after
Expand Down Expand Up @@ -65,7 +63,7 @@ connects to this Kibana instance.
`elasticsearch.requestHeadersWhitelist:`:: *Default: `[ 'authorization' ]`* List
of Kibana client-side headers to send to Elasticsearch. To send *no* client-side
headers, set this value to [] (an empty list).
Removing the `authorization` header from being whitelisted means that you cannot
Removing the `authorization` header from being whitelisted means that you cannot
use <<basic-authentication, basic authentication>> in Kibana.

`elasticsearch.requestTimeout:`:: *Default: 30000* Time in milliseconds to wait
Expand Down Expand Up @@ -164,19 +162,19 @@ The following example shows a valid logging rotate configuration:
enable log rotation. If you do not have a `logging.dest` set that is different from `stdout`
that feature would not take any effect.

`logging.rotate.everyBytes:`:: [experimental] *Default: 10485760* The maximum size of a log file (that is `not an exact` limit). After the
`logging.rotate.everyBytes:`:: [experimental] *Default: 10485760* The maximum size of a log file (that is `not an exact` limit). After the
limit is reached, a new log file is generated. The default size limit is 10485760 (10 MB) and
this option should be at least greater than 1024.

`logging.rotate.keepFiles:`:: [experimental] *Default: 7* The number of most recent rotated log files to keep
on disk. Older files are deleted during log rotation. The default value is 7. The `logging.rotate.keepFiles`
`logging.rotate.keepFiles:`:: [experimental] *Default: 7* The number of most recent rotated log files to keep
on disk. Older files are deleted during log rotation. The default value is 7. The `logging.rotate.keepFiles`
option has to be in the range of 2 to 1024 files.

`logging.rotate.pollingInterval:`:: [experimental] *Default: 10000* The number of milliseconds for the polling strategy in case
`logging.rotate.pollingInterval:`:: [experimental] *Default: 10000* The number of milliseconds for the polling strategy in case
the `logging.rotate.usePolling` is enabled. That option has to be in the range of 5000 to 3600000 milliseconds.

`logging.rotate.usePolling:`:: [experimental] *Default: false* By default we try to understand the best way to monitoring
the log file. However, there is some systems where it could not be always accurate. In those cases, if needed,
`logging.rotate.usePolling:`:: [experimental] *Default: false* By default we try to understand the best way to monitoring
the log file. However, there is some systems where it could not be always accurate. In those cases, if needed,
the `polling` method could be used enabling that option.

`logging.silent:`:: *Default: false* Set the value of this setting to `true` to
Expand Down Expand Up @@ -304,7 +302,7 @@ This setting may not be used when `server.compression.enabled` is set to `false`
send on all responses to the client from the Kibana server.

`server.host:`:: *Default: "localhost"* This setting specifies the host of the
back end server.
back end server. To allow remote users to connect, set the value to the IP address or DNS name of the {kib} server.

`server.keepaliveTimeout:`:: *Default: "120000"* The number of milliseconds to wait for additional data before restarting
the `server.socketTimeout` counter.
Expand Down Expand Up @@ -358,15 +356,15 @@ supported protocols with versions. Valid protocols: `TLSv1`, `TLSv1.1`, `TLSv1.2
setting this to `true` enables unauthenticated users to access the Kibana
server status API and status page.

`telemetry.allowChangingOptInStatus`:: *Default: true*. If `true`,
users are able to change the telemetry setting at a later time in
<<advanced-options, Advanced Settings>>. If `false`,
{kib} looks at the value of `telemetry.optIn` to determine whether to send
`telemetry.allowChangingOptInStatus`:: *Default: true*. If `true`,
users are able to change the telemetry setting at a later time in
<<advanced-options, Advanced Settings>>. If `false`,
{kib} looks at the value of `telemetry.optIn` to determine whether to send
telemetry data or not. `telemetry.allowChangingOptInStatus` and `telemetry.optIn`
cannot be `false` at the same time.

`telemetry.optIn`:: *Default: true* If `true`, telemetry data is sent to Elastic.
If `false`, collection of telemetry data is disabled.
`telemetry.optIn`:: *Default: true* If `true`, telemetry data is sent to Elastic.
If `false`, collection of telemetry data is disabled.
To enable telemetry and prevent users from disabling it,
set `telemetry.allowChangingOptInStatus` to `false` and `telemetry.optIn` to `true`.

Expand Down
2 changes: 1 addition & 1 deletion docs/user/security/authentication/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ required by {kib}. If you want to use Third Party initiated SSO , then you must
+
[source,yaml]
--------------------------------------------------------------------------------
server.xsrf.whitelist: [/api/security/v1/oidc]
server.xsrf.whitelist: [/api/security/oidc/initiate_login]
--------------------------------------------------------------------------------

[float]
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"resolutions": {
"**/@types/node": "10.12.27",
"**/@types/react": "^16.9.13",
"**/@types/react-router": "^5.1.3",
"**/@types/hapi": "^17.0.18",
"**/@types/angular": "^1.6.56",
"**/typescript": "3.7.2",
Expand Down Expand Up @@ -233,7 +234,7 @@
"react-monaco-editor": "~0.27.0",
"react-redux": "^5.1.2",
"react-resize-detector": "^4.2.0",
"react-router-dom": "^4.3.1",
"react-router-dom": "^5.1.2",
"react-sizeme": "^2.3.6",
"react-use": "^13.10.2",
"reactcss": "1.2.3",
Expand Down Expand Up @@ -347,7 +348,8 @@
"@types/react-dom": "^16.9.4",
"@types/react-redux": "^6.0.6",
"@types/react-resize-detector": "^4.0.1",
"@types/react-router-dom": "^4.3.1",
"@types/react-router": "^5.1.3",
"@types/react-router-dom": "^5.1.3",
"@types/react-virtualized": "^9.18.7",
"@types/redux": "^3.6.31",
"@types/redux-actions": "^2.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"kbn:watch": "node scripts/build --source-maps --watch"
},
"devDependencies": {
"@babel/cli": "7.5.5",
"@babel/cli": "^7.5.5",
"@kbn/dev-utils": "1.0.0",
"@kbn/babel-preset": "1.0.0",
"typescript": "3.7.2"
Expand Down
12 changes: 11 additions & 1 deletion packages/kbn-test/src/functional_test_runner/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ export function runFtrCli() {
}
);

if (flags.throttle) {
process.env.TEST_THROTTLE_NETWORK = '1';
}

if (flags.headless) {
process.env.TEST_BROWSER_HEADLESS = '1';
}

let teardownRun = false;
const teardown = async (err?: Error) => {
if (teardownRun) return;
Expand Down Expand Up @@ -97,7 +105,7 @@ export function runFtrCli() {
{
flags: {
string: ['config', 'grep', 'exclude', 'include-tag', 'exclude-tag', 'kibana-install-dir'],
boolean: ['bail', 'invert', 'test-stats', 'updateBaselines'],
boolean: ['bail', 'invert', 'test-stats', 'updateBaselines', 'throttle', 'headless'],
default: {
config: 'test/functional/config.js',
debug: true,
Expand All @@ -113,6 +121,8 @@ export function runFtrCli() {
--test-stats print the number of tests (included and excluded) to STDERR
--updateBaselines replace baseline screenshots with whatever is generated from the test
--kibana-install-dir directory where the Kibana install being tested resides
--throttle enable network throttling in Chrome browser
--headless run browser in headless mode
`,
},
}
Expand Down
16 changes: 16 additions & 0 deletions packages/kbn-test/src/functional_tests/cli/run_tests/cli.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,22 @@ describe('run tests CLI', () => {
expect(exitMock).not.toHaveBeenCalled();
});

it('accepts network throttle option', async () => {
global.process.argv.push('--throttle');

await runTestsCli(['foo']);

expect(exitMock).toHaveBeenCalledWith(1);
});

it('accepts headless option', async () => {
global.process.argv.push('--headless');

await runTestsCli(['foo']);

expect(exitMock).toHaveBeenCalledWith(1);
});

it('accepts extra server options', async () => {
global.process.argv.push('--', '--server.foo=bar');

Expand Down
1 change: 1 addition & 0 deletions src/core/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export {
PluginInitializerContext,
PluginManifest,
PluginName,
SharedGlobalConfig,
} from './plugins';

export {
Expand Down
3 changes: 3 additions & 0 deletions src/core/server/plugins/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ export const SharedGlobalConfigKeys = {
path: ['data'] as const,
};

/**
* @public
*/
export type SharedGlobalConfig = RecursiveReadonly<{
kibana: Pick<KibanaConfigType, typeof SharedGlobalConfigKeys.kibana[number]>;
elasticsearch: Pick<ElasticsearchConfigType, typeof SharedGlobalConfigKeys.elasticsearch[number]>;
Expand Down
Loading

0 comments on commit a12484b

Please sign in to comment.