Skip to content

Commit

Permalink
Merge branch 'main' into vis/filter_y_axes
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed Nov 4, 2021
2 parents 862d3b0 + 371a1ff commit 51c9b6c
Show file tree
Hide file tree
Showing 951 changed files with 7,707 additions and 6,651 deletions.
7 changes: 7 additions & 0 deletions .buildkite/pipelines/hourly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ steps:
key: linting
timeout_in_minutes: 90

- command: .buildkite/scripts/steps/lint_with_types.sh
label: 'Linting (with types)'
agents:
queue: c2-16
key: linting_with_types
timeout_in_minutes: 90

- command: .buildkite/scripts/steps/checks.sh
label: 'Checks'
agents:
Expand Down
7 changes: 7 additions & 0 deletions .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ steps:
key: linting
timeout_in_minutes: 90

- command: .buildkite/scripts/steps/lint_with_types.sh
label: 'Linting (with types)'
agents:
queue: c2-16
key: linting_with_types
timeout_in_minutes: 90

- command: .buildkite/scripts/steps/checks.sh
label: 'Checks'
agents:
Expand Down
12 changes: 12 additions & 0 deletions .buildkite/scripts/steps/lint_with_types.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/common/util.sh

export BUILD_TS_REFS_DISABLE=false
.buildkite/scripts/bootstrap.sh

echo '--- Lint: eslint (with types)'
checks-reporter-with-killswitch "Lint: eslint (with types)" \
node scripts/eslint_with_types
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ target
.idea
*.iml
*.log
types.eslint.config.js

# Ignore example plugin builds
/examples/*/build
Expand Down
22 changes: 22 additions & 0 deletions dev_docs/contributing/how_we_use_github.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,28 @@ Pull requests are made into the master branch and then backported when it is saf
- Resolve merge conflicts by rebasing the target branch over your feature branch, and force-pushing (see below for instructions).
- When merging, we’ll squash your commits into a single commit.

### Commit using your `@elastic.co` email address

In order to assist with developer tooling we ask that all Elastic engineers use their `@elastic.co` email address when committing to the Kibana repo. We have implemented a CI check that validates any PR opened by a member of the `@elastic` organization has at least one commit that is attributed to an `@elastic.co` email address. If you have a PR that is failing because of this check you can fix your PR by following these steps:

1. Ensure that you don't have any staged changes
1. Checkout the branch for your PR
1. Update the git config for your current repository to commit with your `@elastic.co` email:

```bash
git config --local user.email YOUR_ELASTIC_EMAIL@elastic.co
```

1. Create a commit using the new email address

```bash
git commit -m 'commit using @elastic.co' --allow-empty
```

1. Push the new commit to your PR and the status should now be green

**Note:** If doing this prevents your commits from being attributed to your Github account then make sure to add your `@elastic.co` address at [https://github.com/settings/emails](https://github.com/settings/emails).

### Rebasing and fixing merge conflicts

Rebasing can be tricky, and fixing merge conflicts can be even trickier because it involves force pushing. This is all compounded by the fact that attempting to push a rebased branch remotely will be rejected by git, and you’ll be prompted to do a pull, which is not at all what you should do (this will really mess up your branch’s history).
Expand Down
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
22 changes: 22 additions & 0 deletions docs/developer/contributing/development-github.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,28 @@ explanation of _why_ you made the changes that you did.
feature branch, and force-pushing (see below for instructions).
* When merging, we'll squash your commits into a single commit.

[discrete]
==== Commit using your `@elastic.co` email address

In order to assist with developer tooling we ask that all Elastic engineers use their `@elastic.co` email address when committing to the Kibana repo. We have implemented a CI check that validates any PR opened by a member of the `@elastic` organization has at least one commit that is attributed to an `@elastic.co` email address. If you have a PR that is failing because of this check you can fix your PR by following these steps:

1. Ensure that you don't have any staged changes
2. Checkout the branch for your PR
3. Update the git config for your current repository to commit with your `@elastic.co` email:
+
["source","shell"]
-----------
git config --local user.email YOUR_ELASTIC_EMAIL@elastic.co
-----------
4. Create a commit using the new email address
+
["source","shell"]
-----------
git commit -m 'commit using @elastic.co' --allow-empty
-----------
+
5. Push the new commit to your PR and the status should now be green

[discrete]
==== Rebasing and fixing merge conflicts

Expand Down
12 changes: 12 additions & 0 deletions docs/user/security/audit-logging.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ Refer to the corresponding {es} logs for potential write errors.
| `unknown` | User is updating a space.
| `failure` | User is not authorized to update a space.

.2+| `alert_update`
| `unknown` | User is updating an alert.
| `failure` | User is not authorized to update an alert.

3+a|
====== Type: deletion

Expand Down Expand Up @@ -214,6 +218,14 @@ Refer to the corresponding {es} logs for potential write errors.
| `success` | User has accessed a space as part of a search operation.
| `failure` | User is not authorized to search for spaces.

.2+| `alert_get`
| `success` | User has accessed an alert.
| `failure` | User is not authorized to access an alert.

.2+| `alert_find`
| `success` | User has accessed an alert as part of a search operation.
| `failure` | User is not authorized to access alerts.

3+a|
===== Category: web

Expand Down
2 changes: 1 addition & 1 deletion examples/developer_examples/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ import { DeveloperExamplesPlugin } from './plugin';

export const plugin = () => new DeveloperExamplesPlugin();

export { DeveloperExamplesSetup } from './plugin';
export type { DeveloperExamplesSetup } from './plugin';
5 changes: 3 additions & 2 deletions examples/embeddable_examples/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
* Side Public License, v 1.
*/

