Skip to content

Commit

Permalink
Merge branch 'main' of github.com:elastic/kibana into feat/remember-p…
Browse files Browse the repository at this point in the history
…rompts
  • Loading branch information
CoenWarmer committed Apr 8, 2024
2 parents afbd1f8 + 8f88fc8 commit 28e1280
Show file tree
Hide file tree
Showing 1,064 changed files with 13,039 additions and 4,514 deletions.
72 changes: 72 additions & 0 deletions .buildkite/pipeline-resource-definitions/_template/template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
###
# For more information on authoring pipeline definitions,
# follow the guides at https://docs.elastic.dev/ci/getting-started-with-buildkite-at-elastic
###
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
# This will be the URL slug in Backstage UI as:
# https://backstage.elastic.dev/catalog/default/resource/bk-kibana-your-pipeline-name
# bk-pipeline-<pipeline-name-slugified>
name: bk-kibana-your-pipeline-name
# This will be displayed in the Backstage UI
description: '<Describe your pipeline here>'
links:
# These are relevant links to your pipeline that will be listed in the Backstage UI
# The URL slug here is the .spec.implementation.metadata.name field slugified
- url: 'https://buildkite.com/elastic/kibana-your-pipeline-name'
title: Pipeline link
spec:
type: buildkite-pipeline
system: buildkite
# The owner team's github group name in the format 'group:<github-group-name>'
owner: 'group:github-group-name'
implementation:
apiVersion: buildkite.elastic.dev/v1
kind: Pipeline
metadata:
# <context / pipeline name> - this will be displayed in the Buildkite UI as title
# and this will be slugified to form the URL in the Backstage UI
name: kibana / your pipeline name
# This will appear as description on the Buildkite UI
description: '<Describe your pipeline here>'
spec:
# Environment variables that will be set for the pipeline
env:
# Slack channel to send notifications to, if ELASTIC_SLACK_NOTIFICATIONS_ENABLED = 'true'
SLACK_NOTIFICATIONS_CHANNEL: '#team-slack-channel-name'
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'

allow_rebuilds: false
branch_configuration: main
default_branch: main
repository: elastic/kibana
# Point to a pipeline implementation, detailing the pipeline steps to run
pipeline_file: .buildkite/pipelines/your-pipeline-name.yml
skip_intermediate_builds: false
provider_settings:
prefix_pull_request_fork_branch_names: false
skip_pull_request_builds_for_existing_commits: true
trigger_mode: none
# Teams and their access levels to the pipeline,
# please keep [kibana-operations, appex-qa, kibana-tech-leads] as MANAGE_BUILD_AND_READ
# and [everyone] as BUILD_AND_READ
teams:
kibana-operations:
access_level: MANAGE_BUILD_AND_READ
appex-qa:
access_level: MANAGE_BUILD_AND_READ
kibana-tech-leads:
access_level: MANAGE_BUILD_AND_READ
everyone:
access_level: BUILD_AND_READ
# Scheduled runs for the pipeline
schedules:
Daily 6 am UTC:
cronline: 0 5 * * *
message: Daily 6 am UTC
branch: main
# Optionally, set schedule-specific env-vars here
env:
SCHEDULED: 'true'
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import jsYaml from 'js-yaml';
import path from 'path';
import { execSync } from 'child_process';

const EXCLUDE_LIST = ['locations.yml'];
const EXCLUDE_LIST = ['locations.yml', '_template/template.yml'];
const REPO_FILES_BASE = 'https://github.com/elastic/kibana/blob/main';

