Skip to content

Commit

Permalink
Merge branch 'main' into search-source-increase-flatten-performance
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Feb 15, 2023
2 parents 39685c2 + 09033c8 commit c7e1b2f
Show file tree
Hide file tree
Showing 1,915 changed files with 31,886 additions and 11,223 deletions.
39 changes: 37 additions & 2 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ disabled:

# Base config files, only necessary to inform config finding script
- test/functional/config.base.js
- test/functional/firefox/config.base.ts
- x-pack/test/functional/config.base.js
- x-pack/test/detection_engine_api_integration/security_and_spaces/config.base.ts
- x-pack/test/functional_enterprise_search/base_config.ts
- x-pack/test/localization/config.base.ts
- test/server_integration/config.base.js
- x-pack/test/functional_with_es_ssl/config.base.ts
- x-pack/test/api_integration/config.ts

# QA suites that are run out-of-band
- x-pack/test/stack_functional_integration/configs/config.stack_functional_integration_base.js
Expand Down Expand Up @@ -99,7 +101,11 @@ enabled:
- test/functional/apps/visualize/group6/config.ts
- test/functional/apps/visualize/replaced_vislib_chart_types/config.ts
- test/functional/config.ccs.ts
- test/functional/config.firefox.js
- test/functional/firefox/console.config.ts
- test/functional/firefox/dashboard.config.ts
- test/functional/firefox/discover.config.ts
- test/functional/firefox/home.config.ts
- test/functional/firefox/visualize.config.ts
- test/health_gateway/config.ts
- test/interactive_setup_api_integration/enrollment_flow.config.ts
- test/interactive_setup_api_integration/manual_configuration_flow_without_tls.config.ts
Expand Down Expand Up @@ -138,7 +144,36 @@ enabled:
- x-pack/test/api_integration_basic/config.ts
- x-pack/test/api_integration/config_security_basic.ts
- x-pack/test/api_integration/config_security_trial.ts
- x-pack/test/api_integration/config.ts
- x-pack/test/api_integration/apis/aiops/config.ts
- x-pack/test/api_integration/apis/cases/config.ts
- x-pack/test/api_integration/apis/cloud_security_posture/config.ts
- x-pack/test/api_integration/apis/console/config.ts
- x-pack/test/api_integration/apis/es/config.ts
- x-pack/test/api_integration/apis/features/config.ts
- x-pack/test/api_integration/apis/file_upload/config.ts
- x-pack/test/api_integration/apis/kibana/config.ts
- x-pack/test/api_integration/apis/lists/config.ts
- x-pack/test/api_integration/apis/logs_ui/config.ts
- x-pack/test/api_integration/apis/logstash/config.ts
- x-pack/test/api_integration/apis/management/config.ts
- x-pack/test/api_integration/apis/maps/config.ts
- x-pack/test/api_integration/apis/metrics_ui/config.ts
- x-pack/test/api_integration/apis/ml/config.ts
- x-pack/test/api_integration/apis/monitoring/config.ts
- x-pack/test/api_integration/apis/monitoring_collection/config.ts
- x-pack/test/api_integration/apis/osquery/config.ts
- x-pack/test/api_integration/apis/painless_lab/config.ts
- x-pack/test/api_integration/apis/search/config.ts
- x-pack/test/api_integration/apis/searchprofiler/config.ts
- x-pack/test/api_integration/apis/security/config.ts
- x-pack/test/api_integration/apis/security_solution/config.ts
- x-pack/test/api_integration/apis/spaces/config.ts
- x-pack/test/api_integration/apis/synthetics/config.ts
- x-pack/test/api_integration/apis/telemetry/config.ts
- x-pack/test/api_integration/apis/transform/config.ts
- x-pack/test/api_integration/apis/upgrade_assistant/config.ts
- x-pack/test/api_integration/apis/uptime/config.ts
- x-pack/test/api_integration/apis/watcher/config.ts
- x-pack/test/apm_api_integration/basic/config.ts
- x-pack/test/apm_api_integration/rules/config.ts
- x-pack/test/apm_api_integration/trial/config.ts
Expand Down
10 changes: 10 additions & 0 deletions .buildkite/pipelines/pull_request/check_next_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
steps:
- command: .buildkite/scripts/steps/next_docs/build_and_validate_docs.sh
label: 'Build and Validate Next Docs'
agents:
queue: n2-4-spot
timeout_in_minutes: 30
retry:
automatic:
- exit_status: '-1'
limit: 3
2 changes: 2 additions & 0 deletions .buildkite/pipelines/pull_request/threat_intelligence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ steps:
limit: 3
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-threat-intelligence/**/*"
2 changes: 2 additions & 0 deletions .buildkite/scripts/common/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ PARENT_DIR="$(cd "$KIBANA_DIR/.."; pwd)"
export PARENT_DIR
export WORKSPACE="${WORKSPACE:-$PARENT_DIR}"

export DOCS_REPO_CACHE_DIR="$HOME/.docs-repos"

