Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas committed Nov 22, 2024
2 parents b93df72 + 556edb9 commit 516406f
Show file tree
Hide file tree
Showing 2,136 changed files with 23,425 additions and 27,069 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
name: bk-kibana-console-definitions-sync
description: Opens a PR if anything changes in the console definitions in elasticsearch-definitions
links:
- url: 'https://buildkite.com/elastic/kibana-console-definitions-sync'
title: Pipeline link
spec:
type: buildkite-pipeline
owner: 'group:kibana-management'
system: buildkite
implementation:
apiVersion: buildkite.elastic.dev/v1
kind: Pipeline
metadata:
name: kibana / Console definitions sync
description: Opens a PR if anything changes in the console definitions in elasticsearch-definitions
spec:
env:
SLACK_NOTIFICATIONS_CHANNEL: '#kibana-management'
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true'
allow_rebuilds: false
branch_configuration: main
default_branch: main
repository: elastic/kibana
pipeline_file: .buildkite/pipelines/console_definitions_sync.yml
provider_settings:
build_branches: false
build_pull_requests: false
publish_commit_status: false
trigger_mode: none
build_tags: false
prefix_pull_request_fork_branch_names: false
skip_pull_request_builds_for_existing_commits: true
teams:
kibana-management:
access_level: MANAGE_BUILD_AND_READ
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
schedules:
Weekly build:
cronline: 0 0 * * 1 America/New_York
message: Weekly build
branch: main
tags:
- kibana
10 changes: 10 additions & 0 deletions .buildkite/pipelines/console_definitions_sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
steps:
- command: .buildkite/scripts/steps/console_definitions_sync.sh
label: Console Definitions Sync
timeout_in_minutes: 10
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-2
preemptible: true
68 changes: 68 additions & 0 deletions .buildkite/scripts/steps/console_definitions_sync.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#!/usr/bin/env bash
set -euo pipefail

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

