Skip to content

Commit

Permalink
Merge branch 'main' into data-streams/improve-jest-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ElenaStoeva authored Jan 8, 2025
2 parents ee3bfcf + c8cd319 commit 3ee9768
Show file tree
Hide file tree
Showing 390 changed files with 3,816 additions and 1,729 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ buildkite-agent artifact upload "${OUTPUT_DIR}/scalability_traces.tar.gz"

echo "--- Downloading Kibana artifacts used in tests"
download_artifact kibana-default.tar.gz "${OUTPUT_DIR}/" --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
download_artifact kibana-default-plugins.tar.gz "${OUTPUT_DIR}/" --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"

echo "--- Adding commit info"
echo "${BUILDKITE_COMMIT}" > "${OUTPUT_DIR}/KIBANA_COMMIT_HASH"
Expand Down
1 change: 0 additions & 1 deletion .buildkite/scripts/steps/scalability/benchmarking.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ download_artifacts() {
tar -xzf "${LATEST_RUN_ARTIFACTS_DIR}/kibana-default.tar.gz" -C "$KIBANA_BUILD_LOCATION" --strip=1

cd "$KIBANA_DIR"
tar -xzf "${LATEST_RUN_ARTIFACTS_DIR}/kibana-default-plugins.tar.gz"
tar -xzf "${LATEST_RUN_ARTIFACTS_DIR}/scalability_traces.tar.gz"
}

Expand Down
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ snapshots.js
/packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/
/packages/kbn-ui-framework/dist
/src/platform/packages/shared/kbn-flot-charts/lib
/packages/kbn-monaco/src/**/antlr
/src/platform/packages/shared/kbn-monaco/src/**/antlr
/src/platform/packages/shared/kbn-esql-ast/src/**/antlr

# Bazel
Expand Down
6 changes: 3 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ packages/kbn-management/storybook/config @elastic/kibana-management
packages/kbn-manifest @elastic/kibana-core
packages/kbn-mock-idp-plugin @elastic/kibana-security
packages/kbn-mock-idp-utils @elastic/kibana-security
packages/kbn-monaco @elastic/appex-sharedux
packages/kbn-openapi-bundler @elastic/security-detection-rule-management
packages/kbn-openapi-generator @elastic/security-detection-rule-management
packages/kbn-optimizer @elastic/kibana-operations
Expand Down Expand Up @@ -230,8 +229,6 @@ packages/serverless/settings/common @elastic/appex-sharedux @elastic/kibana-mana
packages/serverless/settings/observability_project @elastic/appex-sharedux @elastic/kibana-management @elastic/obs-ux-management-team
packages/serverless/storybook/config @elastic/appex-sharedux
packages/serverless/types @elastic/appex-sharedux
packages/shared-ux/code_editor/impl @elastic/appex-sharedux
packages/shared-ux/code_editor/mocks @elastic/appex-sharedux
src/core @elastic/kibana-core
src/core/packages/analytics/browser @elastic/kibana-core
src/core/packages/analytics/browser-internal @elastic/kibana-core
Expand Down Expand Up @@ -501,6 +498,7 @@ src/platform/packages/shared/kbn-management/settings/components/field_row @elast
src/platform/packages/shared/kbn-management/settings/field_definition @elastic/kibana-management
src/platform/packages/shared/kbn-management/settings/types @elastic/kibana-management
src/platform/packages/shared/kbn-management/settings/utilities @elastic/kibana-management
src/platform/packages/shared/kbn-monaco @elastic/appex-sharedux
src/platform/packages/shared/kbn-object-versioning @elastic/appex-sharedux
src/platform/packages/shared/kbn-object-versioning-utils @elastic/appex-sharedux
src/platform/packages/shared/kbn-openapi-common @elastic/security-detection-rule-management
Expand Down Expand Up @@ -570,6 +568,8 @@ src/platform/packages/shared/shared-ux/card/no_data/impl @elastic/appex-sharedux
src/platform/packages/shared/shared-ux/card/no_data/mocks @elastic/appex-sharedux
src/platform/packages/shared/shared-ux/card/no_data/types @elastic/appex-sharedux
src/platform/packages/shared/shared-ux/chrome/navigation @elastic/appex-sharedux
src/platform/packages/shared/shared-ux/code_editor/impl @elastic/appex-sharedux
src/platform/packages/shared/shared-ux/code_editor/mocks @elastic/appex-sharedux
src/platform/packages/shared/shared-ux/error_boundary @elastic/appex-sharedux
src/platform/packages/shared/shared-ux/file/context @elastic/appex-sharedux
src/platform/packages/shared/shared-ux/file/file_picker/impl @elastic/appex-sharedux
Expand Down
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"src/platform/packages/shared/kbn-management",
"packages/kbn-management"
],
"monaco": "packages/kbn-monaco/src",
"monaco": "src/platform/packages/shared/kbn-monaco/src",
"navigation": ["src/platform/plugins/shared/navigation", "packages/solution-nav"],
"links": "src/platform/plugins/private/links",
"newsfeed": "src/platform/plugins/shared/newsfeed",
Expand Down
2 changes: 1 addition & 1 deletion dev_docs/contributing/code_walkthrough.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Contains our two license header texts, one for the Elastic license and one for t

