Skip to content

Commit

Permalink
Merge branch 'main' into manage-alerts-permissions-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Mar 2, 2022
2 parents 45297fb + 08b8bb8 commit 3609b11
Show file tree
Hide file tree
Showing 186 changed files with 4,421 additions and 1,982 deletions.
2 changes: 2 additions & 0 deletions .buildkite/pipelines/bazel_cache.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
steps:
- label: ':pipeline: Create pipeline with priority'
agents:
queue: kibana-default
concurrency_group: bazel_macos
concurrency: 1
concurrency_method: eager
Expand Down
2 changes: 2 additions & 0 deletions .buildkite/pipelines/es_snapshots/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ steps:
required: true
- label: Promote Snapshot
command: .buildkite/scripts/steps/es_snapshots/promote.sh
agents:
queue: kibana-default
6 changes: 6 additions & 0 deletions .buildkite/pipelines/es_snapshots/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ steps:
- command: .buildkite/scripts/lifecycle/pre_build.sh
label: Pre-Build
timeout_in_minutes: 10
agents:
queue: kibana-default

- wait

Expand Down Expand Up @@ -85,6 +87,8 @@ steps:
- command: .buildkite/scripts/steps/es_snapshots/trigger_promote.sh
label: Trigger promotion
timeout_in_minutes: 10
agents:
queue: kibana-default
depends_on:
- default-cigroup
- default-cigroup-docker
Expand All @@ -98,3 +102,5 @@ steps:
- command: .buildkite/scripts/lifecycle/post_build.sh
label: Post-Build
timeout_in_minutes: 10
agents:
queue: kibana-default
3 changes: 3 additions & 0 deletions .buildkite/pipelines/flaky_tests/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ const pipeline = {
{
command: '.buildkite/pipelines/flaky_tests/runner.sh',
label: 'Create pipeline',
agents: {
queue: 'kibana-default',
},
},
],
};
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/pipelines/hourly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ steps:
- command: .buildkite/scripts/lifecycle/pre_build.sh
label: Pre-Build
timeout_in_minutes: 10
agents:
queue: kibana-default

- wait

Expand Down Expand Up @@ -174,3 +176,5 @@ steps:
- command: .buildkite/scripts/lifecycle/post_build.sh
label: Post-Build
timeout_in_minutes: 10
agents:
queue: kibana-default
4 changes: 4 additions & 0 deletions .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ steps:
- command: .buildkite/scripts/lifecycle/pre_build.sh
label: Pre-Build
timeout_in_minutes: 10
agents:
queue: kibana-default

- wait

Expand Down Expand Up @@ -34,3 +36,5 @@ steps:
- command: .buildkite/scripts/lifecycle/post_build.sh
label: Post-Build
timeout_in_minutes: 10
agents:
queue: kibana-default
23 changes: 13 additions & 10 deletions .buildkite/pipelines/performance/daily.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
steps:
- block: ":gear: Performance Tests Configuration"
prompt: "Fill out the details for performance test"
- block: ':gear: Performance Tests Configuration'
prompt: 'Fill out the details for performance test'
fields:
- text: ":arrows_counterclockwise: Iterations"
key: "performance-test-iteration-count"
hint: "How many times you want to run tests? "
- text: ':arrows_counterclockwise: Iterations'
key: 'performance-test-iteration-count'
hint: 'How many times you want to run tests? '
required: true
if: build.env('PERF_TEST_COUNT') == null

- label: ":male-mechanic::skin-tone-2: Pre-Build"
- label: ':male-mechanic::skin-tone-2: Pre-Build'
command: .buildkite/scripts/lifecycle/pre_build.sh
agents:
queue: kibana-default

- wait

- label: ":factory_worker: Build Kibana Distribution and Plugins"
- label: ':factory_worker: Build Kibana Distribution and Plugins'
command: .buildkite/scripts/steps/build_kibana.sh
agents:
queue: c2-16
key: build

- label: ":muscle: Performance Tests with Playwright config"
- label: ':muscle: Performance Tests with Playwright config'
command: .buildkite/scripts/steps/functional/performance_playwright.sh
agents:
queue: c2-16
Expand All @@ -28,6 +30,7 @@ steps:
- wait: ~
continue_on_failure: true

- label: ":male_superhero::skin-tone-2: Post-Build"
- label: ':male_superhero::skin-tone-2: Post-Build'
command: .buildkite/scripts/lifecycle/post_build.sh

agents:
queue: kibana-default
17 changes: 0 additions & 17 deletions .buildkite/pipelines/pull_request.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ steps:
- command: .buildkite/scripts/lifecycle/pre_build.sh
label: Pre-Build
timeout_in_minutes: 10
agents:
queue: kibana-default

- wait

Expand Down
2 changes: 2 additions & 0 deletions .buildkite/pipelines/pull_request/post_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ steps:

- command: .buildkite/scripts/lifecycle/post_build.sh
label: Post-Build
agents:
queue: kibana-default
2 changes: 2 additions & 0 deletions .buildkite/pipelines/purge_cloud_deployments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ steps:
- command: .buildkite/scripts/steps/cloud/purge.sh
label: Purge old cloud deployments
timeout_in_minutes: 10
agents:
queue: kibana-default
2 changes: 2 additions & 0 deletions .buildkite/pipelines/update_demo_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ steps:
- command: .buildkite/scripts/steps/demo_env/es_and_init.sh
label: Initialize Environment and Deploy ES
timeout_in_minutes: 10
agents:
queue: kibana-default

