Skip to content

Commit

Permalink
Merge branch 'main' into ml-apm-correlations-fix-load-balancing
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Nov 8, 2021
2 parents 86b78c1 + fca8cbf commit de63d24
Show file tree
Hide file tree
Showing 208 changed files with 2,511 additions and 776 deletions.
6 changes: 5 additions & 1 deletion .buildkite/scripts/common/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ if is_pr; then
export ELASTIC_APM_ACTIVE=false
fi

export CHECKS_REPORTER_ACTIVE=true
if [[ "${GITHUB_STEP_COMMIT_STATUS_ENABLED:-}" != "true" ]]; then
export CHECKS_REPORTER_ACTIVE=true
else
export CHECKS_REPORTER_ACTIVE=false
fi

# These can be removed once we're not supporting Jenkins and Buildkite at the same time
# These are primarily used by github checks reporter and can be configured via /github_checks_api.json
Expand Down
4 changes: 3 additions & 1 deletion .buildkite/scripts/lifecycle/post_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ set -euo pipefail
BUILD_SUCCESSFUL=$(node "$(dirname "${0}")/build_status.js")
export BUILD_SUCCESSFUL

"$(dirname "${0}")/commit_status_complete.sh"
if [[ "${GITHUB_BUILD_COMMIT_STATUS_ENABLED:-}" != "true" ]]; then
"$(dirname "${0}")/commit_status_complete.sh"
fi

node "$(dirname "${0}")/ci_stats_complete.js"

Expand Down
4 changes: 3 additions & 1 deletion .buildkite/scripts/lifecycle/pre_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ set -euo pipefail

source .buildkite/scripts/common/util.sh

"$(dirname "${0}")/commit_status_start.sh"
if [[ "${GITHUB_BUILD_COMMIT_STATUS_ENABLED:-}" != "true" ]]; then
"$(dirname "${0}")/commit_status_start.sh"
fi

export CI_STATS_TOKEN="$(retry 5 5 vault read -field=api_token secret/kibana-issues/dev/kibana_ci_stats)"
export CI_STATS_HOST="$(retry 5 5 vault read -field=api_host secret/kibana-issues/dev/kibana_ci_stats)"
Expand Down
20 changes: 10 additions & 10 deletions config/kibana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
#elasticsearch.ssl.verificationMode: full

# =================== System: Logging ===================
# Set the value of this setting to off to suppress all logging output, or to debug to log everything. Defaults to 'error'
# Set the value of this setting to off to suppress all logging output, or to debug to log everything. Defaults to 'info'
#logging.root.level: debug

# Enables you to specify a file where Kibana stores log output.
Expand Down Expand Up @@ -120,7 +120,7 @@
#pid.file: /run/kibana/kibana.pid

# Set the interval in milliseconds to sample system and process performance
# metrics. Minimum is 100ms. Defaults to 5000.
# metrics. Minimum is 100ms. Defaults to 5000ms.
#ops.interval: 5000

# Specifies locale to be used for all localizable strings, dates and number formats.
Expand All @@ -134,25 +134,25 @@

# The number of documents migrated at a time.
# If Kibana can't start up or upgrade due to an Elasticsearch `circuit_breaking_exception`,
# use a smaller batchSize value to reduce the memory pressure. Defaults to 1000
# migrations.batchSize: 1000
# use a smaller batchSize value to reduce the memory pressure. Defaults to 1000 objects per batch.
#migrations.batchSize: 1000

# The maximum payload size for indexing batches of upgraded saved objects.
# To avoid migrations failing due to a 413 Request Entity Too Large response from Elasticsearch.
# This value should be lower than or equal to your Elasticsearch cluster’s `http.max_content_length`
# configuration option. Default: 100mb
# migrations.maxBatchSizeBytes: 100mb
#migrations.maxBatchSizeBytes: 100mb

# The number of times to retry temporary migration failures. Increase the setting
# if migrations fail frequently with a message such as `Unable to complete the [...] step after
# 15 attempts, terminating`. Defaults to 15
# migrations.retryAttempts: 15
#migrations.retryAttempts: 15

# =================== Search Autocomplete ===================
# Time in milliseconds to wait for autocomplete suggestions from Elasticsearch.
# This value must be a whole number greater than zero. Defaults to 1000
# data.autocomplete.valueSuggestions.timeout: 1000
# This value must be a whole number greater than zero. Defaults to 1000ms
#data.autocomplete.valueSuggestions.timeout: 1000

