Skip to content

Commit

Permalink
Merge branch 'master' into 64634-tight-policy-permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Fernández Gómez committed Apr 13, 2021
2 parents e7053c4 + 3a7155e commit 2696b90
Show file tree
Hide file tree
Showing 397 changed files with 9,454 additions and 5,533 deletions.
14 changes: 9 additions & 5 deletions .bazelrc.common
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
build --experimental_guard_against_concurrent_changes
run --experimental_guard_against_concurrent_changes
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)
build --disk_cache=~/.bazel-cache/disk-cache
common --disk_cache=~/.bazel-cache/disk-cache

## Bazel repo cache settings
build --repository_cache=~/.bazel-cache/repository-cache
common --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 All @@ -35,13 +36,16 @@ build --experimental_inprocess_symlink_creation
# Incompatible flags to run with
build --incompatible_no_implicit_file_export
build --incompatible_restrict_string_escapes
query --incompatible_no_implicit_file_export
query --incompatible_restrict_string_escapes

# Log configs
## different from default
common --color=yes
build --show_task_finish
build --noshow_progress
common --noshow_progress
common --show_task_finish
build --noshow_loading_progress
query --noshow_loading_progress
build --show_result=0

# Specifies desired output mode for running tests.
Expand Down Expand Up @@ -82,7 +86,7 @@ test:debug --test_output=streamed --test_strategy=exclusive --test_timeout=9999
run:debug --define=VERBOSE_LOGS=1 -- --node_options=--inspect-brk
# The following option will change the build output of certain rules such as terser and may not be desirable in all cases
# It will also output both the repo cache and action cache to a folder inside the repo
build:debug --compilation_mode=dbg --show_result=1
build:debug --compilation_mode=dbg --show_result=0 --noshow_loading_progress --noshow_progress --show_task_finish