- command: .buildkite/scripts/steps/demo_env/kibana.sh
label: Build and Deploy Kibana
Expand Down
1 change: 1 addition & 0 deletions docs/setup/configuring-reporting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ If you are using Ubuntu/Debian systems, install the following packages:

* `fonts-liberation`
* `libfontconfig1`
* `libnss3`

If the system is missing dependencies, *Reporting* fails in a non-deterministic way. {kib} runs a self-test at server startup, and
if it encounters errors, logs them in the Console. The error message does not include
Expand Down
12 changes: 6 additions & 6 deletions nav-kibana-dev.docnav.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"description": "Developer documentation for building custom Kibana plugins and extending Kibana functionality.",
"items": [
{
"category": "Getting started",
"label": "Getting started",
"items": [
{ "id": "kibDevDocsWelcome" },
{ "id": "kibDevTutorialSetupDevEnv" },
Expand All @@ -16,7 +16,7 @@
]
},
{
"category": "Key concepts",
"label": "Key concepts",
"items": [
{ "id": "kibPlatformIntro" },
{ "id": "kibDevAnatomyOfAPlugin" },
Expand All @@ -32,7 +32,7 @@
]
},
{
"category": "Tutorials",
"label": "Tutorials",
"items": [
{ "id": "kibDevTutorialTestingPlugins" },
{ "id": "kibDevTutorialSavedObject" },
Expand All @@ -53,7 +53,7 @@
]
},
{
"category": "Contributing",
"label": "Contributing",
"items": [
{ "id": "kibRepoStructure" },
{ "id": "kibDevPrinciples" },
Expand All @@ -65,7 +65,7 @@
]
},
{
"category": "Contributors Newsletters",
"label": "Contributors Newsletters",
"items": [
{ "id": "kibFebruary2022ContributorNewsletter" },
{ "id": "kibJanuary2022ContributorNewsletter" },
Expand All @@ -82,7 +82,7 @@
]
},
{
"category": "API documentation",
"label": "API documentation",
"items": [
{ "id": "kibDevDocsApiWelcome" },
{ "id": "kibDevDocsPluginDirectory" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,10 @@ export default function () {
captureLogOutput: false,
sendToCiStats: false,
},
servers: {
elasticsearch: {
port: 1234,
},
},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@ export default () => ({
mochaReporter: {
sendToCiStats: false,
},
servers: {
elasticsearch: {
port: 1234,
},
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('failure hooks', function () {

expect(tests).toHaveLength(0);
} catch (error) {
console.error('full log output', linesCopy.join('\n'));
error.message += `\n\nfull log output:${linesCopy.join('\n')}`;
throw error;
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,10 @@
export default function () {
return {
testFiles: ['config.1'],
servers: {
elasticsearch: {
port: 1234,
},
},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,10 @@ export default async function ({ readConfigFile }) {

return {
testFiles: [...config1.get('testFiles'), 'config.2'],
servers: {
elasticsearch: {
port: 1234,
},
},
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ describe('Config', () => {
services: {
foo: () => 42,
},
servers: {
elasticsearch: {
port: 1234,
},
},
},
primary: true,
path: process.cwd(),
Expand Down
42 changes: 29 additions & 13 deletions packages/kbn-test/src/functional_test_runner/lib/config/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,33 @@ const ID_PATTERN = /^[a-zA-Z0-9_]+$/;
// it will search both --inspect and --inspect-brk
const INSPECTING = !!process.execArgv.find((arg) => arg.includes('--inspect'));

const urlPartsSchema = () =>
const maybeRequireKeys = (keys: string[], schemas: Record<string, Joi.Schema>) => {
if (!keys.length) {
return schemas;
}

const withRequires: Record<string, Joi.Schema> = {};
for (const [key, schema] of Object.entries(schemas)) {
withRequires[key] = keys.includes(key) ? schema.required() : schema;
}
return withRequires;
};

const urlPartsSchema = ({ requiredKeys }: { requiredKeys?: string[] } = {}) =>
Joi.object()
.keys({
protocol: Joi.string().valid('http', 'https').default('http'),
hostname: Joi.string().hostname().default('localhost'),
port: Joi.number(),
auth: Joi.string().regex(/^[^:]+:.+$/, 'username and password separated by a colon'),
username: Joi.string(),
password: Joi.string(),
pathname: Joi.string().regex(/^\//, 'start with a /'),
hash: Joi.string().regex(/^\//, 'start with a /'),
certificateAuthorities: Joi.array().items(Joi.binary()).optional(),
})
.keys(
maybeRequireKeys(requiredKeys ?? [], {
protocol: Joi.string().valid('http', 'https').default('http'),
hostname: Joi.string().hostname().default('localhost'),
port: Joi.number(),
auth: Joi.string().regex(/^[^:]+:.+$/, 'username and password separated by a colon'),
username: Joi.string(),
password: Joi.string(),
pathname: Joi.string().regex(/^\//, 'start with a /'),
hash: Joi.string().regex(/^\//, 'start with a /'),
certificateAuthorities: Joi.array().items(Joi.binary()).optional(),
})
)
.default();

const appUrlPartsSchema = () =>
Expand Down Expand Up @@ -170,7 +184,9 @@ export const schema = Joi.object()
servers: Joi.object()
.keys({
kibana: urlPartsSchema(),
elasticsearch: urlPartsSchema(),
elasticsearch: urlPartsSchema({
requiredKeys: ['port'],
}),
})
.default(),

Expand Down
Loading

0 comments on commit 3609b11

Please sign in to comment.