Skip to content

Commit

Permalink
Merge branch '8.x' into backport/8.x/pr-202774
Browse files Browse the repository at this point in the history
  • Loading branch information
jeramysoucy authored Dec 5, 2024
2 parents cd62649 + c4c00af commit 5db0758
Show file tree
Hide file tree
Showing 413 changed files with 9,462 additions and 4,350 deletions.
3 changes: 3 additions & 0 deletions .buildkite/ftr_platform_stateful_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ disabled:
# Default http2 config to use for performance journeys
- x-pack/performance/configs/http2_config.ts

# Gen AI suites, running with their own pipeline
- x-pack/test/functional_gen_ai/inference/config.ts

defaultQueue: 'n2-4-spot'
enabled:
- test/accessibility/config.ts
Expand Down
22 changes: 22 additions & 0 deletions .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,28 @@ steps:
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/test/ftr_configs.sh
env:
FTR_CONFIG: "x-pack/test/functional_gen_ai/inference/config.ts"
FTR_CONFIG_GROUP_KEY: 'ftr-ai-infra-gen-ai-inference-api'
FTR_GEN_AI: "1"
label: AppEx AI-Infra Inference APIs FTR tests
key: ai-infra-gen-ai-inference-api
timeout_in_minutes: 50
parallelism: 1
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-4
preemptible: true
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1

- command: .buildkite/scripts/steps/functional/security_serverless_explore.sh
label: 'Serverless Explore - Security Solution Cypress Tests'
agents:
Expand Down
30 changes: 30 additions & 0 deletions .buildkite/pipelines/pull_request/ai_infra_gen_ai.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
steps:
- group: AppEx AI-Infra genAI tests
key: ai-infra-gen-ai
depends_on:
- build
- quick_checks
- checks
- linting
- linting_with_types
- check_types
- check_oas_snapshot
steps:
- command: .buildkite/scripts/steps/test/ftr_configs.sh
env:
FTR_CONFIG: "x-pack/test/functional_gen_ai/inference/config.ts"
FTR_CONFIG_GROUP_KEY: 'ftr-ai-infra-gen-ai-inference-api'
FTR_GEN_AI: "1"
label: AppEx AI-Infra Inference APIs FTR tests
key: ai-infra-gen-ai-inference-api
timeout_in_minutes: 50
parallelism: 1
agents:
machineType: n2-standard-4
preemptible: true
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1
8 changes: 8 additions & 0 deletions .buildkite/scripts/common/setup_job_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ EOF
export ELASTIC_APM_API_KEY
}

# Set up GenAI keys
{
if [[ "${FTR_GEN_AI:-}" =~ ^(1|true)$ ]]; then
echo "FTR_GEN_AI was set - exposing LLM connectors"
export KIBANA_TESTING_AI_CONNECTORS="$(vault_get ai-infra-ci-connectors connectors-config)"
fi
}

