Skip to content

Commit

Permalink
Merge branch 'master' into watcher/migrate-legacy-es-client
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed Apr 29, 2021
2 parents 82b522e + 7eb733f commit 7ecbc00
Show file tree
Hide file tree
Showing 660 changed files with 13,009 additions and 6,996 deletions.
38 changes: 19 additions & 19 deletions api_docs/security_solution.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/security_solution/public/plugin.tsx",
"lineNumber": 353
"lineNumber": 346
}
},
{
Expand All @@ -221,15 +221,15 @@
"description": [],
"source": {
"path": "x-pack/plugins/security_solution/public/plugin.tsx",
"lineNumber": 353
"lineNumber": 346
}
}
],
"tags": [],
"returnComment": [],
"source": {
"path": "x-pack/plugins/security_solution/public/plugin.tsx",
"lineNumber": 353
"lineNumber": 346
}
},
{
Expand All @@ -245,7 +245,7 @@
"returnComment": [],
"source": {
"path": "x-pack/plugins/security_solution/public/plugin.tsx",
"lineNumber": 398
"lineNumber": 391
}
}
],
Expand Down Expand Up @@ -276,7 +276,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/security_solution/public/types.ts",
"lineNumber": 69
"lineNumber": 68
},
"signature": [
"() => Promise<",
Expand All @@ -287,7 +287,7 @@
],
"source": {
"path": "x-pack/plugins/security_solution/public/types.ts",
"lineNumber": 68
"lineNumber": 67
},
"lifecycle": "setup",
"initialIsOpen": true
Expand All @@ -301,7 +301,7 @@
"children": [],
"source": {
"path": "x-pack/plugins/security_solution/public/types.ts",
"lineNumber": 72
"lineNumber": 71
},
"lifecycle": "start",
"initialIsOpen": true
Expand Down Expand Up @@ -453,15 +453,15 @@
"description": [],
"source": {
"path": "x-pack/plugins/security_solution/server/plugin.ts",
"lineNumber": 147
"lineNumber": 145
}
}
],
"tags": [],
"returnComment": [],
"source": {
"path": "x-pack/plugins/security_solution/server/plugin.ts",
"lineNumber": 147
"lineNumber": 145
}
},
{
Expand Down Expand Up @@ -521,7 +521,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/security_solution/server/plugin.ts",
"lineNumber": 159
"lineNumber": 157
}
},
{
Expand All @@ -535,15 +535,15 @@
"description": [],
"source": {
"path": "x-pack/plugins/security_solution/server/plugin.ts",
"lineNumber": 159
"lineNumber": 157
}
}
],
"tags": [],
"returnComment": [],
"source": {
"path": "x-pack/plugins/security_solution/server/plugin.ts",
"lineNumber": 159
"lineNumber": 157
}
},
{
Expand Down Expand Up @@ -582,7 +582,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/security_solution/server/plugin.ts",
"lineNumber": 341
"lineNumber": 338
}
},
{
Expand All @@ -596,15 +596,15 @@
"description": [],
"source": {
"path": "x-pack/plugins/security_solution/server/plugin.ts",
"lineNumber": 341
"lineNumber": 338
}
}
],
"tags": [],
"returnComment": [],
"source": {
"path": "x-pack/plugins/security_solution/server/plugin.ts",
"lineNumber": 341
"lineNumber": 338
}
},
{
Expand All @@ -620,13 +620,13 @@
"returnComment": [],
"source": {
"path": "x-pack/plugins/security_solution/server/plugin.ts",
"lineNumber": 423
"lineNumber": 412
}
}
],
"source": {
"path": "x-pack/plugins/security_solution/server/plugin.ts",
"lineNumber": 131
"lineNumber": 129
},
"initialIsOpen": false
}
Expand Down Expand Up @@ -1484,7 +1484,7 @@
"children": [],
"source": {
"path": "x-pack/plugins/security_solution/server/plugin.ts",
"lineNumber": 107
"lineNumber": 105
},
"lifecycle": "setup",
"initialIsOpen": true
Expand All @@ -1498,7 +1498,7 @@
"children": [],
"source": {
"path": "x-pack/plugins/security_solution/server/plugin.ts",
"lineNumber": 110
"lineNumber": 108
},
"lifecycle": "start",
"initialIsOpen": true
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 @@ -338,7 +338,7 @@ Failure to have auth enabled in Kibana will make for a broken UI. UI-based error
|{kib-repo}blob/{branch}/x-pack/plugins/cases/README.md[cases]
|Experimental Feature
|Case management in Kibana
|{kib-repo}blob/{branch}/x-pack/plugins/cloud/README.md[cloud]
Expand Down
60 changes: 0 additions & 60 deletions docs/discover/context.asciidoc

