Skip to content

Commit fc230a9

Browse files
authored
Merge branch 'main' into main
2 parents ba8444d + ec9aa8d commit fc230a9

58 files changed

Lines changed: 1466 additions & 284 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.buildkite/pipelines/quality-gates/emergency/pipeline.tests-production.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
# A failure in this pipeline build will prevent further progression to the subsequent stage.
44

55
steps:
6-
- label: ":kibana: SLO check"
6+
- label: ":kibana: SLO check (60 minutes)"
77
trigger: "serverless-quality-gates" # https://buildkite.com/elastic/serverless-quality-gates
88
build:
99
message: "${BUILDKITE_MESSAGE} (triggered by pipeline.tests-production.yaml)"
1010
env:
1111
TARGET_ENV: production
1212
CHECK_SLO: true
1313
CHECK_SLO_TAG: kbn-quality-gate
14-
CHECK_SLO_WAITING_PERIOD: 15m
14+
CHECK_SLO_WAITING_PERIOD: 60m
1515
CHECK_SLO_BURN_RATE_THRESHOLD: 0.1
1616
DEPLOYMENT_SLICES: ${DEPLOYMENT_SLICES:-""}
1717
soft_fail: true
@@ -27,14 +27,14 @@ steps:
2727
CHECK_SYNTHETICS: true
2828
CHECK_SYNTHETICS_TAG: serverless-platform-core-validation
2929

30-
- label: ":cookie: 24h bake time before continuing promotion"
30+
- label: ":cookie: 20h bake time before continuing promotion"
3131
if: build.env("ENVIRONMENT") == "production-canary"
32-
command: "sleep 86400"
32+
command: "sleep 72000"
3333
soft_fail:
3434
# A manual cancel of that step produces return code 255.
3535
# We're treating this case as a soft fail to allow manual bake time skipping.
3636
# To stop the promotion entirely, instead click the "Cancel" button at the top of the page
3737
- exit_status: 255
3838
agents:
39-
# How long can this agent live for in minutes - 25 hours
40-
instanceMaxAge: 1500
39+
# How long can this agent live for in minutes - 21 hours
40+
instanceMaxAge: 1260

.buildkite/pipelines/quality-gates/pipeline.tests-production.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
# A failure in this pipeline build will prevent further progression to the subsequent stage.
44

55
steps:
6-
- label: ":kibana: SLO check"
6+
- label: ":kibana: SLO check (60 minutes)"
77
trigger: "serverless-quality-gates" # https://buildkite.com/elastic/serverless-quality-gates
88
build:
99
message: "${BUILDKITE_MESSAGE} (triggered by pipeline.tests-production.yaml)"
1010
env:
1111
TARGET_ENV: production
1212
CHECK_SLO: true
1313
CHECK_SLO_TAG: kbn-quality-gate
14-
CHECK_SLO_WAITING_PERIOD: 15m
14+
CHECK_SLO_WAITING_PERIOD: 60m
1515
CHECK_SLO_BURN_RATE_THRESHOLD: 0.1
1616
DEPLOYMENT_SLICES: ${DEPLOYMENT_SLICES:-""}
1717
soft_fail: true
@@ -27,14 +27,14 @@ steps:
2727
CHECK_SYNTHETICS: true
2828
CHECK_SYNTHETICS_TAG: serverless-platform-core-validation
2929

30-
- label: ":cookie: 24h bake time before continuing promotion"
30+
- label: ":cookie: 20h bake time before continuing promotion"
3131
if: build.env("ENVIRONMENT") == "production-canary"
32-
command: "sleep 86400"
32+
command: "sleep 72000"
3333
soft_fail:
3434
# A manual cancel of that step produces return code 255.
3535
# We're treating this case as a soft fail to allow manual bake time skipping.
3636
# To stop the promotion entirely, instead click the "Cancel" button at the top of the page
3737
- exit_status: 255
3838
agents:
39-
# How long can this agent live for in minutes - 25 hours
40-
instanceMaxAge: 1500
39+
# How long can this agent live for in minutes - 21 hours
40+
instanceMaxAge: 1260