# Turn off legacy external runfiles
# This prevents accidentally depending on this feature, which Bazel will remove.
Expand Down
3 changes: 0 additions & 3 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ node_repositories(
# NOTE: FORCE_COLOR env var forces colors on non tty mode
yarn_install(
name = "npm",
environment = {
"FORCE_COLOR": "True",
},
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
data = [
Expand Down
5 changes: 4 additions & 1 deletion docs/developer/getting-started/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ yarn kbn bootstrap --force-install

(You can also run `yarn kbn` to see the other available commands. For
more info about this tool, see
{kib-repo}tree/{branch}/packages/kbn-pm[{kib-repo}tree/{branch}/packages/kbn-pm].)
{kib-repo}tree/{branch}/packages/kbn-pm[{kib-repo}tree/{branch}/packages/kbn-pm]. If you want more
information about how to actively develop over packages please read <<monorepo-packages>>)

When switching branches which use different versions of npm packages you
may need to run:
Expand Down Expand Up @@ -169,3 +170,5 @@ include::debugging.asciidoc[leveloffset=+1]
include::building-kibana.asciidoc[leveloffset=+1]

include::development-plugin-resources.asciidoc[leveloffset=+1]

include::monorepo-packages.asciidoc[leveloffset=+1]
66 changes: 66 additions & 0 deletions docs/developer/getting-started/monorepo-packages.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[[monorepo-packages]]
== {kib} Monorepo Packages

Currently {kib} works as a monorepo composed by a core, plugins and packages.
The latest are located in a folder called `packages` and are pieces of software that
composes a set of features that can be isolated and reused across the entire repository.
They are also supposed to be able to imported just like any other `node_module`.

Previously we relied solely on `@kbn/pm` to manage the development tools of those packages, but we are
now in the middle of migrating those responsibilities into Bazel. Every package already migrated
will contain in its root folder a `BUILD.bazel` file and other `build` and `watching` strategies should be used.

Remember that any time you need to make sure the monorepo is ready to be used just run:

[source,bash]
----
yarn kbn bootstrap
----

[discrete]
=== Building Non Bazel Packages

Non Bazel packages can be built independently with

[source,bash]
----
yarn kbn run build -i PACKAGE_NAME
----

[discrete]
=== Watching Non Bazel Packages

Non Bazel packages can be watched independently with

[source,bash]
----
yarn kbn watch -i PACKAGE_NAME
----

[discrete]
=== Building Bazel Packages

Bazel packages are built as a whole for now. You can use:

[source,bash]
----
yarn kbn build-bazel
----

[discrete]
=== Watching Bazel Packages

Bazel packages are watched as a whole for now. You can use:

[source,bash]
----
yarn kbn watch-bazel
----


[discrete]
=== List of Already Migrated Packages to Bazel

- @elastic/datemath


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-plugins-embeddable-server](./kibana-plugin-plugins-embeddable-server.md) &gt; [EmbeddableStart](./kibana-plugin-plugins-embeddable-server.embeddablestart.md)

## EmbeddableStart type

<b>Signature:</b>

```typescript
export declare type EmbeddableStart = PersistableStateService<EmbeddableStateWithType>;
```
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@
| --- | --- |
| [plugin](./kibana-plugin-plugins-embeddable-server.plugin.md) | |

## Type Aliases

| Type Alias | Description |
| --- | --- |
| [EmbeddableStart](./kibana-plugin-plugins-embeddable-server.embeddablestart.md) | |

5 changes: 5 additions & 0 deletions docs/management/index-patterns.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ pattern:
*:logstash-*
```

You can use exclusions to exclude indices that might contain mapping errors.
To match indices starting with `logstash-`, and exclude those starting with `logstash-old` from
all clusters having a name starting with `cluster_`, you can use `cluster_*:logstash-*,cluster*:logstash-old*`.
To exclude a cluster, use `cluster_*:logstash-*,cluster_one:-*`.

Once an index pattern is configured using the {ccs} syntax, all searches and
aggregations using that index pattern in {kib} take advantage of {ccs}.

Expand Down
11 changes: 11 additions & 0 deletions docs/settings/dev-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,14 @@ They are enabled by default.
| Set to `true` to enable the <<xpack-profiler,{searchprofiler}>>. Defaults to `true`.

|===

[float]
[[painless_lab-settings]]
==== Painless Lab settings

[cols="2*<"]
|===
| `xpack.painless_lab.enabled`
| When set to `true`, enables the <<painlesslab, Painless Lab>>. Defaults to `true`.

|===
28 changes: 23 additions & 5 deletions docs/settings/search-sessions-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,33 @@ Configure the search session settings in your `kibana.yml` configuration file.
[cols="2*<"]
|===
a| `xpack.data_enhanced.`
`search.sessions.enabled`
`search.sessions.enabled` {ess-icon}
| Set to `true` (default) to enable search sessions.

a| `xpack.data_enhanced.`
`search.sessions.trackingInterval`
| The frequency for updating the state of a search session. The default is 10s.
`search.sessions.trackingInterval` {ess-icon}
| The frequency for updating the state of a search session. The default is `10s`.

a| `xpack.data_enhanced.`
`search.sessions.defaultExpiration`
`search.sessions.pageSize` {ess-icon}
| How many search sessions {kib} processes at once while monitoring
session progress. The default is `100`.

a| `xpack.data_enhanced.`
`search.sessions.notTouchedTimeout` {ess-icon}
| How long {kib} stores search results from unsaved sessions,
after the last search in the session completes. The default is `5m`.

a| `xpack.data_enhanced.`
`search.sessions.notTouchedInProgressTimeout` {ess-icon}
| How long a search session can run after a user navigates away without saving a session. The default is `1m`.

a| `xpack.data_enhanced.`
`search.sessions.maxUpdateRetries` {ess-icon}
| How many retries {kib} can perform while attempting to save a search session. The default is `3`.

a| `xpack.data_enhanced.`
`search.sessions.defaultExpiration` {ess-icon}
| How long search session results are stored before they are deleted.
Extending a search session resets the expiration by the same value. The default is 7d.
Extending a search session resets the expiration by the same value. The default is `7d`.
|===
4 changes: 2 additions & 2 deletions docs/user/alerting/defining-rules.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Name:: The name of the rule. While this name does not have to be unique, th
Tags:: A list of tag names that can be applied to a rule. Tags can help you organize and find rules, because tags appear in the rule listing in the management UI which is searchable by tag.
Check every:: This value determines how frequently the rule conditions below are checked. Note that the timing of background rule checks are not guaranteed, particularly for intervals of less than 10 seconds. See <<alerting-production-considerations, Alerting production considerations>> for more information.
Notify:: This value limits how often actions are repeated when an alert remains active across rule checks. See <<alerting-concepts-suppressing-duplicate-notifications>> for more information. +
- **Only on status change**: Actions are not repeated when an alert remains active across checks. Actions run only when the rule status changes.
- **Every time rule is active**: Actions are repeated when an alert remains active across checks.
- **Only on status change**: Actions are not repeated when an alert remains active across checks. Actions run only when the alert status changes.
- **Every time alert is active**: Actions are repeated when an alert remains active across checks.
- **On a custom action interval**: Actions are suppressed for the throttle interval, but repeat when an alert remains active across checks for a duration longer than the throttle interval.


Expand Down
2 changes: 1 addition & 1 deletion docs/user/monitoring/kibana-alerts.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ by running checks on a schedule time of 1 minute with a re-notify interval of 6
This alert is triggered if a large (primary) shard size is found on any of the
specified index patterns. The trigger condition is met if an index's shard size is
55gb or higher in the last 5 minutes. The alert is grouped across all indices that match
the default patter of `*` by running checks on a schedule time of 1 minute with a re-notify
the default pattern of `*` by running checks on a schedule time of 1 minute with a re-notify
interval of 12 hours.

[discrete]
Expand Down
4 changes: 3 additions & 1 deletion examples/dashboard_embeddable_examples/public/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ const Nav = withRouter(({ history, pages }: NavProps) => {

interface Props {
basename: string;
DashboardContainerByValueRenderer: DashboardStart['DashboardContainerByValueRenderer'];
DashboardContainerByValueRenderer: ReturnType<
DashboardStart['getDashboardContainerByValueRenderer']
>;
}

const DashboardEmbeddableExplorerApp = ({ basename, DashboardContainerByValueRenderer }: Props) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ const initialInput: DashboardContainerInput = {
export const DashboardEmbeddableByValue = ({
DashboardContainerByValueRenderer,
}: {
DashboardContainerByValueRenderer: DashboardStart['DashboardContainerByValueRenderer'];
DashboardContainerByValueRenderer: ReturnType<
DashboardStart['getDashboardContainerByValueRenderer']
>;
}) => {
const [input, setInput] = useState(initialInput);

Expand Down
3 changes: 1 addition & 2 deletions examples/dashboard_embeddable_examples/public/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export class DashboardEmbeddableExamples implements Plugin<void, void, {}, Start
return renderApp(
{
basename: params.appBasePath,
DashboardContainerByValueRenderer:
depsStart.dashboard.DashboardContainerByValueRenderer,
DashboardContainerByValueRenderer: depsStart.dashboard.getDashboardContainerByValueRenderer(),
},
params.element
);
Expand Down
1 change: 1 addition & 0 deletions packages/elastic-datemath/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ ts_config(

ts_project(
name = "tsc",
args = ['--pretty'],
srcs = SRCS,
deps = DEPS,
declaration = True,
Expand Down
Loading

0 comments on commit 2696b90

Please sign in to comment.