This file was deleted.

Binary file modified docs/discover/images/discover-context-load-newer-documents.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/discover/images/expand-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions docs/discover/view-document.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[[discover-view-document]]
== View a document

Once you've found a document of interest in *Discover*, you have two more ways to
view it: in a view by itself or in context with surrounding documents.

[float]
[[discover-view-single-document]]
=== View a single document

Access a single document so you can bookmark it and share the link.

. In the document table, click the expand icon (>).
. In the expanded view, click **View single document**.
+
You can view the document in two ways. The **Table** view displays the document fields row-by-row.
The **JSON** (JavaScript Object Notation) view allows you to look at how {es} returns the document.
+
[role="screenshot"]
image::images/discover-view-single-document.png[Discover single document view]
+
The link is valid for the time the document is available in Elasticsearch. To create a customized view of the document,
you can create <<external-plugin-development, your own plugin>>.

[float]
[[discover-view-surrounding-documents]]
=== View surrounding documents

To inspect the documents that occurred immediately before and after a document,
your index pattern must contain time-based events.

. In the document table, click the expand icon (>).
. In the expanded view, click **View surrounding documents**.
+
Documents are displayed using the same set of columns as the *Discover* view from which
the context was opened. The anchor document is highlighted in blue.
+
[role="screenshot"]
image::images/discover-context.png[Image showing context view feature, with anchor documents highlighted in blue]
+
The filters you applied in *Discover* are carried over to the context view. Pinned
filters remain active, while normal filters are copied in a disabled state.
+
[role="screenshot"]
image::images/discover-context-filters-inactive.png[Filter in context view]

. To find the documents of interest, add filters.

. To increase the number of documents that surround the anchor document, click *Load*.
By default, five documents are added with each click.
+
[role="screenshot"]
image::images/discover-context-load-newer-documents.png[Load button and the number of documents to load]
. To configure the number of documents to display and
the number of documents to load with each button click, go to *Stack Management > Advanced Settings*
and edit the <<kibana-discover-settings, context settings>>.
5 changes: 5 additions & 0 deletions docs/redirects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,8 @@ This content has moved. refer to <<tutorial-secure-access-to-kibana>>.
== Search your data

This content has moved. refer to <<kuery-query>>.

[role="exclude",id="discover-document-context"]
== View surrounding documents

This content has moved. refer to <<discover-view-surrounding-documents>>.
6 changes: 3 additions & 3 deletions docs/user/discover.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ image:images/document-table-expanded.png[Table view with document expanded]
hover of its name for filters and other controls.

. To view documents that occurred before or after the event you are looking at, click
<<discover-document-context, View surrounding documents>>.
<<discover-view-surrounding-documents, View surrounding documents>>.

. For direct access to a particular document, click **View single document**.
. For direct access to a particular document, click **<<discover-view-single-document,View single document>>**.
+
You can bookmark this document and share the link.

Expand Down Expand Up @@ -243,7 +243,7 @@ the table columns that display by default, and more.

--

include::{kib-repo-dir}/discover/context.asciidoc[]
include::{kib-repo-dir}/discover/view-document.asciidoc[]

include::{kib-repo-dir}/discover/search-for-relevance.asciidoc[]

