Skip to content

Commit

Permalink
Merge branch 'main' into spaces-descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored Jun 4, 2024
2 parents d1d418a + 79e51d6 commit 4639aff
Show file tree
Hide file tree
Showing 3,644 changed files with 57,706 additions and 34,201 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ last 2 Firefox versions
last 2 Chrome versions
last 2 Safari versions
last 2 Edge versions
Firefox ESR
last 1 ios_saf versions
last 1 and_chr versions
last 1 samsung versions
Expand Down
3 changes: 1 addition & 2 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ enabled:
- x-pack/test/functional/apps/ml/short_tests/config.ts
- x-pack/test/functional/apps/ml/stack_management_jobs/config.ts
- x-pack/test/functional/apps/monitoring/config.ts
- x-pack/test/functional/apps/navigation/config.ts
- x-pack/test/functional/apps/observability_logs_explorer/config.ts
- x-pack/test/functional/apps/dataset_quality/config.ts
- x-pack/test/functional/apps/painless_lab/config.ts
Expand All @@ -325,7 +324,6 @@ enabled:
- x-pack/test/functional/apps/search_playground/config.ts
- x-pack/test/functional/apps/snapshot_restore/config.ts
- x-pack/test/functional/apps/spaces/config.ts
- x-pack/test/functional/apps/spaces/in_solution_navigation/config.ts
- x-pack/test/functional/apps/status_page/config.ts
- x-pack/test/functional/apps/transform/creation/index_pattern/config.ts
- x-pack/test/functional/apps/transform/creation/runtime_mappings_saved_search/config.ts
Expand Down Expand Up @@ -368,6 +366,7 @@ enabled:
- x-pack/test/saved_object_api_integration/security_and_spaces/config_basic.ts
- x-pack/test/saved_object_api_integration/security_and_spaces/config_trial.ts
- x-pack/test/saved_object_api_integration/spaces_only/config.ts
- x-pack/test/saved_object_api_integration/user_profiles/config.ts
- x-pack/test/saved_object_tagging/api_integration/security_and_spaces/config.ts
- x-pack/test/saved_object_tagging/api_integration/tagging_api/config.ts
- x-pack/test/saved_object_tagging/api_integration/tagging_usage_collection/config.ts
Expand Down
11 changes: 10 additions & 1 deletion .buildkite/pipelines/esql_grammar_sync.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
steps:
- command: .buildkite/scripts/steps/esql_grammar_sync.sh
label: ES|QL Grammar Sync
label: Grammar Sync
timeout_in_minutes: 10
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-2
preemptible: true
- command: .buildkite/scripts/steps/esql_generate_function_definitions.sh
label: Generate Function Definitions
timeout_in_minutes: 10
agents:
image: family/kibana-ubuntu-2004
Expand Down
2 changes: 0 additions & 2 deletions .buildkite/pipelines/pull_request/deploy_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ steps:
machineType: n2-standard-16
preemptible: true
timeout_in_minutes: 60
soft_fail: true
retry:
automatic:
- exit_status: '-1'
Expand All @@ -29,4 +28,3 @@ steps:
- linting_with_types
- checks
- check_types
soft_fail: true
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export async function getQAFBuildContainingCommit(

// Find the first build that contains this commit
const build = qafBuilds
// Only search across scheduled builds, triggered builds might run with different commits
.filter((e) => e.source === 'schedule')
// Scheduled and manually tagged builds will have this variable, other builds might have non-relevant commits
.filter((e) => e.env.PRE_RELEASE_CHECK?.match(/(1|true)/i))
.find((kbBuild) => {
const commitShaIndex = recentGitCommits.findIndex((c) => c.sha === commitSha);

Expand Down
14 changes: 14 additions & 0 deletions .buildkite/scripts/steps/capture_oas_snapshot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/common/util.sh

echo --- Capture OAS snapshot
cmd="node scripts/capture_oas_snapshot --include-path /api/status"
if is_pr && ! is_auto_commit_disabled; then
cmd="$cmd --update"
fi

eval "$cmd"
check_for_changed_files "$cmd" true
1 change: 1 addition & 0 deletions .buildkite/scripts/steps/checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export DISABLE_BOOTSTRAP_VALIDATION=false

.buildkite/scripts/steps/checks/saved_objects_compat_changes.sh
.buildkite/scripts/steps/checks/saved_objects_definition_change.sh
.buildkite/scripts/steps/capture_oas_snapshot.sh
.buildkite/scripts/steps/code_generation/elastic_assistant_codegen.sh
.buildkite/scripts/steps/code_generation/security_solution_codegen.sh
.buildkite/scripts/steps/code_generation/osquery_codegen.sh
76 changes: 76 additions & 0 deletions .buildkite/scripts/steps/esql_generate_function_definitions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#!/usr/bin/env bash
set -euo pipefail

report_main_step () {
echo "--- $1"
}

main () {
cd "$PARENT_DIR"

report_main_step "Cloning Elasticsearch repository"

rm -rf elasticsearch
git clone https://github.com/elastic/elasticsearch --depth 1

report_main_step "Bootstrapping Kibana"

cd "$KIBANA_DIR"

.buildkite/scripts/bootstrap.sh

cd "$KIBANA_DIR/packages/kbn-esql-validation-autocomplete"

report_main_step "Generate function definitions"

yarn make:defs $PARENT_DIR/elasticsearch

report_main_step "Generate function validation tests"

yarn make:tests

# Check for differences
set +e
git diff --exit-code --quiet .
if [ $? -eq 0 ]; then
echo "No differences found. Our work is done here."
exit
fi
set -e

report_main_step "Differences found. Checking for an existing pull request."

KIBANA_MACHINE_USERNAME="kibanamachine"
git config --global user.name "$KIBANA_MACHINE_USERNAME"
git config --global user.email '[email protected]'

PR_TITLE='[ES|QL] Update function definitions'
PR_BODY='This PR updates the function definitions based on the latest metadata from Elasticsearch.'

# Check if a PR already exists
pr_search_result=$(gh pr list --search "$PR_TITLE" --state open --author "$KIBANA_MACHINE_USERNAME" --limit 1 --json title -q ".[].title")

if [ "$pr_search_result" == "$PR_TITLE" ]; then
echo "PR already exists. Exiting."
exit
fi

echo "No existing PR found. Committing changes."

# Make a commit
BRANCH_NAME="esql_generate_function_definitions_$(date +%s)"

git checkout -b "$BRANCH_NAME"

git add ./**/*
git commit -m "Update function definitions"

report_main_step "Changes committed. Creating pull request."

git push origin "$BRANCH_NAME"

# Create a PR
gh pr create --title "$PR_TITLE" --body "$PR_BODY" --base main --head "${BRANCH_NAME}" --label 'release_note:skip' --label 'Team:ESQL'
}

main
17 changes: 16 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,22 @@ module.exports = {
'jsx-a11y/click-events-have-key-events': 'off',
},
},

/**
* FormatJS linter for i18n code.
* https://formatjs.io/docs/tooling/linter
*/
{
files: [
'src/**/*.{js,mjs,ts,tsx}',
'x-pack/**/*.{js,mjs,ts,tsx}',
'packages/**/*.{js,mjs,ts,tsx}',
],
plugins: ['formatjs'],
rules: {
'formatjs/enforce-default-message': ['error', 'anything'],
'formatjs/enforce-description': 'off',
},
},
/**
* Files that require dual-license headers, settings
* are overridden below for files that require Elastic
Expand Down
44 changes: 24 additions & 20 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ x-pack/plugins/aiops @elastic/ml-ui
x-pack/packages/ml/aiops_test_utils @elastic/ml-ui
x-pack/test/alerting_api_integration/packages/helpers @elastic/response-ops
x-pack/test/alerting_api_integration/common/plugins/alerts @elastic/response-ops
x-pack/packages/kbn-alerting-comparators @elastic/response-ops
x-pack/examples/alerting_example @elastic/response-ops
x-pack/test/functional_with_es_ssl/plugins/alerts @elastic/response-ops
x-pack/plugins/alerting @elastic/response-ops
Expand Down Expand Up @@ -66,6 +67,7 @@ src/plugins/bfetch @elastic/appex-sharedux
packages/kbn-calculate-auto @elastic/obs-ux-management-team
packages/kbn-calculate-width-from-char-count @elastic/kibana-visualizations
x-pack/plugins/canvas @elastic/kibana-presentation
packages/kbn-capture-oas-snapshot-cli @elastic/kibana-core
x-pack/test/cases_api_integration/common/plugins/cases @elastic/response-ops
packages/kbn-cases-components @elastic/response-ops
x-pack/plugins/cases @elastic/response-ops
Expand Down Expand Up @@ -336,6 +338,7 @@ x-pack/plugins/dashboard_enhanced @elastic/kibana-presentation
src/plugins/dashboard @elastic/kibana-presentation
x-pack/packages/kbn-data-forge @elastic/obs-ux-management-team
src/plugins/data @elastic/kibana-visualizations @elastic/kibana-data-discovery
x-pack/plugins/data_quality @elastic/obs-ux-logs-team
test/plugin_functional/plugins/data_search @elastic/kibana-data-discovery
packages/kbn-data-service @elastic/kibana-visualizations @elastic/kibana-data-discovery
packages/kbn-data-stream-adapter @elastic/security-threat-hunting-explore
Expand All @@ -354,7 +357,7 @@ packages/deeplinks/fleet @elastic/fleet
packages/deeplinks/management @elastic/kibana-management
packages/deeplinks/ml @elastic/ml-ui
packages/deeplinks/observability @elastic/obs-ux-logs-team
packages/deeplinks/search @elastic/enterprise-search-frontend
packages/deeplinks/search @elastic/search-kibana
packages/deeplinks/security @elastic/security-solution
packages/deeplinks/shared @elastic/appex-sharedux
packages/default-nav/analytics @elastic/kibana-data-discovery @elastic/kibana-presentation @elastic/kibana-visualizations
Expand Down Expand Up @@ -389,7 +392,7 @@ examples/embeddable_examples @elastic/kibana-presentation
src/plugins/embeddable @elastic/kibana-presentation
x-pack/examples/embedded_lens_example @elastic/kibana-visualizations
x-pack/plugins/encrypted_saved_objects @elastic/kibana-security
x-pack/plugins/enterprise_search @elastic/enterprise-search-frontend
x-pack/plugins/enterprise_search @elastic/search-kibana
x-pack/packages/kbn-entities-schema @elastic/obs-knowledge-team
examples/error_boundary @elastic/appex-sharedux
packages/kbn-es @elastic/kibana-operations
Expand Down Expand Up @@ -470,6 +473,7 @@ x-pack/plugins/global_search_providers @elastic/appex-sharedux
x-pack/test/plugin_functional/plugins/global_search_test @elastic/kibana-core
x-pack/plugins/graph @elastic/kibana-visualizations
x-pack/plugins/grokdebugger @elastic/kibana-management
packages/kbn-grouping @elastic/response-ops
packages/kbn-guided-onboarding @elastic/appex-sharedux
examples/guided_onboarding_example @elastic/appex-sharedux
src/plugins/guided_onboarding @elastic/appex-sharedux
Expand Down Expand Up @@ -501,7 +505,7 @@ src/plugins/interactive_setup @elastic/kibana-security
test/interactive_setup_api_integration/plugins/test_endpoints @elastic/kibana-security
packages/kbn-interpreter @elastic/kibana-visualizations
packages/kbn-io-ts-utils @elastic/obs-knowledge-team
packages/kbn-ipynb @elastic/enterprise-search-frontend
packages/kbn-ipynb @elastic/search-kibana
packages/kbn-jest-serializers @elastic/kibana-operations
packages/kbn-journeys @elastic/kibana-operations @elastic/appex-qa
packages/kbn-json-ast @elastic/kibana-operations
Expand Down Expand Up @@ -611,7 +615,7 @@ x-pack/packages/observability/alerting_test_data @elastic/obs-ux-management-team
x-pack/test/cases_api_integration/common/plugins/observability @elastic/response-ops
x-pack/packages/observability/get_padded_alert_time_range_util @elastic/obs-ux-management-team
x-pack/plugins/observability_solution/observability_logs_explorer @elastic/obs-ux-logs-team
x-pack/plugins/observability_solution/observability_onboarding @elastic/obs-ux-logs-team
x-pack/plugins/observability_solution/observability_onboarding @elastic/obs-ux-logs-team @elastic/obs-ux-onboarding-team
x-pack/plugins/observability_solution/observability @elastic/obs-ux-management-team
x-pack/plugins/observability_solution/observability_shared @elastic/observability-ui
x-pack/test/security_api_integration/plugins/oidc_provider @elastic/kibana-security
Expand Down Expand Up @@ -703,14 +707,14 @@ examples/screenshot_mode_example @elastic/appex-sharedux
src/plugins/screenshot_mode @elastic/appex-sharedux
x-pack/examples/screenshotting_example @elastic/appex-sharedux
x-pack/plugins/screenshotting @elastic/kibana-reporting-services
packages/kbn-search-api-panels @elastic/enterprise-search-frontend
packages/kbn-search-connectors @elastic/enterprise-search-frontend
x-pack/plugins/search_connectors @elastic/enterprise-search-frontend
packages/kbn-search-api-panels @elastic/search-kibana
packages/kbn-search-connectors @elastic/search-kibana
x-pack/plugins/search_connectors @elastic/search-kibana
packages/kbn-search-errors @elastic/kibana-data-discovery
examples/search_examples @elastic/kibana-data-discovery
packages/kbn-search-index-documents @elastic/enterprise-search-frontend
x-pack/plugins/search_notebooks @elastic/enterprise-search-frontend
x-pack/plugins/search_playground @elastic/enterprise-search-frontend
packages/kbn-search-index-documents @elastic/search-kibana
x-pack/plugins/search_notebooks @elastic/search-kibana
x-pack/plugins/search_playground @elastic/search-kibana
packages/kbn-search-response-warnings @elastic/kibana-data-discovery
packages/kbn-search-types @elastic/kibana-data-discovery
x-pack/plugins/searchprofiler @elastic/kibana-management
Expand All @@ -735,7 +739,6 @@ x-pack/packages/security-solution/data_table @elastic/security-threat-hunting-in
packages/kbn-securitysolution-ecs @elastic/security-threat-hunting-explore
packages/kbn-securitysolution-es-utils @elastic/security-detection-engine
packages/kbn-securitysolution-exception-list-components @elastic/security-detection-engine
packages/kbn-securitysolution-grouping @elastic/security-threat-hunting-explore
packages/kbn-securitysolution-hook-utils @elastic/security-detection-engine
packages/kbn-securitysolution-io-ts-alerting-types @elastic/security-detection-engine
packages/kbn-securitysolution-io-ts-list-types @elastic/security-detection-engine
Expand All @@ -755,8 +758,8 @@ packages/serverless/settings/common @elastic/appex-sharedux @elastic/kibana-mana
x-pack/plugins/serverless_observability @elastic/obs-ux-management-team
packages/serverless/settings/observability_project @elastic/appex-sharedux @elastic/kibana-management @elastic/obs-ux-management-team
packages/serverless/project_switcher @elastic/appex-sharedux
x-pack/plugins/serverless_search @elastic/enterprise-search-frontend
packages/serverless/settings/search_project @elastic/enterprise-search-frontend @elastic/kibana-management
x-pack/plugins/serverless_search @elastic/search-kibana
packages/serverless/settings/search_project @elastic/search-kibana @elastic/kibana-management
packages/serverless/settings/security_project @elastic/security-solution @elastic/kibana-management
packages/serverless/storybook/config @elastic/appex-sharedux
packages/serverless/types @elastic/appex-sharedux
Expand Down Expand Up @@ -818,7 +821,6 @@ packages/kbn-shared-ux-utility @elastic/appex-sharedux
x-pack/plugins/observability_solution/slo @elastic/obs-ux-management-team
x-pack/packages/kbn-slo-schema @elastic/obs-ux-management-team
x-pack/plugins/snapshot_restore @elastic/kibana-management
packages/solution-nav/oblt @elastic/appex-sharedux @elastic/obs-ux-management-team
packages/kbn-some-dev-log @elastic/kibana-operations
packages/kbn-sort-package-json @elastic/kibana-operations
packages/kbn-sort-predicates @elastic/kibana-visualizations
Expand Down Expand Up @@ -865,7 +867,7 @@ x-pack/plugins/translations @elastic/kibana-localization
x-pack/examples/triggers_actions_ui_example @elastic/response-ops
x-pack/plugins/triggers_actions_ui @elastic/response-ops
packages/kbn-triggers-actions-ui-types @elastic/response-ops
packages/kbn-try-in-console @elastic/enterprise-search-frontend
packages/kbn-try-in-console @elastic/search-kibana
packages/kbn-ts-projects @elastic/kibana-operations
packages/kbn-ts-type-check-cli @elastic/kibana-operations
packages/kbn-typed-react-router-config @elastic/obs-knowledge-team @elastic/obs-ux-management-team
Expand Down Expand Up @@ -1218,6 +1220,7 @@ x-pack/test/observability_ai_assistant_functional @elastic/obs-ai-assistant
/WORKSPACE.bazel @elastic/kibana-operations
/.buildkite/ @elastic/kibana-operations
/.buildkite/scripts/steps/esql_grammar_sync.sh @elastic/kibana-esql
/.buildkite/scripts/steps/esql_generate_function_definitions.sh @elastic/kibana-esql
/.buildkite/pipelines/esql_grammar_sync.yml @elastic/kibana-esql
/kbn_pm/ @elastic/kibana-operations
/x-pack/dev-tools @elastic/kibana-operations
Expand Down Expand Up @@ -1246,6 +1249,7 @@ x-pack/test/observability_ai_assistant_functional @elastic/obs-ai-assistant
/config/ @elastic/kibana-core
/typings/ @elastic/kibana-core
/test/analytics @elastic/kibana-core
/packages/kbn-test/src/jest/setup/mocks.kbn_i18n_react.js @elastic/kibana-core
/x-pack/test/saved_objects_field_count/ @elastic/kibana-core
/x-pack/test_serverless/**/test_suites/common/saved_objects_management/ @elastic/kibana-core
/x-pack/test_serverless/api_integration/test_suites/common/core/ @elastic/kibana-core
Expand Down Expand Up @@ -1327,10 +1331,10 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/test_serverless/api_integration/test_suites/common/alerting/ @elastic/response-ops

# Enterprise Search
/x-pack/test/functional_enterprise_search/ @elastic/enterprise-search-frontend
/x-pack/test/functional_enterprise_search/ @elastic/search-kibana
/x-pack/plugins/enterprise_search/public/applications/shared/doc_links @elastic/ent-search-docs-team
/x-pack/test_serverless/api_integration/test_suites/search/serverless_search @elastic/enterprise-search-frontend
/x-pack/test_serverless/functional/test_suites/search/ @elastic/enterprise-search-frontend
/x-pack/test_serverless/api_integration/test_suites/search/serverless_search @elastic/search-kibana
/x-pack/test_serverless/functional/test_suites/search/ @elastic/search-kibana

# Management Experience - Deployment Management
/x-pack/test_serverless/**/test_suites/common/index_management/ @elastic/kibana-management
Expand Down Expand Up @@ -1544,10 +1548,11 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/
/x-pack/plugins/security_solution/common/cti @elastic/security-detection-engine
/x-pack/plugins/security_solution/common/field_maps @elastic/security-detection-engine

/x-pack/plugins/security_solution/public/common/components/sourcerer @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/sourcerer @elastic/security-threat-hunting-investigations
/x-pack/plugins/security_solution/public/detection_engine/rule_creation @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/detection_engine/rule_gaps @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/detections/containers/detection_engine/lists @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/detections/pages/alerts @elastic/security-detection-engine
/x-pack/plugins/security_solution/public/exceptions @elastic/security-detection-engine
Expand All @@ -1559,7 +1564,6 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/
/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/lib/sourcerer @elastic/security-detection-engine

/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine @elastic/security-detection-engine

Expand Down
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"filesManagement": "src/plugins/files_management",
"flot": "packages/kbn-flot-charts/lib",
"generateCsv": "packages/kbn-generate-csv",
"grouping": "packages/kbn-securitysolution-grouping/src",
"grouping": "packages/kbn-grouping/src",
"guidedOnboarding": "src/plugins/guided_onboarding",
"guidedOnboardingPackage": "packages/kbn-guided-onboarding",
"home": "src/plugins/home",
Expand Down
Loading

0 comments on commit 4639aff

Please sign in to comment.