Skip to content

Commit

Permalink
Merge branch 'main' into sourcerer_kip_as
Browse files Browse the repository at this point in the history
  • Loading branch information
stephmilovic committed Nov 3, 2021
2 parents 7b13681 + d38f488 commit 8286a33
Show file tree
Hide file tree
Showing 809 changed files with 15,274 additions and 14,930 deletions.
4 changes: 2 additions & 2 deletions .bazelrc.common
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ test --experimental_guard_against_concurrent_changes
query --experimental_guard_against_concurrent_changes

## Cache action outputs on disk so they persist across output_base and bazel shutdown (eg. changing branches)
common --disk_cache=~/.bazel-cache/disk-cache
build --disk_cache=~/.bazel-cache/disk-cache

## Bazel repo cache settings
common --repository_cache=~/.bazel-cache/repository-cache
build --repository_cache=~/.bazel-cache/repository-cache

# Bazel will create symlinks from the workspace directory to output artifacts.
# Build results will be placed in a directory called "bazel-bin"
Expand Down
11 changes: 11 additions & 0 deletions .buildkite/pipelines/pull_request/fleet_cypress.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
steps:
- command: .buildkite/scripts/steps/functional/fleet_cypress.sh
label: 'Fleet Cypress Tests'
agents:
queue: ci-group-6
depends_on: build
timeout_in_minutes: 120
retry:
automatic:
- exit_status: '*'
limit: 1
10 changes: 10 additions & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ const uploadPipeline = (pipelineContent) => {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/apm_cypress.yml'));
}

if (
(await doAnyChangesMatch([
/^x-pack\/plugins\/fleet/,
/^x-pack\/test\/fleet_cypress/,
])) ||
process.env.GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/fleet_cypress.yml'));
}

if (await doAnyChangesMatch([/^x-pack\/plugins\/uptime/])) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/uptime.yml'));
}
Expand Down
20 changes: 20 additions & 0 deletions .buildkite/scripts/steps/functional/fleet_cypress.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/common/util.sh

.buildkite/scripts/bootstrap.sh
.buildkite/scripts/download_build_artifacts.sh

export JOB=kibana-fleet-cypress

echo "--- Fleet Cypress tests"

cd "$XPACK_DIR"

checks-reporter-with-killswitch "Fleet Cypress Tests" \
node scripts/functional_tests \
--debug --bail \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--config test/fleet_cypress/cli_config.ts
2 changes: 1 addition & 1 deletion .ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts

ARG NODE_VERSION=16.11.1
ARG NODE_VERSION=16.13.0

FROM node:${NODE_VERSION} AS base

Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
/src/core/ @elastic/kibana-core
/src/plugins/saved_objects_tagging_oss @elastic/kibana-core
/config/kibana.yml @elastic/kibana-core
/typings/ @elastic/kibana-core
/x-pack/plugins/banners/ @elastic/kibana-core
/x-pack/plugins/features/ @elastic/kibana-core
/x-pack/plugins/licensing/ @elastic/kibana-core
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,8 @@ report.asciidoc
/bazel
/bazel-*
.bazelrc.user