Expand Down
3 changes: 2 additions & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pageLoadAssetSize:
searchprofiler: 67080
security: 189428
securityOss: 30806
securitySolution: 235402
securitySolution: 187863
share: 99061
snapshotRestore: 79032
spaces: 387915
Expand Down Expand Up @@ -110,3 +110,4 @@ pageLoadAssetSize:
banners: 17946
mapsEms: 26072
timelines: 28613
cases: 162385
24 changes: 12 additions & 12 deletions rfcs/text/0013_saved_object_migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,25 +265,25 @@ Note:
3. If the clone operation fails because the target index already exist, ignore the error and wait for the target index to become green before proceeding.
4. (The `001` postfix in the target index name isn't used by Kibana, but allows for re-indexing an index should this be required by an Elasticsearch upgrade. E.g. re-index `.kibana_7.10.0_001` into `.kibana_7.10.0_002` and point the `.kibana_7.10.0` alias to `.kibana_7.10.0_002`.)
9. Transform documents by reading batches of outdated documents from the target index then transforming and updating them with optimistic concurrency control.
1. Ignore any version conflict errors.
2. If a document transform throws an exception, add the document to a failure list and continue trying to transform all other documents. If any failures occured, log the complete list of documents that failed to transform. Fail the migration.
1. Ignore any version conflict errors.
2. If a document transform throws an exception, add the document to a failure list and continue trying to transform all other documents. If any failures occured, log the complete list of documents that failed to transform. Fail the migration.
10. Update the mappings of the target index
1. Retrieve the existing mappings including the `migrationMappingPropertyHashes` metadata.
2. Update the mappings with `PUT /.kibana_7.10.0_001/_mapping`. The API deeply merges any updates so this won't remove the mappings of any plugins that are disabled on this instance but have been enabled on another instance that also migrated this index.
3. Ensure that fields are correctly indexed using the target index's latest mappings `POST /.kibana_7.10.0_001/_update_by_query?conflicts=proceed`. In the future we could optimize this query by only targeting documents:
1. Retrieve the existing mappings including the `migrationMappingPropertyHashes` metadata.
2. Update the mappings with `PUT /.kibana_7.10.0_001/_mapping`. The API deeply merges any updates so this won't remove the mappings of any plugins that are disabled on this instance but have been enabled on another instance that also migrated this index.
3. Ensure that fields are correctly indexed using the target index's latest mappings `POST /.kibana_7.10.0_001/_update_by_query?conflicts=proceed`. In the future we could optimize this query by only targeting documents:
1. That belong to a known saved object type.
11. Mark the migration as complete. This is done as a single atomic
operation (requires https://github.com/elastic/elasticsearch/pull/58100)
to guarantee that when multiple versions of Kibana are performing the
migration in parallel, only one version will win. E.g. if 7.11 and 7.12
are started in parallel and migrate from a 7.9 index, either 7.11 or 7.12
should succeed and accept writes, but not both.
1. Check that `.kibana` alias is still pointing to the source index
2. Point the `.kibana_7.10.0` and `.kibana` aliases to the target index.
3. Remove the temporary index `.kibana_7.10.0_reindex_temp`
4. If this fails with a "required alias [.kibana] does not exist" error or "index_not_found_exception" for the temporary index, fetch `.kibana` again:
1. If `.kibana` is _not_ pointing to our target index fail the migration.
2. If `.kibana` is pointing to our target index the migration has succeeded and we can proceed to step (12).
1. Check that `.kibana` alias is still pointing to the source index
2. Point the `.kibana_7.10.0` and `.kibana` aliases to the target index.
3. Remove the temporary index `.kibana_7.10.0_reindex_temp`
4. If this fails with a "required alias [.kibana] does not exist" error or "index_not_found_exception" for the temporary index, fetch `.kibana` again:
1. If `.kibana` is _not_ pointing to our target index fail the migration.
2. If `.kibana` is pointing to our target index the migration has succeeded and we can proceed to step (12).
12. Start serving traffic. All saved object reads/writes happen through the
version-specific alias `.kibana_7.10.0`.
Expand Down Expand Up @@ -821,4 +821,4 @@ to enumarate some scenarios and their worst case impact:
until we re-index. Is it sufficient to only re-index every major? How do we
track the field count as it grows over every upgrade?
2. More generally, how do we deal with the growing field count approaching the
default limit of 1000?
default limit of 1000?
3 changes: 2 additions & 1 deletion src/cli/serve/integration_tests/invalid_config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ interface LogEntry {
type: string;
}

describe('cli invalid config support', function () {
// FLAKY: https://github.com/elastic/kibana/issues/32240
describe.skip('cli invalid config support', function () {
it(
'exits with statusCode 64 and logs a single line when config is invalid',
function () {
Expand Down
Loading

0 comments on commit 7ecbc00

Please sign in to comment.