Skip to content

Commit

Permalink
Merge branch 'main' into d/2024-05-27-profile-email
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jun 3, 2024
2 parents c4544d4 + 76837c0 commit ca29d0b
Show file tree
Hide file tree
Showing 2,959 changed files with 43,170 additions and 24,542 deletions.
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
1 change: 1 addition & 0 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,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
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 '42973632+kibanamachine@users.noreply.github.com'

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
9 changes: 7 additions & 2 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 Down Expand Up @@ -612,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 @@ -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 @@ -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 @@ -1548,6 +1552,7 @@ x-pack/test/security_solution_cypress/cypress/tasks/expandable_flyout @elastic/
/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 Down
56 changes: 56 additions & 0 deletions api_docs/actions.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3877,6 +3877,62 @@
}
],
"returnComment": []
},
{
"parentPluginId": "actions",
"id": "def-server.PluginSetupContract.isActionTypeEnabled",
"type": "Function",
"tags": [],
"label": "isActionTypeEnabled",
"description": [],
"signature": [
"(id: string, options?: { notifyUsage: boolean; } | undefined) => boolean"
],
"path": "x-pack/plugins/actions/server/plugin.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "actions",
"id": "def-server.PluginSetupContract.isActionTypeEnabled.$1",
"type": "string",
"tags": [],
"label": "id",
"description": [],
"signature": [
"string"
],
"path": "x-pack/plugins/actions/server/plugin.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
},
{
"parentPluginId": "actions",
"id": "def-server.PluginSetupContract.isActionTypeEnabled.$2",
"type": "Object",
"tags": [],
"label": "options",
"description": [],
"path": "x-pack/plugins/actions/server/plugin.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "actions",
"id": "def-server.PluginSetupContract.isActionTypeEnabled.$2.notifyUsage",
"type": "boolean",
"tags": [],
"label": "notifyUsage",
"description": [],
"path": "x-pack/plugins/actions/server/plugin.ts",
"deprecated": false,
"trackAdoption": false
}
]
}
],
"returnComment": []
}
],
"lifecycle": "setup",
Expand Down
4 changes: 2 additions & 2 deletions 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-05-28
date: 2024-06-03
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions']
---
import actionsObj from './actions.devdocs.json';
Expand All @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o

| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
| 303 | 0 | 297 | 32 |
| 307 | 0 | 301 | 32 |

## Client

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-05-28
date: 2024-06-03
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-05-28
date: 2024-06-03
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-05-28
date: 2024-06-03
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops']
---
import aiopsObj from './aiops.devdocs.json';
Expand Down
Loading

0 comments on commit ca29d0b

Please sign in to comment.