# Set up GCS Service Account for CDN
{
GCS_SA_CDN_KEY="$(vault_get gcs-sa-cdn-prod key)"
Expand Down
38 changes: 32 additions & 6 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,33 +113,59 @@ const getPipeline = (filename: string, removeSteps = true) => {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/fleet_cypress.yml'));
}

if (await doAnyChangesMatch([/^x-pack\/plugins\/observability_solution\/exploratory_view/])) {
if (
(await doAnyChangesMatch([/^x-pack\/plugins\/observability_solution\/exploratory_view/])) ||
GITHUB_PR_LABELS.includes('ci:synthetics-runner-suites')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/exploratory_view_plugin.yml'));
}

if (
await doAnyChangesMatch([
(await doAnyChangesMatch([
/^x-pack\/plugins\/observability_solution\/synthetics/,
/^x-pack\/plugins\/observability_solution\/exploratory_view/,
])
])) ||
GITHUB_PR_LABELS.includes('ci:synthetics-runner-suites')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/synthetics_plugin.yml'));
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/uptime_plugin.yml'));
}

if (
await doAnyChangesMatch([
(await doAnyChangesMatch([
/^x-pack\/plugins\/observability_solution\/ux/,
/^x-pack\/plugins\/observability_solution\/exploratory_view/,
])
])) ||
GITHUB_PR_LABELS.includes('ci:synthetics-runner-suites')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/ux_plugin_e2e.yml'));
}

if (await doAnyChangesMatch([/^x-pack\/plugins\/observability_solution/])) {
if (
(await doAnyChangesMatch([
/^x-pack\/plugins\/observability_solution/,
/^package.json/,
/^yarn.lock/,
])) ||
GITHUB_PR_LABELS.includes('ci:synthetics-runner-suites')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/slo_plugin_e2e.yml'));
}

if (
(await doAnyChangesMatch([
/^x-pack\/packages\/ai-infra/,
/^x-pack\/plugins\/ai_infra/,
/^x-pack\/plugins\/inference/,
/^x-pack\/plugins\/stack_connectors\/server\/connector_types\/bedrock/,
/^x-pack\/plugins\/stack_connectors\/server\/connector_types\/gemini/,
/^x-pack\/plugins\/stack_connectors\/server\/connector_types\/openai/,
])) ||
GITHUB_PR_LABELS.includes('ci:all-gen-ai-suites')
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/ai_infra_gen_ai.yml'));
}

if (
GITHUB_PR_LABELS.includes('ci:deploy-cloud') ||
GITHUB_PR_LABELS.includes('ci:cloud-deploy') ||
Expand Down
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ packages/kbn-ftr-common-functional-services @elastic/kibana-operations @elastic/
packages/kbn-ftr-common-functional-ui-services @elastic/appex-qa
packages/kbn-ftr-screenshot-filename @elastic/kibana-operations @elastic/appex-qa
x-pack/test/functional_with_es_ssl/plugins/cases @elastic/response-ops
packages/kbn-gen-ai-functional-testing @elastic/appex-ai-infra
x-pack/examples/gen_ai_streaming_response_example @elastic/response-ops
packages/kbn-generate @elastic/kibana-operations
packages/kbn-generate-console-definitions @elastic/kibana-management
Expand Down Expand Up @@ -1414,6 +1415,7 @@ x-pack/test/**/deployment_agnostic/ @elastic/appex-qa #temporarily to monitor te

# AppEx AI Infra
/x-pack/plugins/inference @elastic/appex-ai-infra @elastic/obs-ai-assistant @elastic/security-generative-ai
/x-pack/test/functional_gen_ai/inference @elastic/appex-ai-infra

# AppEx Platform Services Security
x-pack/test_serverless/api_integration/test_suites/common/security_response_headers.ts @elastic/kibana-security
Expand Down
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"@types/react": "~18.2.0",
"@types/react-dom": "~18.2.0",
"@xstate5/react/**/xstate": "^5.18.1",
"globby/fast-glob": "^3.2.11"
"globby/fast-glob": "^3.3.2"
},
"dependencies": {
"@appland/sql-parser": "^1.5.1",
Expand Down Expand Up @@ -1030,7 +1030,7 @@
"@langchain/google-vertexai": "^0.1.0",
"@langchain/langgraph": "0.2.19",
"@langchain/openai": "^0.3.11",
"@langtrase/trace-attributes": "^3.0.8",
"@langtrase/trace-attributes": "^7.5.0",
"@launchdarkly/node-server-sdk": "^9.7.2",
"@launchdarkly/openfeature-node-server": "^1.0.0",
"@loaders.gl/core": "^3.4.7",
Expand All @@ -1057,12 +1057,12 @@
"@reduxjs/toolkit": "1.9.7",
"@slack/webhook": "^7.0.1",
"@smithy/eventstream-codec": "^3.1.1",
"@smithy/eventstream-serde-node": "^3.0.3",
"@smithy/eventstream-serde-node": "^3.0.12",
"@smithy/middleware-stack": "^3.0.10",
"@smithy/node-http-handler": "^3.3.1",
"@smithy/protocol-http": "^4.1.7",
"@smithy/signature-v4": "^3.1.1",
"@smithy/types": "^3.2.0",
"@smithy/signature-v4": "^4.2.3",
"@smithy/types": "^3.7.1",
"@smithy/util-utf8": "^3.0.0",
"@tanstack/react-query": "^4.29.12",
"@tanstack/react-query-devtools": "^4.29.12",
Expand All @@ -1081,8 +1081,8 @@
"@xyflow/react": "^12.3.2",
"adm-zip": "^0.5.9",
"ai": "^2.2.33",
"ajv": "^8.12.0",
"ansi-regex": "^6.0.1",
"ajv": "^8.17.1",
"ansi-regex": "^6.1.0",
"antlr4": "^4.13.1-patch-1",
"archiver": "^7.0.1",
"async": "^3.2.3",
Expand Down Expand Up @@ -1129,7 +1129,7 @@
"dotenv": "^16.4.5",
"elastic-apm-node": "^4.7.3",
"email-addresses": "^5.0.0",
"eventsource-parser": "^1.1.1",
"eventsource-parser": "^3.0.0",
"execa": "^5.1.1",
"expiry-js": "0.1.7",
"exponential-backoff": "^3.1.1",
Expand All @@ -1147,7 +1147,7 @@
"getos": "^3.1.0",
"globby": "^11.1.0",
"google-auth-library": "^9.10.0",
"gpt-tokenizer": "^2.1.2",
"gpt-tokenizer": "^2.6.2",
"handlebars": "4.7.8",
"he": "^1.2.0",
"history": "^4.9.0",
Expand Down Expand Up @@ -1175,7 +1175,7 @@
"jsts": "^1.6.2",
"kea": "^2.6.0",
"langchain": "^0.3.5",
"langsmith": "^0.2.3",
"langsmith": "^0.2.5",
"launchdarkly-js-client-sdk": "^3.5.0",
"load-json-file": "^6.2.0",
"lodash": "^4.17.21",
Expand Down Expand Up @@ -1204,7 +1204,7 @@
"nunjucks": "^3.2.4",
"object-hash": "^1.3.1",
"object-path-immutable": "^3.1.1",
"openai": "^4.68.0",
"openai": "^4.72.0",
"openpgp": "5.10.1",
"opn": "^5.5.0",
"ora": "^4.0.4",
Expand Down Expand Up @@ -1452,6 +1452,7 @@
"@kbn/ftr-common-functional-services": "link:packages/kbn-ftr-common-functional-services",
"@kbn/ftr-common-functional-ui-services": "link:packages/kbn-ftr-common-functional-ui-services",
"@kbn/ftr-screenshot-filename": "link:packages/kbn-ftr-screenshot-filename",
"@kbn/gen-ai-functional-testing": "link:packages/kbn-gen-ai-functional-testing",
"@kbn/generate": "link:packages/kbn-generate",
"@kbn/get-repo-files": "link:packages/kbn-get-repo-files",
"@kbn/import-locator": "link:packages/kbn-import-locator",
Expand Down Expand Up @@ -1591,7 +1592,7 @@
"@types/js-search": "^1.4.0",
"@types/js-yaml": "^3.11.1",
"@types/jsdom": "^20.0.1",
"@types/json-schema": "^7",
"@types/json-schema": "^7.0.15",
"@types/json-stable-stringify": "^1.0.32",
"@types/json5": "^2.2.0",
"@types/jsonwebtoken": "^9.0.0",
Expand Down Expand Up @@ -1835,7 +1836,7 @@
"svgo": "^2.8.0",
"swagger-jsdoc": "^6.2.8",
"swagger-ui-express": "^5.0.1",
"table": "^6.8.1",
"table": "^6.8.2",
"tape": "^5.0.1",
"terser": "^5.31.6",
"terser-webpack-plugin": "^4.2.3",
Expand Down
8 changes: 7 additions & 1 deletion packages/kbn-esql-editor/src/editor_footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,13 @@ export const EditorFooter = memo(function EditorFooter({
/>
)}
<EuiFlexItem grow={false}>
<EuiButtonIcon iconType="documentation" onClick={toggleLanguageComponent} />
<EuiButtonIcon
iconType="documentation"
onClick={toggleLanguageComponent}
aria-label={i18n.translate('esqlEditor.query.documentationAriaLabel', {
defaultMessage: 'Open documentation',
})}
/>
</EuiFlexItem>
</EuiFlexGroup>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,84 @@ const atan2Definition: FunctionDefinition = {
examples: ['ROW y=12.9, x=.6\n| EVAL atan2=ATAN2(y, x)'],
};

// Do not edit this manually... generated by scripts/generate_function_definitions.ts
const bitLengthDefinition: FunctionDefinition = {
type: 'eval',
name: 'bit_length',
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.bit_length', {
defaultMessage: 'Returns the bit length of a string.',
}),
preview: false,
alias: undefined,
signatures: [
{
params: [
{
name: 'string',
type: 'keyword',
optional: false,
},
],
returnType: 'integer',
},
{
params: [
{
name: 'string',
type: 'text',
optional: false,
},
],
returnType: 'integer',
},
],
supportedCommands: ['stats', 'inlinestats', 'metrics', 'eval', 'where', 'row', 'sort'],
supportedOptions: ['by'],
validate: undefined,
examples: [
'FROM airports\n| WHERE country == "India"\n| KEEP city\n| EVAL fn_length = LENGTH(city), fn_bit_length = BIT_LENGTH(city)',
],
};

// Do not edit this manually... generated by scripts/generate_function_definitions.ts
const byteLengthDefinition: FunctionDefinition = {
type: 'eval',
name: 'byte_length',
description: i18n.translate('kbn-esql-validation-autocomplete.esql.definitions.byte_length', {
defaultMessage: 'Returns the byte length of a string.',
}),
preview: false,
alias: undefined,
signatures: [
{
params: [
{
name: 'string',
type: 'keyword',
optional: false,
},
],
returnType: 'integer',
},
{
params: [
{
name: 'string',
type: 'text',
optional: false,
},
],
returnType: 'integer',
},
],
supportedCommands: ['stats', 'inlinestats', 'metrics', 'eval', 'where', 'row', 'sort'],
supportedOptions: ['by'],
validate: undefined,
examples: [
'FROM airports\n| WHERE country == "India"\n| KEEP city\n| EVAL fn_length = LENGTH(city), fn_byte_length = BYTE_LENGTH(city)',
],
};

// Do not edit this manually... generated by scripts/generate_function_definitions.ts
const categorizeDefinition: FunctionDefinition = {
type: 'eval',
Expand Down Expand Up @@ -2757,7 +2835,9 @@ const lengthDefinition: FunctionDefinition = {
supportedCommands: ['stats', 'inlinestats', 'metrics', 'eval', 'where', 'row', 'sort'],
supportedOptions: ['by'],
validate: undefined,
examples: ['FROM employees\n| KEEP first_name, last_name\n| EVAL fn_length = LENGTH(first_name)'],
examples: [
'FROM airports\n| WHERE country == "India"\n| KEEP city\n| EVAL fn_length = LENGTH(city)',
],
};

// Do not edit this manually... generated by scripts/generate_function_definitions.ts
Expand Down Expand Up @@ -9551,6 +9631,8 @@ export const scalarFunctionDefinitions = [
asinDefinition,
atanDefinition,
atan2Definition,
bitLengthDefinition,
byteLengthDefinition,
categorizeDefinition,
cbrtDefinition,
ceilDefinition,
Expand Down
Loading

0 comments on commit 5db0758

Please sign in to comment.