export { TodoSavedObjectAttributes } from './todo_saved_object_attributes';
export { BookSavedObjectAttributes, BOOK_SAVED_OBJECT } from './book_saved_object_attributes';
export type { TodoSavedObjectAttributes } from './todo_saved_object_attributes';
export type { BookSavedObjectAttributes } from './book_saved_object_attributes';
export { BOOK_SAVED_OBJECT } from './book_saved_object_attributes';
18 changes: 9 additions & 9 deletions examples/embeddable_examples/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
* Side Public License, v 1.
*/

export type { HelloWorldEmbeddableFactory } from './hello_world';
export {
HELLO_WORLD_EMBEDDABLE,
HelloWorldEmbeddable,
HelloWorldEmbeddableFactoryDefinition,
HelloWorldEmbeddableFactory,
} from './hello_world';
export { ListContainer, LIST_CONTAINER, ListContainerFactory } from './list_container';
export { TODO_EMBEDDABLE, TodoEmbeddableFactory } from './todo';
export type { ListContainerFactory } from './list_container';
export { ListContainer, LIST_CONTAINER } from './list_container';
export type { TodoEmbeddableFactory } from './todo';
export { TODO_EMBEDDABLE } from './todo';

export { BOOK_EMBEDDABLE } from './book';

export { SIMPLE_EMBEDDABLE } from './migrations';

import { EmbeddableExamplesPlugin } from './plugin';

export {
SearchableListContainer,
SEARCHABLE_LIST_CONTAINER,
SearchableListContainerFactory,
} from './searchable_list_container';
export { MULTI_TASK_TODO_EMBEDDABLE, MultiTaskTodoEmbeddableFactory } from './multi_task_todo';
export type { SearchableListContainerFactory } from './searchable_list_container';
export { SearchableListContainer, SEARCHABLE_LIST_CONTAINER } from './searchable_list_container';
export type { MultiTaskTodoEmbeddableFactory } from './multi_task_todo';
export { MULTI_TASK_TODO_EMBEDDABLE } from './multi_task_todo';
export const plugin = () => new EmbeddableExamplesPlugin();
3 changes: 2 additions & 1 deletion examples/embeddable_examples/public/list_container/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
*/