## [packages](https://github.com/elastic/kibana/tree/main/packages)

The packages folder contains a mixture of build-time related code (like the [code needed to build the api docs](https://github.com/elastic/kibana/tree/main/packages/kbn-docs-utils)), as well as static code that some plugins rely on (like the [kbn-monaco package](https://github.com/elastic/kibana/tree/main/packages/kbn-monaco)). <DocLink id="kibPlatformIntro" section="1000-foot-view" text="This document"/> covers how packages differ from plugins.
The packages folder contains a mixture of build-time related code (like the [code needed to build the api docs](https://github.com/elastic/kibana/tree/main/packages/kbn-docs-utils)), as well as static code that some plugins rely on (like the [kbn-monaco package](https://github.com/elastic/kibana/tree/main/src/platform/packages/shared/kbn-monaco)). <DocLink id="kibPlatformIntro" section="1000-foot-view" text="This document"/> covers how packages differ from plugins.

## [plugins](https://github.com/elastic/kibana/tree/main/plugins)

Expand Down
11 changes: 9 additions & 2 deletions docs/user/dashboard/create-visualizations.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Use one of the editors to create visualizations of your data. Each editor offers
| <<add-image,Image>>
| Personalize your dashboard with custom images


| <<dashboard-links,Links>>
| Add links to other dashboards or to external websites

Expand Down Expand Up @@ -276,7 +277,14 @@ For detailed information about writing on GitHub, click *Help* on the top-right
[[add-image]]
== Image panels

To personalize your dashboards, add your own logos and graphics with the *Image* panel. You can upload images from your computer, select previously uploaded images, or add images from an external link.
To personalize your dashboards, add your own logos and graphics with the *Image* panel.

[IMPORTANT]
====
Image uploads are limited to 10 MiB.
====

You can upload images from your computer, select previously uploaded images, or add images from an external link.

. From your dashboard, select *Add panel*.

Expand All @@ -290,7 +298,6 @@ image::images/dashboard_addImageEditor_8.7.0.png[Add image editor]
To manage your uploaded image files, go to the *Files* management page using the navigation menu or the
<<kibana-navigation-search,global search field>>.


[WARNING]
============================================================================
When you export a dashboard, the uploaded image files are not exported.
Expand Down
2 changes: 1 addition & 1 deletion kbn_pm/src/lib/bazel.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const BAZEL_RUNNER_SRC = '../../../packages/kbn-bazel-runner/index.js';
const BAZEL_TARGETS = [
'//src/platform/packages/private/kbn-ui-shared-deps-npm:shared_built_assets',
'//src/platform/packages/private/kbn-ui-shared-deps-src:shared_built_assets',
'//packages/kbn-monaco:target_workers',
'//src/platform/packages/shared/kbn-monaco:target_workers',
];

async function getBazelRunner() {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@
"@kbn/cloud-security-posture-common": "link:x-pack/platform/packages/shared/kbn-cloud-security-posture/common",
"@kbn/cloud-security-posture-graph": "link:x-pack/solutions/security/packages/kbn-cloud-security-posture/graph",
"@kbn/cloud-security-posture-plugin": "link:x-pack/solutions/security/plugins/cloud_security_posture",
"@kbn/code-editor": "link:packages/shared-ux/code_editor/impl",
"@kbn/code-editor-mock": "link:packages/shared-ux/code_editor/mocks",
"@kbn/code-editor": "link:src/platform/packages/shared/shared-ux/code_editor/impl",
"@kbn/code-editor-mock": "link:src/platform/packages/shared/shared-ux/code_editor/mocks",
"@kbn/coloring": "link:src/platform/packages/shared/kbn-coloring",
"@kbn/config": "link:src/platform/packages/shared/kbn-config",
"@kbn/config-mocks": "link:src/platform/packages/private/kbn-config-mocks",
Expand Down Expand Up @@ -681,7 +681,7 @@
"@kbn/ml-ui-actions": "link:x-pack/platform/packages/private/ml/ui_actions",
"@kbn/ml-url-state": "link:x-pack/platform/packages/private/ml/url_state",
"@kbn/ml-validators": "link:x-pack/platform/packages/private/ml/validators",
"@kbn/monaco": "link:packages/kbn-monaco",
"@kbn/monaco": "link:src/platform/packages/shared/kbn-monaco",
"@kbn/monitoring-collection-plugin": "link:x-pack/platform/plugins/private/monitoring_collection",
"@kbn/monitoring-plugin": "link:x-pack/platform/plugins/private/monitoring",
"@kbn/navigation-plugin": "link:src/platform/plugins/shared/navigation",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-plugin-helpers/src/tasks/bazel_packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export async function buildBazelPackages({ log, dist }: TaskContext) {
'build',
'//src/platform/packages/private/kbn-ui-shared-deps-npm:shared_built_assets',
'//src/platform/packages/private/kbn-ui-shared-deps-src:shared_built_assets',
'//packages/kbn-monaco:target_workers',
'//src/platform/packages/shared/kbn-monaco:target_workers',
'--show_result=1',
].concat(dist ? [`--define=dist=true`] : []),
{
Expand Down
2 changes: 1 addition & 1 deletion src/dev/build/tasks/build_packages_task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const BuildPackages: Task = {
'build',
'//src/platform/packages/private/kbn-ui-shared-deps-npm:shared_built_assets',
'//src/platform/packages/private/kbn-ui-shared-deps-src:shared_built_assets',
'//packages/kbn-monaco:target_workers',
'//src/platform/packages/shared/kbn-monaco:target_workers',
'--show_result=1',
'--define=dist=true',
],
Expand Down
2 changes: 1 addition & 1 deletion src/platform/packages/private/kbn-esql-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Contains the editor for text based languages. Specifically for:
---

Contains the ESQL editor with the autocomplete and the autosuggest functionality (based on atlr).
The antlr code can be found in packages/kbn-monaco/src/esql
The antlr code can be found in src/platform/packages/shared/kbn-monaco/src/esql

A **monaco** based editor that is part of the unified search experience. It is rendered for all the applications that support text-based languages.
In order to enable text based languages on your unified search bar add `textBasedLanguages: ['ESQL', '...']` to the dataViewPicker properties.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ webpack_cli(
"//src/platform/packages/shared/kbn-i18n-react",
"//src/platform/packages/shared/kbn-ebt-tools",
"//src/platform/packages/shared/kbn-esql-ast",
"//packages/kbn-monaco",
"//src/platform/packages/shared/kbn-monaco",
"//src/platform/packages/shared/kbn-datemath",
"//src/platform/packages/shared/kbn-analytics",
"//src/platform/packages/shared/kbn-crypto-browser",
Expand All @@ -38,7 +38,7 @@ webpack_cli(
"//packages/kbn-peggy-loader",
"//src/platform/packages/shared/shared-ux/error_boundary",
"//src/platform/packages/shared/kbn-rison",
"//packages/shared-ux/code_editor/impl:code_editor",
"//src/platform/packages/shared/shared-ux/code_editor/impl:code_editor",
"//packages/react/kibana_context/common",
"//packages/react/kibana_context/root",
"//packages/react/kibana_context/render",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

module.exports = {
preset: '@kbn/test',
rootDir: '../..',
roots: ['<rootDir>/packages/kbn-monaco'],
rootDir: '../../../../..',
roots: ['<rootDir>/src/platform/packages/shared/kbn-monaco'],
};
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('ESQL Theme', () => {
const theme = buildESQLTheme(mockTheme);

// These names aren't from the lexer... they are added on our side
// see packages/kbn-monaco/src/esql/lib/esql_token_helpers.ts
// see src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_token_helpers.ts
const syntheticNames = ['functions', 'nulls_order', 'timespan_literal'];

const rulesWithNoName: string[] = [];
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"extends": "../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

module.exports = {
preset: '@kbn/test',
rootDir: '../../../..',
roots: ['<rootDir>/packages/shared-ux/code_editor'],
rootDir: '../../../../../../..',
roots: ['<rootDir>/src/platform/packages/shared/shared-ux/code_editor'],
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
Expand All @@ -13,7 +13,7 @@
"include": [
"**/*.ts",
"**/*.tsx",
"../../../../typings/**/*",
"../../../../../../../typings/**/*",
],
"exclude": [
"target/**/*"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../../../tsconfig.base.json",
"extends": "../../../../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
Expand All @@ -13,7 +13,7 @@
"include": [
"**/*.ts",
"**/*.tsx",
"../../../../typings/**/*",
"../../../../../../../typings/**/*",
],
"exclude": [
"target/**/*",
Expand Down
2 changes: 1 addition & 1 deletion src/platform/plugins/shared/console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ POST /_some_endpoint
```

## Architecture
Console uses Monaco editor that is wrapped with [`kbn-monaco`](https://github.com/elastic/kibana/blob/main/packages/kbn-monaco/index.ts), so that if needed it can easily be replaced with another editor.
Console uses Monaco editor that is wrapped with [`kbn-monaco`](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-monaco/index.ts), so that if needed it can easily be replaced with another editor.
The autocomplete logic is located in [`autocomplete`](https://github.com/elastic/kibana/blob/main/src/platform/plugins/shared/console/public/lib/autocomplete) folder. Autocomplete rules are computed by classes in `components` sub-folder.

## Autocomplete definitions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"filter_path": [],
"human": "__flag__",
"pretty": "__flag__",
"list_executed_pipelines": "__flag__",
"pipeline": "",
"refresh": [
"true",
Expand All @@ -25,7 +26,8 @@
"all",
"index-setting"
],
"require_alias": "__flag__"
"require_alias": "__flag__",
"require_data_stream": "__flag__"
},
"methods": [
"POST",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"total_feature_importance",
"definition_status"
],
"include_model_definition": "__flag__",
"size": [
"100"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@
"error_trace": "__flag__",
"filter_path": [],
"human": "__flag__",
"pretty": "__flag__"
"pretty": "__flag__",
"allow_no_indices": "__flag__",
"expand_wildcards": [
"all",
"open",
"closed",
"hidden",
"none"
],
"ignore_throttled": "__flag__",
"ignore_unavailable": "__flag__"
},
"methods": [
"PUT"
Expand Down
4 changes: 2 additions & 2 deletions test/functional/services/monaco_editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class MonacoEditorService extends FtrService {
await this.retry.try(async () => {
values = await this.browser.execute(
() =>
// @ts-expect-error this value is provided in @kbn/monaco for this specific purpose, see {@link packages/kbn-monaco/src/register_globals.ts}
// @ts-expect-error this value is provided in @kbn/monaco for this specific purpose, see {@link src/platform/packages/shared/kbn-monaco/src/register_globals.ts}
(window.MonacoEnvironment?.monaco.editor as typeof monaco.editor)
.getModels()
.map((model: any) => model.getValue()) as string[]
Expand All @@ -48,7 +48,7 @@ export class MonacoEditorService extends FtrService {
await this.retry.try(async () => {
await this.browser.execute(
(editorIndex, codeEditorValue) => {
// @ts-expect-error this value is provided in @kbn/monaco for this specific purpose, see {@link packages/kbn-monaco/src/register_globals.ts}
// @ts-expect-error this value is provided in @kbn/monaco for this specific purpose, see {@link src/platform/packages/shared/kbn-monaco/src/register_globals.ts}
const editor = window.MonacoEnvironment?.monaco.editor as typeof monaco.editor;
const textModels = editor.getModels();

Expand Down
12 changes: 6 additions & 6 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,10 @@
"@kbn/cloud-security-posture-graph/*": ["x-pack/solutions/security/packages/kbn-cloud-security-posture/graph/*"],
"@kbn/cloud-security-posture-plugin": ["x-pack/solutions/security/plugins/cloud_security_posture"],
"@kbn/cloud-security-posture-plugin/*": ["x-pack/solutions/security/plugins/cloud_security_posture/*"],
"@kbn/code-editor": ["packages/shared-ux/code_editor/impl"],
"@kbn/code-editor/*": ["packages/shared-ux/code_editor/impl/*"],
"@kbn/code-editor-mock": ["packages/shared-ux/code_editor/mocks"],
"@kbn/code-editor-mock/*": ["packages/shared-ux/code_editor/mocks/*"],
"@kbn/code-editor": ["src/platform/packages/shared/shared-ux/code_editor/impl"],
"@kbn/code-editor/*": ["src/platform/packages/shared/shared-ux/code_editor/impl/*"],
"@kbn/code-editor-mock": ["src/platform/packages/shared/shared-ux/code_editor/mocks"],
"@kbn/code-editor-mock/*": ["src/platform/packages/shared/shared-ux/code_editor/mocks/*"],
"@kbn/code-owners": ["packages/kbn-code-owners"],
"@kbn/code-owners/*": ["packages/kbn-code-owners/*"],
"@kbn/coloring": ["src/platform/packages/shared/kbn-coloring"],
Expand Down Expand Up @@ -1296,8 +1296,8 @@
"@kbn/mock-idp-plugin/*": ["packages/kbn-mock-idp-plugin/*"],
"@kbn/mock-idp-utils": ["packages/kbn-mock-idp-utils"],
"@kbn/mock-idp-utils/*": ["packages/kbn-mock-idp-utils/*"],
"@kbn/monaco": ["packages/kbn-monaco"],
"@kbn/monaco/*": ["packages/kbn-monaco/*"],
"@kbn/monaco": ["src/platform/packages/shared/kbn-monaco"],
"@kbn/monaco/*": ["src/platform/packages/shared/kbn-monaco/*"],
"@kbn/monitoring-collection-plugin": ["x-pack/platform/plugins/private/monitoring_collection"],
"@kbn/monitoring-collection-plugin/*": ["x-pack/platform/plugins/private/monitoring_collection/*"],
"@kbn/monitoring-plugin": ["x-pack/platform/plugins/private/monitoring"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
createTargetIndex,
extractDocumentation,
indexDocuments,
installElser,
createChunkFiles,
createArtifact,
cleanupFolders,
Expand Down Expand Up @@ -68,9 +67,6 @@ export const buildArtifacts = async (config: TaskConfig) => {

await cleanupFolders({ folders: [config.buildFolder] });

log.info('Ensuring ELSER is installed on the embedding cluster');
await installElser({ client: embeddingClient });

for (const productName of config.productNames) {
await buildArtifact({
productName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
import type { Client } from '@elastic/elasticsearch';
import type { MappingTypeMapping } from '@elastic/elasticsearch/lib/api/types';

const DEFAULT_ELSER = '.elser-2-elasticsearch';

const mappings: MappingTypeMapping = {
dynamic: 'strict',
properties: {
content_title: { type: 'text' },
content_body: {
type: 'semantic_text',
inference_id: 'kibana-elser2',
inference_id: DEFAULT_ELSER,
},
product_name: { type: 'keyword' },
root_type: { type: 'keyword' },
Expand All @@ -24,11 +26,11 @@ const mappings: MappingTypeMapping = {
ai_subtitle: { type: 'text' },
ai_summary: {
type: 'semantic_text',
inference_id: 'kibana-elser2',
inference_id: DEFAULT_ELSER,
},
ai_questions_answered: {
type: 'semantic_text',
inference_id: 'kibana-elser2',
inference_id: DEFAULT_ELSER,
},
ai_tags: { type: 'keyword' },
},
Expand Down
Loading

0 comments on commit 3ee9768

Please sign in to comment.