main () {
cd "$PARENT_DIR"

report_main_step "Cloning repositories"

rm -rf elasticsearch-specification
if ! git clone https://github.com/elastic/elasticsearch-specification --depth 1; then
echo "Error: Failed to clone the elasticsearch-specification repository."
exit 1
fi

cd "$KIBANA_DIR"

report_main_step "Generating console definitions"
node scripts/generate_console_definitions.js --source "$PARENT_DIR/elasticsearch-specification" --emptyDest

# Check if there are any differences
set +e
git diff --exit-code --quiet "$destination_file"
if [ $? -eq 0 ]; then
echo "No differences found. Exiting.."
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='[Console] Update console definitions'
PR_BODY='This PR updates the console definitions to match the latest ones from the @elastic/elasticsearch-specification repo.'

# 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. Proceeding.."

# Commit diff
BRANCH_NAME="console_definitions_sync_$(date +%s)"

git checkout -b "$BRANCH_NAME"

git add src/plugins/console/server/lib/spec_definitions/json/generated/*
git commit -m "Update console definitions"

report_main_step "Changes committed. Creating pull request."

git push origin "$BRANCH_NAME"

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

main
4 changes: 3 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ packages/core/http/core-http-router-server-mocks @elastic/kibana-core
packages/core/http/core-http-server @elastic/kibana-core
packages/core/http/core-http-server-internal @elastic/kibana-core
packages/core/http/core-http-server-mocks @elastic/kibana-core
packages/core/http/core-http-server-utils @elastic/kibana-core
packages/core/i18n/core-i18n-browser @elastic/kibana-core
packages/core/i18n/core-i18n-browser-internal @elastic/kibana-core
packages/core/i18n/core-i18n-browser-mocks @elastic/kibana-core
Expand Down Expand Up @@ -960,6 +961,7 @@ x-pack/plugins/search_indices @elastic/search-kibana
x-pack/plugins/search_inference_endpoints @elastic/search-kibana
x-pack/plugins/search_notebooks @elastic/search-kibana
x-pack/plugins/search_playground @elastic/search-kibana
x-pack/plugins/search_solution/search_navigation @elastic/search-kibana
x-pack/plugins/searchprofiler @elastic/kibana-management
x-pack/plugins/security @elastic/kibana-security
x-pack/plugins/security_solution @elastic/security-solution
Expand Down Expand Up @@ -1183,7 +1185,7 @@ packages/kbn-monaco/src/esql @elastic/kibana-esql
/x-pack/test/saved_object_tagging/ @elastic/appex-sharedux

### Kibana React (to be deprecated)
/src/plugins/kibana_react/public/@elastic/appex-sharedux @elastic/kibana-presentation
/src/plugins/kibana_react/public/ @elastic/appex-sharedux @elastic/kibana-presentation

### Home Plugin and Packages
/src/plugins/home/public @elastic/appex-sharedux
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-11-21
date: 2024-11-22
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-11-21
date: 2024-11-22
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-11-21
date: 2024-11-22
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-11-21
date: 2024-11-22
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-11-21
date: 2024-11-22
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-11-21
date: 2024-11-22
tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm']
---
import apmObj from './apm.devdocs.json';
Expand Down
157 changes: 3 additions & 154 deletions api_docs/apm_data_access.devdocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,78 +441,6 @@
],
"functions": [],
"interfaces": [
{
"parentPluginId": "apmDataAccess",
"id": "def-server.ApmDataAccessPrivilegesCheck",
"type": "Interface",
"tags": [],
"label": "ApmDataAccessPrivilegesCheck",
"description": [],
"path": "x-pack/plugins/observability_solution/apm_data_access/server/lib/check_privileges.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "apmDataAccess",
"id": "def-server.ApmDataAccessPrivilegesCheck.request",
"type": "Object",
"tags": [],
"label": "request",
"description": [],
"signature": [
{
"pluginId": "@kbn/core-http-server",
"scope": "server",
"docId": "kibKbnCoreHttpServerPluginApi",
"section": "def-server.KibanaRequest",
"text": "KibanaRequest"
},
"<unknown, unknown, unknown, any>"
],
"path": "x-pack/plugins/observability_solution/apm_data_access/server/lib/check_privileges.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "apmDataAccess",
"id": "def-server.ApmDataAccessPrivilegesCheck.security",
"type": "Object",
"tags": [],
"label": "security",
"description": [],
"signature": [
{
"pluginId": "@kbn/security-plugin-types-server",
"scope": "server",
"docId": "kibKbnSecurityPluginTypesServerPluginApi",
"section": "def-server.SecurityPluginStart",
"text": "SecurityPluginStart"
},
" | undefined"
],
"path": "x-pack/plugins/observability_solution/apm_data_access/server/lib/check_privileges.ts",
"deprecated": false,
"trackAdoption": false
},
{
"parentPluginId": "apmDataAccess",
"id": "def-server.ApmDataAccessPrivilegesCheck.getApmIndices",
"type": "Function",
"tags": [],
"label": "getApmIndices",
"description": [],
"signature": [
"() => Promise<Readonly<{} & { error: string; transaction: string; span: string; metric: string; onboarding: string; sourcemap: string; }>>"
],
"path": "x-pack/plugins/observability_solution/apm_data_access/server/lib/check_privileges.ts",
"deprecated": false,
"trackAdoption": false,
"children": [],
"returnComment": []
}
],
"initialIsOpen": false
},
{
"parentPluginId": "apmDataAccess",
"id": "def-server.ApmDataAccessServicesParams",
Expand Down Expand Up @@ -2365,42 +2293,12 @@
"label": "getApmIndices",
"description": [],
"signature": [
"(soClient: ",
{
"pluginId": "@kbn/core-saved-objects-api-server",
"scope": "server",
"docId": "kibKbnCoreSavedObjectsApiServerPluginApi",
"section": "def-server.SavedObjectsClientContract",
"text": "SavedObjectsClientContract"
},
") => Promise<Readonly<{} & { error: string; transaction: string; span: string; metric: string; onboarding: string; sourcemap: string; }>>"
"() => Promise<Readonly<{} & { error: string; transaction: string; span: string; metric: string; onboarding: string; sourcemap: string; }>>"
],
"path": "x-pack/plugins/observability_solution/apm_data_access/server/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "apmDataAccess",
"id": "def-server.ApmDataAccessPluginSetup.getApmIndices.$1",
"type": "Object",
"tags": [],
"label": "soClient",
"description": [],
"signature": [
{
"pluginId": "@kbn/core-saved-objects-api-server",
"scope": "server",
"docId": "kibKbnCoreSavedObjectsApiServerPluginApi",
"section": "def-server.SavedObjectsClientContract",
"text": "SavedObjectsClientContract"
}
],
"path": "x-pack/plugins/observability_solution/apm_data_access/server/types.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"children": [],
"returnComment": []
},
{
Expand Down Expand Up @@ -2504,56 +2402,7 @@
"path": "x-pack/plugins/observability_solution/apm_data_access/server/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "apmDataAccess",
"id": "def-server.ApmDataAccessPluginStart.hasPrivileges",
"type": "Function",
"tags": [],
"label": "hasPrivileges",
"description": [],
"signature": [
"(params: Pick<",
{
"pluginId": "apmDataAccess",
"scope": "server",
"docId": "kibApmDataAccessPluginApi",
"section": "def-server.ApmDataAccessPrivilegesCheck",
"text": "ApmDataAccessPrivilegesCheck"
},
", \"request\">) => Promise<boolean>"
],
"path": "x-pack/plugins/observability_solution/apm_data_access/server/types.ts",
"deprecated": false,
"trackAdoption": false,
"children": [
{
"parentPluginId": "apmDataAccess",
"id": "def-server.ApmDataAccessPluginStart.hasPrivileges.$1",
"type": "Object",
"tags": [],
"label": "params",
"description": [],
"signature": [
"Pick<",
{
"pluginId": "apmDataAccess",
"scope": "server",
"docId": "kibApmDataAccessPluginApi",
"section": "def-server.ApmDataAccessPrivilegesCheck",
"text": "ApmDataAccessPrivilegesCheck"
},
", \"request\">"
],
"path": "x-pack/plugins/observability_solution/apm_data_access/server/types.ts",
"deprecated": false,
"trackAdoption": false,
"isRequired": true
}
],
"returnComment": []
}
],
"children": [],
"lifecycle": "start",
"initialIsOpen": true
}
Expand Down
Loading

0 comments on commit 516406f

Please sign in to comment.