export { ListContainer, LIST_CONTAINER } from './list_container';
export { ListContainerFactoryDefinition, ListContainerFactory } from './list_container_factory';
export type { ListContainerFactory } from './list_container_factory';
export { ListContainerFactoryDefinition } from './list_container_factory';
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@
*/

export { SearchableListContainer, SEARCHABLE_LIST_CONTAINER } from './searchable_list_container';
export {
SearchableListContainerFactoryDefinition,
SearchableListContainerFactory,
} from './searchable_list_container_factory';
export type { SearchableListContainerFactory } from './searchable_list_container_factory';
export { SearchableListContainerFactoryDefinition } from './searchable_list_container_factory';
4 changes: 2 additions & 2 deletions examples/locator_examples/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

import { LocatorExamplesPlugin } from './plugin';

export {
export type {
HelloLocator,
HelloLocatorV1Params,
HelloLocatorV2Params,
HelloLocatorParams,
HELLO_LOCATOR,
} from './locator';
export { HELLO_LOCATOR } from './locator';

export const plugin = () => new LocatorExamplesPlugin();
2 changes: 1 addition & 1 deletion examples/search_examples/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ import { SearchExamplesPlugin } from './plugin';
export function plugin() {
return new SearchExamplesPlugin();
}
export { SearchExamplesPluginSetup, SearchExamplesPluginStart } from './types';
export type { SearchExamplesPluginSetup, SearchExamplesPluginStart } from './types';
2 changes: 1 addition & 1 deletion examples/search_examples/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export function plugin(initializerContext: PluginInitializerContext) {
return new SearchExamplesPlugin(initializerContext);
}

export { SearchExamplesPluginSetup, SearchExamplesPluginStart } from './types';
export type { SearchExamplesPluginSetup, SearchExamplesPluginStart } from './types';
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"@elastic/apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace",
"@elastic/apm-rum": "^5.9.1",
"@elastic/apm-rum-react": "^1.3.1",
"@elastic/charts": "38.1.0",
"@elastic/charts": "38.1.3",
"@elastic/datemath": "link:bazel-bin/packages/elastic-datemath",
"@elastic/elasticsearch": "npm:@elastic/elasticsearch-canary@^8.0.0-canary.35",
"@elastic/ems-client": "8.0.0",
Expand Down Expand Up @@ -633,9 +633,9 @@
"@types/xml2js": "^0.4.5",
"@types/yauzl": "^2.9.1",
"@types/zen-observable": "^0.8.0",
"@typescript-eslint/eslint-plugin": "^4.31.2",
"@typescript-eslint/parser": "^4.31.2",
"@typescript-eslint/typescript-estree": "^4.31.2",
"@typescript-eslint/eslint-plugin": "^5.2.0",
"@typescript-eslint/parser": "^5.2.0",
"@typescript-eslint/typescript-estree": "^5.2.0",
"@yarnpkg/lockfile": "^1.1.0",
"abab": "^2.0.4",
"aggregate-error": "^3.1.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/kbn-config-schema/src/duration/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
*/

import { Duration, duration as momentDuration, DurationInputArg2, isDuration } from 'moment';
export { Duration, isDuration };
export type { Duration };
export { isDuration };

const timeFormatRegex = /^(0|[1-9][0-9]*)(ms|s|m|h|d|w|M|Y)$/;

Expand Down
3 changes: 2 additions & 1 deletion packages/kbn-config-schema/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ import {
StreamType,
} from './types';

export { ObjectType, TypeOf, Type, Props, NullableProps };
export type { TypeOf, Props, NullableProps };
export { ObjectType, Type };
export { ByteSizeValue } from './byte_size_value';
export { SchemaTypeError, ValidationError } from './errors';
export { isConfigSchema } from './typeguards';
Expand Down
36 changes: 24 additions & 12 deletions packages/kbn-config-schema/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,35 @@
* Side Public License, v 1.
*/

export { Type, TypeOptions } from './type';
export type { TypeOptions } from './type';
export { Type } from './type';
export { AnyType } from './any_type';
export { ArrayOptions, ArrayType } from './array_type';
export type { ArrayOptions } from './array_type';
export { ArrayType } from './array_type';
export { BooleanType } from './boolean_type';
export { BufferType } from './buffer_type';
export { ByteSizeOptions, ByteSizeType } from './byte_size_type';
export { ConditionalType, ConditionalTypeValue } from './conditional_type';
export { DurationOptions, DurationType } from './duration_type';
export type { ByteSizeOptions } from './byte_size_type';
export { ByteSizeType } from './byte_size_type';
export type { ConditionalTypeValue } from './conditional_type';
export { ConditionalType } from './conditional_type';
export type { DurationOptions } from './duration_type';
export { DurationType } from './duration_type';
export { LiteralType } from './literal_type';
export { MaybeType } from './maybe_type';
export { MapOfOptions, MapOfType } from './map_type';
export { NumberOptions, NumberType } from './number_type';
export { ObjectType, ObjectTypeOptions, Props, NullableProps, TypeOf } from './object_type';
export { RecordOfOptions, RecordOfType } from './record_type';
export type { MapOfOptions } from './map_type';
export { MapOfType } from './map_type';
export type { NumberOptions } from './number_type';
export { NumberType } from './number_type';
export type { ObjectTypeOptions, Props, NullableProps, TypeOf } from './object_type';
export { ObjectType } from './object_type';
export type { RecordOfOptions } from './record_type';
export { RecordOfType } from './record_type';
export { StreamType } from './stream_type';
export { StringOptions, StringType } from './string_type';
export type { StringOptions } from './string_type';
export { StringType } from './string_type';
export { UnionType } from './union_type';
export { URIOptions, URIType } from './uri_type';
export type { URIOptions } from './uri_type';
export { URIType } from './uri_type';
export { NeverType } from './never_type';
export { IpType, IpOptions } from './ip_type';
export type { IpOptions } from './ip_type';
export { IpType } from './ip_type';
19 changes: 9 additions & 10 deletions packages/kbn-config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@ export type {

export { applyDeprecations, configDeprecationFactory } from './deprecation';

export {
RawConfigurationProvider,
RawConfigService,
RawConfigAdapter,
getConfigFromFiles,
} from './raw';
export type { RawConfigurationProvider, RawConfigAdapter } from './raw';
export { RawConfigService, getConfigFromFiles } from './raw';

export { ConfigService, IConfigService, ConfigValidateParameters } from './config_service';
export { Config, ConfigPath, isConfigPath, hasConfigPathIntersection } from './config';
export type { IConfigService, ConfigValidateParameters } from './config_service';
export { ConfigService } from './config_service';
export type { Config, ConfigPath } from './config';
export { isConfigPath, hasConfigPathIntersection } from './config';
export { ObjectToConfigAdapter } from './object_to_config_adapter';
export { CliArgs, Env, RawPackageInfo } from './env';
export { EnvironmentMode, PackageInfo } from './types';
export type { CliArgs, RawPackageInfo } from './env';
export { Env } from './env';
export type { EnvironmentMode, PackageInfo } from './types';
export { getPluginSearchPaths } from './plugins';
3 changes: 2 additions & 1 deletion packages/kbn-config/src/raw/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
* Side Public License, v 1.
*/

export { RawConfigService, RawConfigurationProvider, RawConfigAdapter } from './raw_config_service';
export type { RawConfigurationProvider, RawConfigAdapter } from './raw_config_service';
export { RawConfigService } from './raw_config_service';
export { getConfigFromFiles } from './read_config';
23 changes: 0 additions & 23 deletions packages/kbn-dev-utils/src/proc_runner/errors.ts

This file was deleted.

Loading

0 comments on commit 51c9b6c

Please sign in to comment.