src/platform/packages/private/kbn-code-owners/src/code_owner_areas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const CODE_OWNER_AREA_MAPPINGS: { [area in CodeOwnerArea]: string[] } = {
5151
'elastic/stack-monitoring',
5252
'elastic/workflows-eng',
5353
],
54-
search: ['elastic/search-design', 'elastic/search-kibana'],
54+
search: ['elastic/jinastic', 'elastic/search-design', 'elastic/search-kibana'],
5555
observability: [
5656
'elastic/actionable-obs-team',
5757
'elastic/obs-ai-team',

src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/core_fixtures.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,9 @@ export const coreWorkerFixtures = base.extend<{}, CoreWorkerFixtures>({
253253
return { cookieValue, cookieHeader };
254254
};
255255

256-
// TODO: rely on global setting before https://github.com/elastic/kibana/issues/248983
257-
// Hide announcements (e.g. tours) in the default space
258-
await kbnClient.uiSettings.update({ hideAnnouncements: true });
256+
// Hide the announcements (including the sidenav tour) in advance to prevent
257+
// it from interfering with test flows
258+
await kbnClient.uiSettings.updateGlobal({ hideAnnouncements: true });
259259

260260
await use({
261261
session,

src/platform/packages/shared/kbn-scout/src/playwright/fixtures/scope/worker/scout_space/parallel.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@ export const scoutSpaceParallelFixture = coreWorkerFixtures.extend<
126126
setDefaultTime,
127127
};
128128

129-
// TODO: rely on global setting before https://github.com/elastic/kibana/issues/248983
130-
// Hide announcements (e.g. tours) in the current space
131-
await kbnClient.uiSettings.update({ hideAnnouncements: true }, { space: spaceId });
132-
133129
log.serviceMessage('scoutSpace', `New Kibana space '${spaceId}' created`);
134130
await use({ savedObjects, uiSettings, id: spaceId });
135131

src/platform/packages/shared/kbn-test/src/kbn_client/kbn_client_ui_settings.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,22 @@ export class KbnClientUiSettings {
100100
});
101101
}
102102

103+
/**
104+
* Update UI settings globally (like setting 'hideAnnouncements', 'theme:darkMode', etc)
105+
*/
106+
async updateGlobal(updates: UiSettingValues) {
107+
this.log.debug('applying global update to kibana config: %j', updates);
108+
109+
await this.requester.request({
110+
path: `/internal/kibana/global_settings`,
111+
method: 'POST',
112+
body: {
113+
changes: updates,
114+
},
115+
retries: 3,
116+
});
117+
}
118+
103119
private async getAll({ space }: { space?: string } = {}) {
104120
const { data } = await this.requester.request<UiSettingsApiResponse>({
105121
path: pathWithSpace(space)`/internal/kibana/settings`,

src/platform/plugins/shared/workflows_execution_engine/server/connector_executor.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
// TODO: Remove eslint exceptions comments and fix the issues
1111
/* eslint-disable @typescript-eslint/no-explicit-any */
1212

13-
import { validate as validateUuid } from 'uuid';
1413
import type { ActionTypeExecutorResult } from '@kbn/actions-plugin/common';
1514
import type { ActionsClient } from '@kbn/actions-plugin/server';
1615
import type { ConnectorWithExtraFindData } from '@kbn/actions-plugin/server/application/connector/types';
@@ -59,18 +58,14 @@ export class ConnectorExecutor {
5958
}
6059

6160
private async resolveConnectorId(connectorName: string, spaceId: string): Promise<string> {
62-
if (validateUuid(connectorName)) {
63-
return connectorName;
64-
}
65-
6661
const allConnectors = await (this.actionsClient as ActionsClient).getAll();
6762

6863
const connector = allConnectors.find(
69-
(c: ConnectorWithExtraFindData) => c.name === connectorName
64+
(c: ConnectorWithExtraFindData) => c.name === connectorName || c.id === connectorName
7065
);
7166

7267
if (!connector) {
73-
throw new Error(`Connector with name ${connectorName} not found`);
68+
throw new Error(`Connector ${connectorName} not found`);
7469
}
7570

7671
return connector.id;
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the "Elastic License
4+
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5+
* Public License v 1"; you may not use this file except in compliance with, at
6+
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7+
* License v3.0 only", or the "Server Side Public License, v 1".
8+
*/
9+
10+
import { z } from '@kbn/zod/v4';
11+
import type { CommonStepDefinition } from '../../step_registry/types';
12+
13+
/**
14+
* Step type ID for the AI summarize step.
15+
*/
16+
export const AiSummarizeStepTypeId = 'ai.summarize';
17+
18+
export const ConfigSchema = z.object({
19+
'connector-id': z.string().optional(),
20+
});
21+
22+
/**
23+
* Input schema for the AI summarize step.
24+
*/
25+
export const InputSchema = z.object({
26+
input: z.union([z.string(), z.array(z.unknown()), z.record(z.string(), z.unknown())]),
27+
instructions: z.string().optional(),
28+
maxLength: z.number().int().positive().optional(),
29+
temperature: z.number().min(0).max(1).optional(),
30+
});
31+
32+
/**
33+
* Output schema for the AI summarize step.
34+
*/
35+
export const OutputSchema = z.object({
36+
content: z.string(),
37+
metadata: z.record(z.string(), z.any()).optional(),
38+
});
39+
40+
export type AiSummarizeStepConfigSchema = typeof ConfigSchema;
41+
export type AiSummarizeStepInputSchema = typeof InputSchema;
42+
export type AiSummarizeStepOutputSchema = typeof OutputSchema;
43+
44+
/**
45+
* Common step definition for AI summarize step.
46+
* This is shared between server and public implementations.
47+
* Input and output types are automatically inferred from the schemas.
48+
*/
49+
export const AiSummarizeStepCommonDefinition: CommonStepDefinition<
50+
AiSummarizeStepInputSchema,
51+
AiSummarizeStepOutputSchema,
52+
AiSummarizeStepConfigSchema
53+
> = {
54+
id: AiSummarizeStepTypeId,
55+
inputSchema: InputSchema,
56+
outputSchema: OutputSchema,
57+
configSchema: ConfigSchema,
58+
};

src/platform/plugins/shared/workflows_extensions/common/steps/ai/index.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,21 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10+
export {
11+
AiPromptStepCommonDefinition,
12+
AiPromptStepTypeId,
13+
type AiPromptStepInputSchema,
14+
type AiPromptStepOutputSchema,
15+
} from './ai_prompt_step';
16+
17+
export {
18+
AiSummarizeStepCommonDefinition,
19+
AiSummarizeStepTypeId,
20+
type AiSummarizeStepConfigSchema,
21+
type AiSummarizeStepInputSchema,
22+
type AiSummarizeStepOutputSchema,
23+
} from './ai_summarize_step';
24+
1025
export * from './ai_prompt_step';
1126
export {
1227
AiClassifyStepCommonDefinition,
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the "Elastic License
4+
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5+
* Public License v 1"; you may not use this file except in compliance with, at
6+
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7+
* License v3.0 only", or the "Server Side Public License, v 1".
8+
*/
9+
10+
import React from 'react';
11+
import { i18n } from '@kbn/i18n';
12+
import { AiSummarizeStepCommonDefinition, AiSummarizeStepTypeId } from '../../../common/steps/ai';
13+
import { ActionsMenuGroup, type PublicStepDefinition } from '../../step_registry/types';
14+
15+
export const AiSummarizeStepDefinition: PublicStepDefinition = {
16+
...AiSummarizeStepCommonDefinition,
17+
icon: React.lazy(() =>
18+
import('@elastic/eui/es/components/icon/assets/sparkles').then(({ icon }) => ({
19+
default: icon,
20+
}))
21+
),
22+
label: i18n.translate('workflowsExtensionsExample.AiSummarizeStep.label', {
23+
defaultMessage: 'AI Summarize',
24+
}),
25+
description: i18n.translate('workflowsExtensionsExample.AiSummarizeStep.description', {
26+
defaultMessage: 'Generates a summary of the provided content using AI',
27+
}),
28+
actionsMenuGroup: ActionsMenuGroup.ai,
29+
documentation: {
30+
details: i18n.translate('workflowsExtensionsExample.AiSummarizeStep.documentation.details', {
31+
defaultMessage: `The ${AiSummarizeStepTypeId} step generates a concise summary of the provided content using an AI connector. The summary can be referenced in later steps using template syntax.`,
32+
values: { templateSyntax: '`{{ steps.stepName.output }}`' },
33+
}),
34+
examples: [
35+
`## Basic Summarization
36+
\`\`\`yaml
37+
- name: summarize_logs
38+
type: ${AiSummarizeStepTypeId}
39+
with:
40+
input: "{{ steps.fetch_logs.output }}"
41+
\`\`\`
42+
The default AI connector configured for the workflow will be used.`,
43+
44+
`## Data Summarization
45+
\`\`\`yaml
46+
- name: summarize_alerts
47+
type: ${AiSummarizeStepTypeId}
48+
with:
49+
input: "{{ steps.fetch_alerts.output }}"
50+
\`\`\`
51+
Supports objects and arrays as input.`,
52+
53+
`## Custom Instructions
54+
\`\`\`yaml
55+
- name: summarize_alerts
56+
type: ${AiSummarizeStepTypeId}
57+
with:
58+
input: "{{ steps.get_alerts.output }}"
59+
instructions: "Use bullet points. Focus on root cause. Limit to 3 key points."
60+
\`\`\``,
61+
62+
`## Length Control
63+
\`\`\`yaml
64+
- name: summarize_for_pagerduty
65+
type: ${AiSummarizeStepTypeId}
66+
with:
67+
input: "{{ steps.error_details.output }}"
68+
maxLength: 100
69+
instructions: "One sentence summary suitable for alert title"
70+
\`\`\``,
71+
72+
`## Use AI summary in subsequent steps
73+
\`\`\`yaml
74+
- name: summarize_incident
75+
type: ${AiSummarizeStepTypeId}
76+
with:
77+
input: "{{ steps.get_incident_details.output }}"
78+
instructions: "Concise summary for notification"
79+
- name: send_notification
80+
type: http
81+
with:
82+
url: "https://api.example.com/notify"
83+
body: "{{ steps.summarize_incident.output.content }}"
84+
\`\`\``,
85+
],
86+
},
87+
};

0 commit comments

Comments
 (0)