elastic-agent-*
fleet-server-*
elastic-agent.yml
fleet-server.yml
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.11.1
16.13.0
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.11.1
16.13.0
14 changes: 7 additions & 7 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ check_rules_nodejs_version(minimum_version_string = "3.8.0")
# we can update that rule.
node_repositories(
node_repositories = {
"16.11.1-darwin_amd64": ("node-v16.11.1-darwin-x64.tar.gz", "node-v16.11.1-darwin-x64", "ba54b8ed504bd934d03eb860fefe991419b4209824280d4274f6a911588b5e45"),
"16.11.1-darwin_arm64": ("node-v16.11.1-darwin-arm64.tar.gz", "node-v16.11.1-darwin-arm64", "5e772e478390fab3001b7148a923e4f22fca50170000f18b28475337d3a97248"),
"16.11.1-linux_arm64": ("node-v16.11.1-linux-arm64.tar.xz", "node-v16.11.1-linux-arm64", "083fc51f0ea26de9041aaf9821874651a9fd3b20d1cf57071ce6b523a0436f17"),
"16.11.1-linux_s390x": ("node-v16.11.1-linux-s390x.tar.xz", "node-v16.11.1-linux-s390x", "855b5c83c2ccb05273d50bb04376335c68d47df57f3187cdebe1f22b972d2825"),
"16.11.1-linux_amd64": ("node-v16.11.1-linux-x64.tar.xz", "node-v16.11.1-linux-x64", "493bcc9b660eff983a6de65a0f032eb2717f57207edf74c745bcb86e360310b3"),
"16.11.1-windows_amd64": ("node-v16.11.1-win-x64.zip", "node-v16.11.1-win-x64", "4d3c179b82d42e66e321c3948a4e332ed78592917a69d38b86e3a242d7e62fb7"),
"16.13.0-darwin_amd64": ("node-v16.13.0-darwin-x64.tar.gz", "node-v16.13.0-darwin-x64", "37e09a8cf2352f340d1204c6154058d81362fef4ec488b0197b2ce36b3f0367a"),
"16.13.0-darwin_arm64": ("node-v16.13.0-darwin-arm64.tar.gz", "node-v16.13.0-darwin-arm64", "46d83fc0bd971db5050ef1b15afc44a6665dee40bd6c1cbaec23e1b40fa49e6d"),
"16.13.0-linux_arm64": ("node-v16.13.0-linux-arm64.tar.xz", "node-v16.13.0-linux-arm64", "93a0d03f9f802353cb7052bc97a02cd9642b49fa985671cdc16c99936c86d7d2"),
"16.13.0-linux_s390x": ("node-v16.13.0-linux-s390x.tar.xz", "node-v16.13.0-linux-s390x", "49e972bf3e969d621157df4c8f2fa18ff748c167d5ebd0efc87e1b9f0c6541cc"),
"16.13.0-linux_amd64": ("node-v16.13.0-linux-x64.tar.xz", "node-v16.13.0-linux-x64", "a876ce787133149abd1696afa54b0b5bc5ce3d5ae359081d407ff776e39b7ba8"),
"16.13.0-windows_amd64": ("node-v16.13.0-win-x64.zip", "node-v16.13.0-win-x64", "5a39ec5d4786c2814a6c04488bebac6423c2aaa12832b24f0882456f2e4674e1"),
},
node_version = "16.11.1",
node_version = "16.13.0",
node_urls = [
"https://nodejs.org/dist/v{version}/{filename}",
],
Expand Down
12 changes: 1 addition & 11 deletions api_docs/fleet.json
Original file line number Diff line number Diff line change
Expand Up @@ -19696,16 +19696,6 @@
"path": "x-pack/plugins/fleet/common/constants/routes.ts",
"deprecated": false
},
{
"parentPluginId": "fleet",
"id": "def-common.AGENT_API_ROUTES.ENROLL_PATTERN",
"type": "string",
"tags": [],
"label": "ENROLL_PATTERN",
"description": [],
"path": "x-pack/plugins/fleet/common/constants/routes.ts",
"deprecated": false
},
{
"parentPluginId": "fleet",
"id": "def-common.AGENT_API_ROUTES.UNENROLL_PATTERN",
Expand Down Expand Up @@ -21889,4 +21879,4 @@
}
]
}
}
}
2 changes: 1 addition & 1 deletion docs/CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ The default values for the session timeout `xpack.security.session.{lifespan|idl
*Impact* +
Use the following default values:
* `xpack.security.session.idleTimeout: 1h`
* `xpack.security.session.idleTimeout: 8h`
* `xpack.security.session.lifespan: 30d`
====

Expand Down
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
[[index-patterns]]
=== Create an index pattern
[[data-views]]
=== Create a data view

{kib} requires an index pattern to access the {es} data that you want to explore.
An index pattern selects the data to use and allows you to define properties of the fields.
{kib} requires a data view to access the {es} data that you want to explore.
A data view selects the data to use and allows you to define properties of the fields.

An index pattern can point to one or more indices, {ref}/data-streams.html[data stream], or {ref}/alias.html[index aliases].
For example, an index pattern can point to your log data from yesterday,
A data view can point to one or more indices, {ref}/data-streams.html[data stream], or {ref}/alias.html[index aliases].
For example, a data view can point to your log data from yesterday,
or all indices that contain your data.

[float]
[[index-patterns-read-only-access]]
[[data-views-read-only-access]]
=== Required permissions

* Access to *Index Patterns* requires the <<xpack-kibana-role-management, {kib} privilege>>
`Index Pattern Management`.
* Access to *Data Views* requires the <<xpack-kibana-role-management, {kib} privilege>>
`Data View Management`.

* To create an index pattern, you must have the <<xpack-kibana-role-management,{es} privilege>>
* To create a data view, you must have the <<xpack-kibana-role-management,{es} privilege>>
`view_index_metadata`.

* If a read-only indicator appears in {kib}, you have insufficient privileges
to create or save index patterns. The buttons to create new index patterns or
save existing index patterns are not visible. For more information,
to create or save data views. The buttons to create new data views or
save existing data views are not visible. For more information,
refer to <<xpack-security-authorization,Granting access to {kib}>>.

[float]
[[settings-create-pattern]]
=== Create an index pattern
=== Create a data view

If you collected data using one of the {kib} <<connect-to-elasticsearch,ingest options>>,
uploaded a file, or added sample data,
you get an index pattern for free, and can start exploring your data.
If you loaded your own data, follow these steps to create an index pattern.
you get a data view for free, and can start exploring your data.
If you loaded your own data, follow these steps to create a data view.

. Open the main menu, then click to *Stack Management > Index Patterns*.
. Open the main menu, then click to *Stack Management > Data Views*.

. Click *Create data view*.

. Click *Create index pattern*.
+
[role="screenshot"]
image:management/index-patterns/images/create-index-pattern.png["Create index pattern"]
image:management/index-patterns/images/create-index-pattern.png["Create data view"]

. Start typing in the *Index pattern* field, and {kib} looks for the names of
. Start typing in the *name* field, and {kib} looks for the names of
indices, data streams, and aliases that match your input.
+
** To match multiple sources, use a wildcard (*). For example, `filebeat-*` matches
Expand All @@ -61,21 +61,21 @@ global time filters on your dashboards. This is useful if
you have multiple time fields and want to create dashboards that combine visualizations
based on different timestamps.

. Click *Create index pattern*.
. Click *Create data view*.
+
[[reload-fields]] {kib} is now configured to use your {es} data. When a new field is added to an index,
the index pattern field list is updated
the next time the index pattern is loaded, for example, when you load the page or
the data view field list is updated
the next time the data view is loaded, for example, when you load the page or
move between {kib} apps.

. Select this index pattern when you search and visualize your data.
. Select this data view when you search and visualize your data.

[float]
[[rollup-index-pattern]]
==== Create an index pattern for rolled up data
[[rollup-data-view]]
==== Create a data view for rolled up data

An index pattern can match one rollup index. For a combination rollup
index pattern with both raw and rolled up data, use the standard notation:
A data view can match one rollup index. For a combination rollup
data view with both raw and rolled up data, use the standard notation:

```ts
rollup_logstash,kibana_sample_data_logs
Expand All @@ -84,7 +84,7 @@ For an example, refer to <<rollup-data-tutorial,Create and visualize rolled up d