type BackstageLocationResource = object & {
Expand Down
15 changes: 12 additions & 3 deletions .buildkite/pipeline-utils/buildkite/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,18 @@ export interface BuildkiteCommandStep {
command: string;
label: string;
parallelism?: number;
agents: {
queue: string;
};
agents:
| {
queue: string;
}
| {
provider?: string;
image?: string;
imageProject?: string;
machineType?: string;
minCpuPlatform?: string;
preemptible?: boolean;
};
timeout_in_minutes?: number;
key?: string;
depends_on?: string | string[];
Expand Down
31 changes: 22 additions & 9 deletions .buildkite/pipeline-utils/ci-stats/pick_test_group_run_order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,25 @@ import DISABLED_JEST_CONFIGS from '../../disabled_jest_configs.json';

type RunGroup = TestGroupRunOrderResponse['types'][0];

// TODO: remove this after https://github.com/elastic/kibana-operations/issues/15 is finalized
/** This function bridges the agent targeting between gobld and kibana-buildkite agent targeting */
const getAgentRule = (queueName: string = 'n2-4-spot') => {
if (process.env?.BUILDKITE_AGENT_META_DATA_QUEUE === 'gobld') {
const [kind, cores, spot] = queueName.split('-');
return {
provider: 'gcp',
image: 'family/kibana-ubuntu-2004',
imageProject: 'elastic-images-qa',
machineType: `${kind}-standard-${cores}`,
preemptible: spot === 'spot',
};
} else {
return {
queue: queueName,
};
}
};

const getRequiredEnv = (name: string) => {
const value = process.env[name];
if (typeof value !== 'string' || !value) {
Expand Down Expand Up @@ -418,9 +437,7 @@ export async function pickTestGroupRunOrder() {
parallelism: unit.count,
timeout_in_minutes: 120,
key: 'jest',
agents: {
queue: 'n2-4-spot',
},
agents: getAgentRule('n2-4-spot'),
retry: {
automatic: [
{ exit_status: '-1', limit: 3 },
Expand All @@ -438,9 +455,7 @@ export async function pickTestGroupRunOrder() {
parallelism: integration.count,
timeout_in_minutes: 120,
key: 'jest-integration',
agents: {
queue: 'n2-4-spot',
},
agents: getAgentRule('n2-4-spot'),
retry: {
automatic: [
{ exit_status: '-1', limit: 3 },
Expand Down Expand Up @@ -474,9 +489,7 @@ export async function pickTestGroupRunOrder() {
label: title,
command: getRequiredEnv('FTR_CONFIGS_SCRIPT'),
timeout_in_minutes: 90,
agents: {
queue,
},
agents: getAgentRule(queue),
env: {
FTR_CONFIG_GROUP_KEY: key,
...FTR_EXTRA_ARGS,
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/artifacts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -euo pipefail
source .buildkite/scripts/steps/artifacts/env.sh

echo "--- Build Kibana artifacts"
node scripts/build --all-platforms --debug --docker-cross-compile "${BUILD_ARGS[@]}"
node scripts/build --all-platforms --debug --docker-cross-compile --skip-docker-fips "${BUILD_ARGS[@]}"

echo "--- Extract default i18n messages"
mkdir -p target/i18n
Expand Down
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,7 @@ module.exports = {
rules: {
'@kbn/i18n/strings_should_be_translated_with_i18n': 'warn',
'@kbn/i18n/i18n_translate_should_start_with_the_right_id': 'warn',
'@kbn/i18n/formatted_message_should_start_with_the_right_id': 'warn',
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion api_docs/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions
title: "actions"
image: https://source.unsplash.com/400x175/?github
description: API docs for the actions plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
---
import actionsObj from './actions.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/advanced_settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings
title: "advancedSettings"
image: https://source.unsplash.com/400x175/?github
description: API docs for the advancedSettings plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings']
---
import advancedSettingsObj from './advanced_settings.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/ai_assistant_management_selection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiAssistantManagementSelection
title: "aiAssistantManagementSelection"
image: https://source.unsplash.com/400x175/?github
description: API docs for the aiAssistantManagementSelection plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementSelection']
---
import aiAssistantManagementSelectionObj from './ai_assistant_management_selection.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/aiops.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops
title: "aiops"
image: https://source.unsplash.com/400x175/?github
description: API docs for the aiops plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
---
import aiopsObj from './aiops.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/alerting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting
title: "alerting"
image: https://source.unsplash.com/400x175/?github
description: API docs for the alerting plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting']
---
import alertingObj from './alerting.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/apm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm
title: "apm"
image: https://source.unsplash.com/400x175/?github
description: API docs for the apm plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm']
---
import apmObj from './apm.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/apm_data_access.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apmDataAccess
title: "apmDataAccess"
image: https://source.unsplash.com/400x175/?github
description: API docs for the apmDataAccess plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess']
---
import apmDataAccessObj from './apm_data_access.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/asset_manager.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetManager
title: "assetManager"
image: https://source.unsplash.com/400x175/?github
description: API docs for the assetManager plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetManager']
---
import assetManagerObj from './asset_manager.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/banners.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners
title: "banners"
image: https://source.unsplash.com/400x175/?github
description: API docs for the banners plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners']
---
import bannersObj from './banners.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/bfetch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch
title: "bfetch"
image: https://source.unsplash.com/400x175/?github
description: API docs for the bfetch plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch']
---
import bfetchObj from './bfetch.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/canvas.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas
title: "canvas"
image: https://source.unsplash.com/400x175/?github
description: API docs for the canvas plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas']
---
import canvasObj from './canvas.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/cases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases
title: "cases"
image: https://source.unsplash.com/400x175/?github
description: API docs for the cases plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases']
---
import casesObj from './cases.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/charts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts
title: "charts"
image: https://source.unsplash.com/400x175/?github
description: API docs for the charts plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts']
---
import chartsObj from './charts.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/cloud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud
title: "cloud"
image: https://source.unsplash.com/400x175/?github
description: API docs for the cloud plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud']
---
import cloudObj from './cloud.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/cloud_data_migration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDataMigration
title: "cloudDataMigration"
image: https://source.unsplash.com/400x175/?github
description: API docs for the cloudDataMigration plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDataMigration']
---
import cloudDataMigrationObj from './cloud_data_migration.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/cloud_defend.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDefend
title: "cloudDefend"
image: https://source.unsplash.com/400x175/?github
description: API docs for the cloudDefend plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend']
---
import cloudDefendObj from './cloud_defend.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/cloud_experiments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments
title: "cloudExperiments"
image: https://source.unsplash.com/400x175/?github
description: API docs for the cloudExperiments plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments']
---
import cloudExperimentsObj from './cloud_experiments.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/cloud_security_posture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture
title: "cloudSecurityPosture"
image: https://source.unsplash.com/400x175/?github
description: API docs for the cloudSecurityPosture plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture']
---
import cloudSecurityPostureObj from './cloud_security_posture.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/console.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console
title: "console"
image: https://source.unsplash.com/400x175/?github
description: API docs for the console plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console']
---
import consoleObj from './console.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/content_management.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/contentManagement
title: "contentManagement"
image: https://source.unsplash.com/400x175/?github
description: API docs for the contentManagement plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement']
---
import contentManagementObj from './content_management.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/controls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls
title: "controls"
image: https://source.unsplash.com/400x175/?github
description: API docs for the controls plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls']
---
import controlsObj from './controls.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/custom_integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations
title: "customIntegrations"
image: https://source.unsplash.com/400x175/?github
description: API docs for the customIntegrations plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations']
---
import customIntegrationsObj from './custom_integrations.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/dashboard.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard
title: "dashboard"
image: https://source.unsplash.com/400x175/?github
description: API docs for the dashboard plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard']
---
import dashboardObj from './dashboard.devdocs.json';
Expand Down
2 changes: 1 addition & 1 deletion api_docs/dashboard_enhanced.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced
title: "dashboardEnhanced"
image: https://source.unsplash.com/400x175/?github
description: API docs for the dashboardEnhanced plugin
date: 2024-04-05
date: 2024-04-08
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced']
---
import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json';
Expand Down

0 comments on commit 28e1280

Please sign in to comment.