Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/elastic/kibana into add-des…
Browse files Browse the repository at this point in the history
…c-list-to-findings-flyout
  • Loading branch information
JordanSh committed Jun 9, 2024
2 parents 31bdc03 + 252e035 commit 29dd142
Show file tree
Hide file tree
Showing 1,875 changed files with 57,944 additions and 11,556 deletions.
1 change: 1 addition & 0 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ disabled:
- x-pack/test/upgrade/config.ts
- test/functional/config.edge.js
- x-pack/test/functional/config.edge.js
- x-pack/test/cloud_security_posture_functional/config.cloud.ts

# Cypress configs, for now these are still run manually
- x-pack/test/fleet_cypress/cli_config.ts
Expand Down
36 changes: 0 additions & 36 deletions .buildkite/pipelines/on_merge_unsupported_ftrs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,39 +80,3 @@ steps:
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/defend_workflows.sh
label: 'Defend Workflows Cypress Tests'
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
enableNestedVirtualization: true
localSsdInterface: nvme
localSsds: 1
machineType: n2-standard-4
depends_on: build
timeout_in_minutes: 60
parallelism: 20
retry:
automatic:
- exit_status: '-1'
limit: 1

- command: .buildkite/scripts/steps/functional/defend_workflows_serverless.sh
label: 'Defend Workflows Cypress Tests on Serverless'
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
enableNestedVirtualization: true
localSsdInterface: nvme
localSsds: 1
machineType: n2-standard-4
depends_on: build
timeout_in_minutes: 60
parallelism: 14
retry:
automatic:
- exit_status: '-1'
limit: 1
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ async function main() {
const commitSha = process.env.OVERRIDE_COMMIT || process.env.BUILDKITE_COMMIT;

if (!isCurrentHeadInMain(commitSha!)) {
if (!DRY_RUN) {
if (DRY_RUN) {
console.log(
`DRY_RUN: Commit ${commitSha} isn't in main, triggering container build :green_heart:`
);
} else {
console.log(`Commit ${commitSha} isn't in main, triggering container build :green_heart:`);
uploadTriggerBuildStep();
uploadTriggerBuildStep(commitSha!);
}
} else {
if (!DRY_RUN) {
if (DRY_RUN) {
console.log(`DRY_RUN: Commit ${commitSha} is in main, no build necessary :yellow_heart:`);
} else {
console.log(`Commit ${commitSha} is in main, no trigger necessary :yellow_heart:`);
Expand All @@ -41,12 +41,14 @@ function isCurrentHeadInMain(commitSha: string) {
return parseInt(containmentTest, 10) >= 1;
}

function uploadTriggerBuildStep() {
function uploadTriggerBuildStep(commitSha: string) {
const triggerStep: BuildkiteTriggerStep = {
label: ':point_right: Trigger emergency commit container build',
trigger: 'kibana-artifacts-container-image',
build: {
message: `Triggered by '${process.env.BUILDKITE_PIPELINE_NAME || 'unknown'}'`,
branch: process.env?.BUILDKITE_BRANCH || 'main',
commit: commitSha,
env: {},
},
};
Expand Down
13 changes: 4 additions & 9 deletions .buildkite/scripts/steps/artifacts/docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,10 @@ echo "--- Build Kibana"
node scripts/build \
--debug \
--release \
--serverless \
--docker-cross-compile \
--docker-images \
--docker-namespace="kibana-ci" \
--docker-tag="$KIBANA_IMAGE_TAG" \
--skip-docker-ubuntu \
--skip-docker-chainguard \
--skip-docker-ubi \
--skip-docker-fips \
--skip-docker-cloud
--docker-tag="$KIBANA_IMAGE_TAG"

echo "--- Tag images"
docker rmi "$KIBANA_IMAGE"
Expand Down Expand Up @@ -99,8 +94,8 @@ ts-node "$(git rev-parse --show-toplevel)/.buildkite/scripts/steps/artifacts/val
"$CDN_ASSETS_FOLDER"

echo "--- Upload archives"
buildkite-agent artifact upload "kibana-$BASE_VERSION-linux-x86_64.tar.gz"
buildkite-agent artifact upload "kibana-$BASE_VERSION-linux-aarch64.tar.gz"
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-linux-x86_64.tar.gz"
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-linux-aarch64.tar.gz"
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-image.tar.gz"
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-image-aarch64.tar.gz"
buildkite-agent artifact upload "kibana-serverless-$BASE_VERSION-docker-build-context.tar.gz"
Expand Down
31 changes: 9 additions & 22 deletions .buildkite/scripts/steps/cloud/build_and_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,7 @@ if [ -z "${CLOUD_DEPLOYMENT_ID}" ] || [ "${CLOUD_DEPLOYMENT_ID}" = 'null' ]; the

echo "Writing to vault..."

# TODO: remove after https://github.com/elastic/kibana-operations/issues/15 is done
if [[ "$IS_LEGACY_VAULT_ADDR" == "true" ]]; then
VAULT_ROLE_ID="$(get_vault_role_id)"
VAULT_SECRET_ID="$(get_vault_secret_id)"
VAULT_TOKEN=$(retry 5 30 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID")
retry 5 30 vault login -no-print "$VAULT_TOKEN"
vault_set "cloud-deploy/$CLOUD_DEPLOYMENT_NAME" username="$CLOUD_DEPLOYMENT_USERNAME" password="$CLOUD_DEPLOYMENT_PASSWORD"
else
vault_kv_set "cloud-deploy/$CLOUD_DEPLOYMENT_NAME" username="$CLOUD_DEPLOYMENT_USERNAME" password="$CLOUD_DEPLOYMENT_PASSWORD"
fi
vault_kv_set "cloud-deploy/$CLOUD_DEPLOYMENT_NAME" username="$CLOUD_DEPLOYMENT_USERNAME" password="$CLOUD_DEPLOYMENT_PASSWORD"

echo "Enabling Stack Monitoring..."
jq '
Expand Down Expand Up @@ -123,28 +114,24 @@ else
ecctl deployment update "$CLOUD_DEPLOYMENT_ID" --track --output json --file /tmp/deploy.json > "$ECCTL_LOGS"
fi

# TODO: remove after https://github.com/elastic/kibana-operations/issues/15 is done
if [[ "$IS_LEGACY_VAULT_ADDR" == "true" ]]; then
VAULT_READ_COMMAND="vault read $VAULT_PATH_PREFIX/cloud-deploy/$CLOUD_DEPLOYMENT_NAME"
else
VAULT_READ_COMMAND="vault kv get $VAULT_KV_PREFIX/cloud-deploy/$CLOUD_DEPLOYMENT_NAME"
fi

CLOUD_DEPLOYMENT_KIBANA_URL=$(ecctl deployment show "$CLOUD_DEPLOYMENT_ID" | jq -r '.resources.kibana[0].info.metadata.aliased_url')
CLOUD_DEPLOYMENT_ELASTICSEARCH_URL=$(ecctl deployment show "$CLOUD_DEPLOYMENT_ID" | jq -r '.resources.elasticsearch[0].info.metadata.aliased_url')

cat << EOF | buildkite-agent annotate --style "info" --context cloud
### Cloud Deployment
### Cloud Deployment
Kibana: $CLOUD_DEPLOYMENT_KIBANA_URL
Kibana: $CLOUD_DEPLOYMENT_KIBANA_URL
Elasticsearch: $CLOUD_DEPLOYMENT_ELASTICSEARCH_URL
Elasticsearch: $CLOUD_DEPLOYMENT_ELASTICSEARCH_URL
Credentials: \`vault kv get $VAULT_KV_PREFIX/cloud-deploy/$CLOUD_DEPLOYMENT_NAME\`
Credentials: \`$VAULT_READ_COMMAND\`
(Stored in the production vault: VAULT_ADDR=https://vault-ci-prod.elastic.dev, more info: https://docs.elastic.dev/ci/using-secrets)
Kibana image: \`$KIBANA_CLOUD_IMAGE\`
Kibana image: \`$KIBANA_CLOUD_IMAGE\`
Elasticsearch image: \`$ELASTICSEARCH_CLOUD_IMAGE\`
Elasticsearch image: \`$ELASTICSEARCH_CLOUD_IMAGE\`
EOF

buildkite-agent meta-data set pr_comment:deploy_cloud:head "* [Cloud Deployment](${CLOUD_DEPLOYMENT_KIBANA_URL})"
Expand Down
22 changes: 4 additions & 18 deletions .buildkite/scripts/steps/serverless/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,7 @@ deploy() {

echo "Write to vault..."

# TODO: remove after https://github.com/elastic/kibana-operations/issues/15 is done
if [[ "$IS_LEGACY_VAULT_ADDR" == "true" ]]; then
VAULT_ROLE_ID="$(get_vault_role_id)"
VAULT_SECRET_ID="$(get_vault_secret_id)"
VAULT_TOKEN=$(retry 5 30 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID")
retry 5 30 vault login -no-print "$VAULT_TOKEN"
vault_set "cloud-deploy/$VAULT_KEY_NAME" username="$PROJECT_USERNAME" password="$PROJECT_PASSWORD" id="$PROJECT_ID"
else
vault_kv_set "cloud-deploy/$VAULT_KEY_NAME" username="$PROJECT_USERNAME" password="$PROJECT_PASSWORD" id="$PROJECT_ID"
fi
vault_kv_set "cloud-deploy/$VAULT_KEY_NAME" username="$PROJECT_USERNAME" password="$PROJECT_PASSWORD" id="$PROJECT_ID"

else
echo "Updating project..."
Expand All @@ -118,21 +109,16 @@ deploy() {
PROJECT_KIBANA_LOGIN_URL="${PROJECT_KIBANA_URL}/login"
PROJECT_ELASTICSEARCH_URL=$(jq -r '.endpoints.elasticsearch' $PROJECT_INFO_LOGS)

# TODO: remove after https://github.com/elastic/kibana-operations/issues/15 is done
if [[ "$IS_LEGACY_VAULT_ADDR" == "true" ]]; then
VAULT_READ_COMMAND="vault read $VAULT_PATH_PREFIX/cloud-deploy/$VAULT_KEY_NAME"
else
VAULT_READ_COMMAND="vault kv get $VAULT_KV_PREFIX/cloud-deploy/$VAULT_KEY_NAME"
fi

cat << EOF | buildkite-agent annotate --style "info" --context "project-$PROJECT_TYPE"
### $PROJECT_TYPE_LABEL Deployment
Kibana: $PROJECT_KIBANA_LOGIN_URL
Elasticsearch: $PROJECT_ELASTICSEARCH_URL
Credentials: \`$VAULT_READ_COMMAND\`
Credentials: \`vault kv get $VAULT_KV_PREFIX/cloud-deploy/$VAULT_KEY_NAME\`
(Stored in the production vault: VAULT_ADDR=https://vault-ci-prod.elastic.dev, more info: https://docs.elastic.dev/ci/using-secrets)
Kibana image: \`$KIBANA_IMAGE\`
EOF
Expand Down
27 changes: 12 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -908,10 +908,6 @@ module.exports = {
},
],
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': [
'error',
{ additionalHooks: '^(useFetcher|useProgressiveFetcher|useBreadcrumb)$' },
],
},
},
{
Expand All @@ -931,6 +927,18 @@ module.exports = {
],
},
},
{
files: ['x-pack/plugins/observability_solution/**/*.{ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': [
'error',
{
additionalHooks:
'^(useAbortableAsync|useMemoWithAbortSignal|useFetcher|useProgressiveFetcher|useBreadcrumb|useAsync|useTimeRangeAsync|useAutoAbortedHttpClient)$',
},
],
},
},
{
files: [
'x-pack/plugins/aiops/**/*.tsx',
Expand Down Expand Up @@ -964,17 +972,6 @@ module.exports = {
],
},
},
// Profiling
{
files: ['x-pack/plugins/observability_solution/profiling/**/*.{js,mjs,ts,tsx}'],
rules: {
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': [
'error',
{ additionalHooks: '^(useAsync|useTimeRangeAsync|useAutoAbortedHttpClient)$' },
],
},
},
{
// disable imports from legacy uptime plugin
files: [
Expand Down
15 changes: 15 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ examples/eso_model_version_example @elastic/kibana-security
x-pack/test/encrypted_saved_objects_api_integration/plugins/api_consumer_plugin @elastic/kibana-security
packages/kbn-esql-ast @elastic/kibana-esql
examples/esql_ast_inspector @elastic/kibana-esql
src/plugins/esql_datagrid @elastic/kibana-esql
packages/kbn-esql-utils @elastic/kibana-esql
packages/kbn-esql-validation-autocomplete @elastic/kibana-esql
examples/esql_validation_example @elastic/kibana-esql
Expand Down Expand Up @@ -505,6 +506,7 @@ src/plugins/inspector @elastic/kibana-presentation
src/plugins/interactive_setup @elastic/kibana-security
test/interactive_setup_api_integration/plugins/test_endpoints @elastic/kibana-security
packages/kbn-interpreter @elastic/kibana-visualizations
x-pack/plugins/observability_solution/investigate @elastic/obs-ai-assistant
packages/kbn-io-ts-utils @elastic/obs-knowledge-team
packages/kbn-ipynb @elastic/search-kibana
packages/kbn-jest-serializers @elastic/kibana-operations
Expand Down Expand Up @@ -891,6 +893,7 @@ examples/unified_field_list_examples @elastic/kibana-data-discovery
src/plugins/unified_histogram @elastic/kibana-data-discovery
src/plugins/unified_search @elastic/kibana-visualizations
packages/kbn-unsaved-changes-badge @elastic/kibana-data-discovery
packages/kbn-unsaved-changes-prompt @elastic/kibana-management
x-pack/plugins/upgrade_assistant @elastic/kibana-management
x-pack/plugins/observability_solution/uptime @elastic/obs-ux-infra_services-team
x-pack/plugins/drilldowns/url_drilldown @elastic/appex-sharedux
Expand Down Expand Up @@ -1248,6 +1251,10 @@ x-pack/test/observability_ai_assistant_functional @elastic/obs-ai-assistant

# Core
/config/ @elastic/kibana-core
/config/serverless.yml @elastic/kibana-core @elastic/kibana-security
/config/serverless.es.yml @elastic/kibana-core @elastic/kibana-security
/config/serverless.oblt.yml @elastic/kibana-core @elastic/kibana-security
/config/serverless.security.yml @elastic/kibana-core @elastic/kibana-security
/typings/ @elastic/kibana-core
/test/analytics @elastic/kibana-core
/packages/kbn-test/src/jest/setup/mocks.kbn_i18n_react.js @elastic/kibana-core
Expand Down Expand Up @@ -1306,6 +1313,9 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/test/spaces_api_integration/ @elastic/kibana-security
/x-pack/test/saved_object_api_integration/ @elastic/kibana-security
/x-pack/test_serverless/**/test_suites/common/platform_security/ @elastic/kibana-security
/x-pack/test_serverless/**/test_suites/search/platform_security/ @elastic/kibana-security
/x-pack/test_serverless/**/test_suites/security/platform_security/ @elastic/kibana-security
/x-pack/test_serverless/**/test_suites/observability/platform_security/ @elastic/kibana-security
/packages/core/http/core-http-server-internal/src/cdn_config/ @elastic/kibana-security @elastic/kibana-core
#CC# /x-pack/plugins/security/ @elastic/kibana-security

Expand Down Expand Up @@ -1489,6 +1499,11 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/
/x-pack/plugins/stack_connectors/server/connector_types/bedrock @elastic/security-generative-ai
/x-pack/plugins/stack_connectors/common/bedrock @elastic/security-generative-ai

# Gemini
/x-pack/plugins/stack_connectors/public/connector_types/gemini @elastic/security-generative-ai
/x-pack/plugins/stack_connectors/server/connector_types/gemini @elastic/security-generative-ai
/x-pack/plugins/stack_connectors/common/gemini @elastic/security-generative-ai

## Defend Workflows owner connectors
/x-pack/plugins/stack_connectors/public/connector_types/sentinelone @elastic/security-defend-workflows
/x-pack/plugins/stack_connectors/server/connector_types/sentinelone @elastic/security-defend-workflows
Expand Down
2 changes: 2 additions & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"coloring": "packages/kbn-coloring/src",
"languageDocumentationPopover": "packages/kbn-language-documentation-popover/src",
"textBasedLanguages": "src/plugins/text_based_languages",
"esqlDataGrid": "src/plugins/esql_datagrid",
"statusPage": "src/legacy/core_plugins/status_page",
"telemetry": ["src/plugins/telemetry", "src/plugins/telemetry_management_section"],
"timelion": ["src/plugins/vis_types/timelion"],
Expand Down Expand Up @@ -147,6 +148,7 @@
"unifiedHistogram": "src/plugins/unified_histogram",
"unifiedDataTable": "packages/kbn-unified-data-table",
"unsavedChangesBadge": "packages/kbn-unsaved-changes-badge",
"unsavedChangesPrompt": "packages/kbn-unsaved-changes-prompt",
"managedContentBadge": "packages/kbn-managed-content-badge"
},
"translations": []
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-06-05
date: 2024-06-09
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-06-05
date: 2024-06-09
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-06-05
date: 2024-06-09
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-06-05
date: 2024-06-09
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-06-05
date: 2024-06-09
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-06-05
date: 2024-06-09
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-06-05
date: 2024-06-09
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess']
---
import apmDataAccessObj from './apm_data_access.devdocs.json';
Expand Down
Loading

0 comments on commit 29dd142

Please sign in to comment.