[float]
[[management-cross-cluster-search]]
==== Create an index pattern that searches across clusters
==== Create a data view that searches across clusters

If your {es} clusters are configured for {ref}/modules-cross-cluster-search.html[{ccs}],
you can create an index pattern to search across the clusters of your choosing. Use the
Expand Down Expand Up @@ -129,20 +129,20 @@ To exclude a cluster having a name starting with `cluster_`:
`cluster_*:logstash-*,cluster_one:-*`
```

Once you configure an index pattern to use the {ccs} syntax, all searches and
aggregations using that index pattern in {kib} take advantage of {ccs}.
Once you configure a data view to use the {ccs} syntax, all searches and
aggregations using that data view in {kib} take advantage of {ccs}.

[float]
[[delete-index-pattern]]
=== Delete index patterns
[[delete-data-view]]
=== Delete data views

When you delete an index pattern, you cannot recover the associated field formatters, runtime fields, source filters,
and field popularity data. Deleting an index pattern does not remove any indices or data documents from {es}.
When you delete a data view, you cannot recover the associated field formatters, runtime fields, source filters,
and field popularity data. Deleting a data view does not remove any indices or data documents from {es}.

WARNING: Deleting an index pattern breaks all visualizations, saved searches, and other saved objects that reference the index pattern.
WARNING: Deleting a data view breaks all visualizations, saved searches, and other saved objects that reference the data view.

. Open the main menu, then click *Stack Management > Index Patterns*.
. Open the main menu, then click *Stack Management > Data Views*.

. Click the index pattern to delete.
. Click the data view to delete.

. Delete (image:management/index-patterns/images/delete.png[Delete icon]) the index pattern.
. Delete (image:management/index-patterns/images/delete.png[Delete icon]) the data view.
16 changes: 8 additions & 8 deletions docs/concepts/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ Open the search bar using the keyboard shortcut Ctrl+/ on Windows and Linux, Com
image:concepts/images/global-search.png["Global search showing matches to apps and saved objects for the word visualize"]

[float]
=== Accessing data with index patterns
=== Accessing data with data views

{kib} requires an index pattern to tell it which {es} data you want to access,
and whether the data is time-based. An index pattern can point to one or more {es}
{kib} requires a data view to tell it which {es} data you want to access,
and whether the data is time-based. A data view can point to one or more {es}
data streams, indices, or index aliases by name.
For example, `logs-elasticsearch-prod-*` is an index pattern,
and it is time-based with a time field of `@timestamp`. The time field is not editable.

Index patterns are typically created by an administrator when sending data to {es}.
You can <<index-patterns,create or update index patterns>> in *Stack Management*, or by using a script
Data views are typically created by an administrator when sending data to {es}.
You can <<data-views,create or update data views>> in *Stack Management*, or by using a script
that accesses the {kib} API.

{kib} uses the index pattern to show you a list of fields, such as
{kib} uses the data view to show you a list of fields, such as
`event.duration`. You can customize the display name and format for each field.
For example, you can tell {kib} to display `event.duration` in seconds.
{kib} has <<managing-fields,field formatters>> for strings,
Expand Down Expand Up @@ -75,7 +75,7 @@ and can optionally contain the time filter and extra filters.
==== Time filter

The <<set-time-filter, global time filter>> limits the time range of data displayed.
In most cases, the time filter applies to the time field in the index pattern,
In most cases, the time filter applies to the time field in the data view,
but some apps allow you to use a different time field.

Using the time filter, you can configure a refresh rate to periodically
Expand Down Expand Up @@ -159,7 +159,7 @@ Use the global search to quickly open a saved object.
* Go to <<discover, Discover>> for instructions on searching your data.


include::index-patterns.asciidoc[]
include::data-views.asciidoc[]

include::set-time-filter.asciidoc[]

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/set-time-filter.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
=== Set the time range
Display data within a
specified time range when your index contains time-based events, and a time-field is configured for the
selected <<index-patterns, index pattern>>.
selected <<data-views, data view>>.
The default time range is 15 minutes, but you can customize
it in <<advanced-options,Advanced Settings>>.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<b>Signature:</b>

```typescript
export interface HttpResponse<TResponseBody = any>
export interface HttpResponse<TResponseBody = unknown>
```

## Properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
<b>Signature:</b>

```typescript
readonly body?: any;
readonly body?: TResponseBody;
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
<b>Signature:</b>