# Maximum number of documents loaded by each shard to generate autocomplete suggestions.
# This value must be a whole number greater than zero. Defaults to 100000
# data.autocomplete.valueSuggestions.terminateAfter: 100000
# This value must be a whole number greater than zero. Defaults to 100_000
#data.autocomplete.valueSuggestions.terminateAfter: 100000
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,8 @@ readonly links: {
readonly rubyOverview: string;
readonly rustGuide: string;
};
readonly endpoints: {
readonly troubleshooting: string;
};
};
```

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/user/security/securing-kibana.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ TIP: For more information on Basic Authentication and additional methods of auth
TIP: You can define as many different roles for your {kib} users as you need.

For example, create roles that have `read` and `view_index_metadata` privileges
on specific index patterns. For more information, see
on specific data views. For more information, see
{ref}/authorization.html[User authorization].

--
Expand Down
2 changes: 1 addition & 1 deletion scripts/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
*/

require('../src/setup_node_env');
require('../src/docs/cli');
require('../src/dev/run_build_docs_cli').runBuildDocsCli();
6 changes: 6 additions & 0 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,9 @@ export class DocLinksService {
rubyOverview: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/client/ruby-api/${DOC_LINK_VERSION}/ruby_client.html`,
rustGuide: `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/client/rust-api/${DOC_LINK_VERSION}/index.html`,
},
endpoints: {
troubleshooting: `${ELASTIC_WEBSITE_URL}guide/en/security/${DOC_LINK_VERSION}/ts-management.html#ts-endpoints`,
},
},
});
}
Expand Down Expand Up @@ -770,5 +773,8 @@ export interface DocLinksStart {
readonly rubyOverview: string;
readonly rustGuide: string;
};
readonly endpoints: {
readonly troubleshooting: string;
};
};
}
3 changes: 3 additions & 0 deletions src/core/public/public.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,9 @@ export interface DocLinksStart {
readonly rubyOverview: string;
readonly rustGuide: string;
};
readonly endpoints: {
readonly troubleshooting: string;
};
};
}

Expand Down
2 changes: 2 additions & 0 deletions src/dev/bazel/index.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Please do not import from any other files when looking to use a custom rule

load("//src/dev/bazel:jsts_transpiler.bzl", _jsts_transpiler = "jsts_transpiler")
load("//src/dev/bazel:ts_project.bzl", _ts_project = "ts_project")
load("//src/dev/bazel:pkg_npm.bzl", _pkg_npm = "pkg_npm")

jsts_transpiler = _jsts_transpiler
pkg_npm = _pkg_npm
ts_project = _ts_project
16 changes: 16 additions & 0 deletions src/dev/bazel/pkg_npm.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"Simple wrapper over the general pkg_npm rule from rules_nodejs so we can override some configs"

load("@build_bazel_rules_nodejs//internal/pkg_npm:pkg_npm.bzl", _pkg_npm = "pkg_npm_macro")

def pkg_npm(validate = False, **kwargs):
"""A macro around the upstream pkg_npm rule.
Args:
validate: boolean; Whether to check that the attributes match the package.json. Defaults to false
**kwargs: the rest
"""

_pkg_npm(
validate = validate,
**kwargs
)
64 changes: 64 additions & 0 deletions src/dev/run_build_docs_cli.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import Path from 'path';

import dedent from 'dedent';
import { run, REPO_ROOT, createFailError } from '@kbn/dev-utils';

const DEFAULT_DOC_REPO_PATH = Path.resolve(REPO_ROOT, '..', 'docs');

const rel = (path: string) => Path.relative(process.cwd(), path);

export function runBuildDocsCli() {
run(
async ({ flags, procRunner }) => {
const docRepoPath =
typeof flags.docrepo === 'string' && flags.docrepo
? Path.resolve(process.cwd(), flags.docrepo)
: DEFAULT_DOC_REPO_PATH;

try {
await procRunner.run('build_docs', {
cmd: rel(Path.resolve(docRepoPath, 'build_docs')),
args: [
['--doc', rel(Path.resolve(REPO_ROOT, 'docs/index.asciidoc'))],
['--chunk', '1'],
flags.open ? ['--open'] : [],
].flat(),
cwd: REPO_ROOT,
wait: true,
});
} catch (error) {
if (error.code === 'ENOENT') {
throw createFailError(dedent`
Unable to run "build_docs" script from docs repo.
Does it exist at [${rel(docRepoPath)}]?
Do you need to pass --docrepo to specify the correct path or clone it there?
`);
}

throw error;
}
},
{
description: 'Build the docs and serve them from a docker container',
flags: {
string: ['docrepo'],
boolean: ['open'],
default: {
docrepo: DEFAULT_DOC_REPO_PATH,
},
help: `
--docrepo [path] Path to the doc repo, defaults to ${rel(DEFAULT_DOC_REPO_PATH)}
--open Automatically open the built docs in your default browser after building
`,
},
}
);
}
30 changes: 0 additions & 30 deletions src/docs/cli.js