# A few things, such as Chrome, respect this variable
# For many agent types, the workspace is mounted on a local ssd, so will be faster than the default tmp dir location
if [[ -d /opt/local-ssd/buildkite ]]; then
Expand Down
3 changes: 3 additions & 0 deletions .buildkite/scripts/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ yarn kbn bootstrap
for version in $(cat versions.json | jq -r '.versions[].version'); do
node scripts/es snapshot --download-only --base-path "$ES_CACHE_DIR" --version "$version"
done

echo "--- Cloning repos for docs build"
node scripts/validate_next_docs --clone-only
13 changes: 13 additions & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,19 @@ const uploadPipeline = (pipelineContent: string | object) => {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/webpack_bundle_analyzer.yml'));
}

if (
(await doAnyChangesMatch([
/\.docnav\.json$/,
/\.apidocs\.json$/,
/\.devdocs\.json$/,
/\.mdx$/,
/^dev_docs\/.*(png|gif|jpg|jpeg|webp)$/,
])) ||
GITHUB_PR_LABELS.includes('ci:build-next-docs')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/check_next_docs.yml'));
}

pipeline.push(getPipeline('.buildkite/pipelines/pull_request/post_build.yml'));

uploadPipeline(pipeline.join('\n'));
Expand Down
13 changes: 8 additions & 5 deletions .buildkite/scripts/steps/artifacts/docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ set -euo pipefail

source .buildkite/scripts/steps/artifacts/env.sh

GIT_ABBREV_COMMIT=${BUILDKITE_COMMIT:0:7}
KIBANA_IMAGE="docker.elastic.co/kibana-ci/kibana:$GIT_ABBREV_COMMIT"
GIT_ABBREV_COMMIT=${BUILDKITE_COMMIT:0:12}
KIBANA_IMAGE="docker.elastic.co/kibana-ci/kibana:git-$GIT_ABBREV_COMMIT"

echo "--- Verify manifest does not already exist"
echo "$KIBANA_DOCKER_PASSWORD" | docker login -u "$KIBANA_DOCKER_USERNAME" --password-stdin docker.elastic.co
Expand All @@ -25,7 +25,7 @@ node scripts/build \
--docker-cross-compile \
--docker-images \
--docker-namespace="kibana-ci" \
--docker-tag="$GIT_ABBREV_COMMIT" \
--docker-tag="git-$GIT_ABBREV_COMMIT" \
--skip-docker-ubi \
--skip-docker-cloud \
--skip-docker-contexts
Expand Down Expand Up @@ -82,14 +82,17 @@ if [[ "$BUILDKITE_BRANCH" == "$KIBANA_BASE_BRANCH" ]]; then
cat << EOF | buildkite-agent pipeline upload
steps:
- trigger: k8s-gitops-update-image-tag
label: ":argo: Update image tag for deployment-api"
label: ":argo: Update image tag for Kibana"
branches: main
build:
env:
MODE: sed
TARGET_FILE: kibana-controller.yaml
IMAGE_TAG: "$GIT_ABBREV_COMMIT"
IMAGE_TAG: "git-$GIT_ABBREV_COMMIT"
SERVICE: kibana-controller
NAMESPACE: kibana-ci
IMAGE_NAME: kibana
COMMIT_MESSAGE: "gitops: update kibana tag to elastic/kibana@$GIT_ABBREV_COMMIT"
EOF

else
Expand Down
5 changes: 4 additions & 1 deletion .buildkite/scripts/steps/artifacts/docker_image_trigger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@

set -euo pipefail

ts-node .buildkite/scripts/steps/trigger_pipeline.ts kibana-artifacts-container-image "$BUILDKITE_BRANCH" "$BUILDKITE_COMMIT"
if [[ "$BUILDKITE_BRANCH" == "main" ]]; then
echo "--- Trigger artifacts container image pipeline"
ts-node .buildkite/scripts/steps/trigger_pipeline.ts kibana-artifacts-container-image "$BUILDKITE_BRANCH" "$BUILDKITE_COMMIT"
fi
13 changes: 13 additions & 0 deletions .buildkite/scripts/steps/next_docs/build_and_validate_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/bootstrap.sh

echo "--- Build docs"

echo "⚠️ run 'node scripts/validate_next_docs --debug' locally to debug ⚠️"
node scripts/validate_next_docs



11 changes: 11 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,16 @@ const RESTRICTED_IMPORTS = [
name: 'react-use',
message: 'Please use react-use/lib/{method} instead.',
},
{
name: 'react-router-dom',
importNames: ['Route'],
message: 'Please use @kbn/shared-ux-router instead',
},
{
name: '@kbn/kibana-react-plugin/public',
importNames: ['Route'],
message: 'Please use @kbn/shared-ux-router instead',
},
];

module.exports = {
Expand Down Expand Up @@ -1736,6 +1746,7 @@ module.exports = {
{
files: [
'packages/kbn-{package-*,repo-*,dep-*}/**/*',
'packages/kbn-validate-next-docs-cli/**/*',
'packages/kbn-find-used-node-modules/**/*',
],
rules: {
Expand Down
Loading

0 comments on commit c7e1b2f

Please sign in to comment.