```typescript
export interface IHttpFetchError extends Error
export interface IHttpFetchError<TResponseBody = unknown> extends Error
```
## Properties
| Property | Type | Description |
| --- | --- | --- |
| [body](./kibana-plugin-core-public.ihttpfetcherror.body.md) | <code>any</code> | |
| [body](./kibana-plugin-core-public.ihttpfetcherror.body.md) | <code>TResponseBody</code> | |
| [name](./kibana-plugin-core-public.ihttpfetcherror.name.md) | <code>string</code> | |
| [req](./kibana-plugin-core-public.ihttpfetcherror.req.md) | <code>Request</code> | |
| [request](./kibana-plugin-core-public.ihttpfetcherror.request.md) | <code>Request</code> | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Properties that can be returned by HttpInterceptor.request to override the respo
<b>Signature:</b>

```typescript
export interface IHttpResponseInterceptorOverrides<TResponseBody = any>
export interface IHttpResponseInterceptorOverrides<TResponseBody = unknown>
```

## Properties
Expand Down
1 change: 1 addition & 0 deletions docs/development/core/public/kibana-plugin-core-public.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [Plugin](./kibana-plugin-core-public.plugin.md) | The interface that should be returned by a <code>PluginInitializer</code>. |
| [PluginInitializerContext](./kibana-plugin-core-public.plugininitializercontext.md) | The available core services passed to a <code>PluginInitializer</code> |
| [ResolvedSimpleSavedObject](./kibana-plugin-core-public.resolvedsimplesavedobject.md) | This interface is a very simple wrapper for SavedObjects resolved from the server with the [SavedObjectsClient](./kibana-plugin-core-public.savedobjectsclient.md)<!-- -->. |
| [ResponseErrorBody](./kibana-plugin-core-public.responseerrorbody.md) | |
| [SavedObject](./kibana-plugin-core-public.savedobject.md) | |
| [SavedObjectAttributes](./kibana-plugin-core-public.savedobjectattributes.md) | The data for a Saved Object is stored as an object in the <code>attributes</code> property. |
| [SavedObjectError](./kibana-plugin-core-public.savedobjecterror.md) | |
Expand Down
Loading

0 comments on commit 8286a33

Please sign in to comment.