This file was deleted.

28 changes: 0 additions & 28 deletions src/docs/docs_repo.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export const EditorMenu = ({ dashboardContainer, createNewVisType }: Props) => {
<SolutionToolbarPopover
ownFocus
label={i18n.translate('dashboard.solutionToolbar.editorMenuButtonLabel', {
defaultMessage: 'All types',
defaultMessage: 'Select type',
})}
iconType="arrowDown"
iconSide="right"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ const outdatedRawEventLoopDelaysDaily = [
createRawObject(moment().subtract(7, 'days')),
];

describe('daily rollups integration test', () => {
// FLAKY https://github.com/elastic/kibana/issues/111821
describe.skip('daily rollups integration test', () => {
let esServer: TestElasticsearchUtils;
let root: TestKibanaUtils['root'];
let internalRepository: ISavedObjectsRepository;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,10 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = {
type: 'integer',
_meta: { description: 'Non-default value of setting.' },
},
'observability:enableComparisonByDefault': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
},
'banners:placement': {
type: 'keyword',
_meta: { description: 'Non-default value of setting.' },
Expand All @@ -440,6 +444,10 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
},
'labs:canvas:byValueEmbeddable': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
},
'labs:canvas:useDataService': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export interface UsageStats {
'securitySolution:rulesTableRefresh': string;
'observability:enableInspectEsQueries': boolean;
'observability:maxSuggestions': number;
'observability:enableComparisonByDefault': boolean;
'visualize:enableLabs': boolean;
'visualization:heatmap:maxBuckets': number;
'visualization:colorMapping': string;
Expand Down Expand Up @@ -121,6 +122,7 @@ export interface UsageStats {
'banners:textColor': string;
'banners:backgroundColor': string;
'labs:canvas:enable_ui': boolean;
'labs:canvas:byValueEmbeddable': boolean;
'labs:canvas:useDataService': boolean;
'labs:presentation:timeToPresent': boolean;
'labs:dashboard:enable_ui': boolean;
Expand Down
17 changes: 16 additions & 1 deletion src/plugins/presentation_util/common/labs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import { i18n } from '@kbn/i18n';
export const LABS_PROJECT_PREFIX = 'labs:';
export const DEFER_BELOW_FOLD = `${LABS_PROJECT_PREFIX}dashboard:deferBelowFold` as const;
export const DASHBOARD_CONTROLS = `${LABS_PROJECT_PREFIX}dashboard:dashboardControls` as const;
export const projectIDs = [DEFER_BELOW_FOLD, DASHBOARD_CONTROLS] as const;
export const BY_VALUE_EMBEDDABLE = `${LABS_PROJECT_PREFIX}canvas:byValueEmbeddable` as const;

export const projectIDs = [DEFER_BELOW_FOLD, DASHBOARD_CONTROLS, BY_VALUE_EMBEDDABLE] as const;
export const environmentNames = ['kibana', 'browser', 'session'] as const;
export const solutionNames = ['canvas', 'dashboard', 'presentation'] as const;

Expand Down Expand Up @@ -48,6 +50,19 @@ export const projects: { [ID in ProjectID]: ProjectConfig & { id: ID } } = {
}),
solutions: ['dashboard'],
},
[BY_VALUE_EMBEDDABLE]: {
id: BY_VALUE_EMBEDDABLE,
isActive: true,
isDisplayed: true,
environments: ['kibana', 'browser', 'session'],
name: i18n.translate('presentationUtil.labs.enableByValueEmbeddableName', {
defaultMessage: 'By-Value Embeddables',
}),
description: i18n.translate('presentationUtil.labs.enableByValueEmbeddableDescription', {
defaultMessage: 'Enables support for by-value embeddables in Canvas',
}),
solutions: ['canvas'],
},
};

export type ProjectID = typeof projectIDs[number];
Expand Down
Loading

0 comments on commit de63d24

Please sign in to comment.