Skip to content

Commit 2ff2db3

Browse files
Merge branch 'main' into fleet/178069-fix-agent-policy-filtering
2 parents 9b08b69 + 2d6b7d9 commit 2ff2db3

115 files changed

Lines changed: 3859 additions & 2006 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/ftr_configs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ enabled:
246246
- x-pack/test/fleet_api_integration/config.epm.ts
247247
- x-pack/test/fleet_api_integration/config.fleet.ts
248248
- x-pack/test/fleet_api_integration/config.package_policy.ts
249+
- x-pack/test/fleet_api_integration/config.space_awareness.ts
249250
- x-pack/test/fleet_functional/config.ts
250251
- x-pack/test/ftr_apis/security_and_spaces/config.ts
251252
- x-pack/test/functional_basic/apps/ml/permissions/config.ts
@@ -442,7 +443,8 @@ enabled:
442443
- x-pack/test_serverless/functional/test_suites/search/common_configs/config.group6.ts
443444
- x-pack/test_serverless/functional/test_suites/security/config.ts
444445
- x-pack/test_serverless/functional/test_suites/security/config.examples.ts
445-
- x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.ts
446+
- x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.basic.ts
447+
- x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.essentials.ts
446448
- x-pack/test_serverless/functional/test_suites/security/config.saved_objects_management.ts
447449
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts
448450
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group2.ts
@@ -572,4 +574,3 @@ enabled:
572574
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint/configs/serverless.integrations.config.ts
573575
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint/configs/serverless.integrations_feature_flag.config.ts
574576
- x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint/configs/integrations_feature_flag.config.ts
575-

.buildkite/scripts/pipelines/pull_request/pipeline.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,14 @@ const getPipeline = (filename: string, removeSteps = true) => {
145145
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/fips.yml'));
146146
}
147147

148-
if (GITHUB_PR_LABELS.includes('ci:build-serverless-image')) {
149-
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/build_project.yml'));
150-
}
151148
if (
152149
GITHUB_PR_LABELS.includes('ci:project-deploy-elasticsearch') ||
153150
GITHUB_PR_LABELS.includes('ci:project-deploy-observability') ||
154151
GITHUB_PR_LABELS.includes('ci:project-deploy-security')
155152
) {
156153
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/deploy_project.yml'));
154+
} else if (GITHUB_PR_LABELS.includes('ci:build-serverless-image')) {
155+
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/build_project.yml'));
157156
}
158157

159158
if (

.github/CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,8 @@ x-pack/test/security_solution_api_integration/test_suites/genai @elastic/securit
16511651
/x-pack/test/cloud_security_posture_functional/ @elastic/kibana-cloud-security-posture
16521652
/x-pack/test/cloud_security_posture_api/ @elastic/kibana-cloud-security-posture
16531653
/x-pack/test_serverless/functional/test_suites/security/ftr/cloud_security_posture/ @elastic/kibana-cloud-security-posture
1654-
/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.ts @elastic/kibana-cloud-security-posture
1654+
/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.basic.ts @elastic/kibana-cloud-security-posture
1655+
/x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.essentials.ts @elastic/kibana-cloud-security-posture
16551656
/x-pack/test_serverless/api_integration/test_suites/security/cloud_security_posture/ @elastic/kibana-cloud-security-posture
16561657
/x-pack/plugins/fleet/public/components/cloud_security_posture @elastic/fleet @elastic/kibana-cloud-security-posture
16571658
/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/components/cloud_security_posture @elastic/fleet @elastic/kibana-cloud-security-posture

dev_docs/tutorials/performance/adding_custom_performance_metrics.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ id: kibDevTutorialAddingCustomPerformanceMetrics
33
slug: /kibana-dev-docs/tutorial/performance/adding_custom_performance_metrics
44
title: Adding Performance Metrics
55
summary: Learn how to instrument your code and analyze performance
6-
date: 2023-01-13
76
tags: ['kibana', 'onboarding', 'setup', 'performance', 'development', 'telemetry']
87
---
98

@@ -241,7 +240,7 @@ const MyApp = () => {
241240
if (fetchedData.status === 'success') {
242241
setData(fetchedData);
243242
244-
// Call onPageReady once the meaningful data has rendered and visible to the user
243+
// Call onPageReady once the meaningful data has rendered and visible to the user
245244
246245
onPageReady();
247246
}

nav-kibana-dev.docnav.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@
115115
"label": "Tutorials",
116116
"items": [
117117
{
118-
"id": "kibDevTutorialAddingCustomPerformanceMetrics"
118+
"id": "kibDevTutorialAddingCustomPerformanceMetrics",
119+
"label": "Adding Performance Metrics"
119120
},
120121
{
121122
"id": "kibDevTutorialSetupWindowsDevWSL"

packages/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.test.tsx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type { JSXElementConstructor, MutableRefObject } from 'react';
1010
import React from 'react';
1111
import type { EuiDataGridColumnCellActionProps, EuiDataGridRefProps } from '@elastic/eui';
1212
import { EuiButtonEmpty, type EuiDataGridColumnCellAction } from '@elastic/eui';
13-
import { render, waitFor, act } from '@testing-library/react';
13+
import { render, waitFor } from '@testing-library/react';
1414
import { renderHook } from '@testing-library/react-hooks';
1515
import { makeAction } from '../mocks/helpers';
1616
import type { UseDataGridColumnsCellActionsProps } from './use_data_grid_column_cell_actions';
@@ -74,25 +74,15 @@ describe('useDataGridColumnsCellActions', () => {
7474
const { result, waitForNextUpdate } = renderHook(useDataGridColumnsCellActions, {
7575
initialProps: useDataGridColumnsCellActionsProps,
7676
});
77-
expect(result.current).toHaveLength(columns.length);
78-
expect(result.current[0]).toHaveLength(1); // loader
77+
78+
expect(result.current).toHaveLength(0);
7979

8080
await waitForNextUpdate();
8181

8282
expect(result.current).toHaveLength(columns.length);
8383
expect(result.current[0]).toHaveLength(actions.length);
8484
});
8585

86-
it('should render cell actions loading state', async () => {
87-
const { result } = renderHook(useDataGridColumnsCellActions, {
88-
initialProps: useDataGridColumnsCellActionsProps,
89-
});
90-
await act(async () => {
91-
const cellAction = renderCellAction(result.current[0][0]);
92-
expect(cellAction.getByTestId('dataGridColumnCellAction-loading')).toBeInTheDocument();
93-
});
94-
});
95-
9686
it('should call getCellValue with the proper params', async () => {
9787
const { result, waitForNextUpdate } = renderHook(useDataGridColumnsCellActions, {
9888
initialProps: useDataGridColumnsCellActionsProps,

packages/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.tsx

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
*/
88

99
import type { MutableRefObject } from 'react';
10-
import React, { useCallback, useMemo, useRef } from 'react';
10+
import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react';
1111
import type { EuiDataGridRefProps } from '@elastic/eui';
12-
import { EuiLoadingSpinner, type EuiDataGridColumnCellAction } from '@elastic/eui';
12+
import { type EuiDataGridColumnCellAction } from '@elastic/eui';
1313
import type { FieldSpec } from '@kbn/data-views-plugin/common';
1414
import type {
1515
CellAction,
@@ -46,10 +46,6 @@ export type UseDataGridColumnsCellActions<
4646
P extends UseDataGridColumnsCellActionsProps = UseDataGridColumnsCellActionsProps
4747
> = (props: P) => EuiDataGridColumnCellAction[][];
4848

49-
// static actions array references to prevent React updates
50-
const loadingColumnActions: EuiDataGridColumnCellAction[] = [
51-
() => <EuiLoadingSpinner size="s" data-test-subj="dataGridColumnCellAction-loading" />,
52-
];
5349
const emptyActions: EuiDataGridColumnCellAction[][] = [];
5450

5551
export const useDataGridColumnsCellActions: UseDataGridColumnsCellActions = ({
@@ -60,6 +56,8 @@ export const useDataGridColumnsCellActions: UseDataGridColumnsCellActions = ({
6056
dataGridRef,
6157
disabledActionTypes = [],
6258
}) => {
59+
const [cellActions, setCellActions] = useState<EuiDataGridColumnCellAction[][]>(emptyActions);
60+
6361
const bulkContexts: CellActionCompatibilityContext[] | undefined = useMemo(() => {
6462
if (!triggerId || !fields?.length) {
6563
return undefined;
@@ -75,35 +73,35 @@ export const useDataGridColumnsCellActions: UseDataGridColumnsCellActions = ({
7573
disabledActionTypes,
7674
});
7775

78-
const columnsCellActions = useMemo<EuiDataGridColumnCellAction[][]>(() => {
79-
if (loading) {
80-
return fields?.length ? fields.map(() => loadingColumnActions) : emptyActions;
81-
}
82-
if (!triggerId || !columnsActions?.length || !fields?.length) {
83-
return emptyActions;
76+
useEffect(() => {
77+
// no-op
78+
if (loading || !triggerId || !columnsActions?.length || !fields?.length) {
79+
return;
8480
}
8581

8682
// Check for a temporary inconsistency because `useBulkLoadActions` takes one render loop before setting `loading` to true.
8783
// It will eventually update to a consistent state
8884
if (columnsActions.length !== fields.length) {
89-
return emptyActions;
85+
return;
9086
}
9187

92-
return columnsActions.map((actions, columnIndex) =>
93-
actions.map((action) =>
94-
createColumnCellAction({
95-
action,
96-
field: fields[columnIndex],
97-
getCellValue,
98-
metadata,
99-
triggerId,
100-
dataGridRef,
101-
})
88+
setCellActions(
89+
columnsActions.map((actions, columnIndex) =>
90+
actions.map((action) =>
91+
createColumnCellAction({
92+
action,
93+
field: fields[columnIndex],
94+
getCellValue,
95+
metadata,
96+
triggerId,
97+
dataGridRef,
98+
})
99+
)
102100
)
103101
);
104102
}, [columnsActions, fields, getCellValue, loading, metadata, triggerId, dataGridRef]);
105103

106-
return columnsCellActions;
104+
return cellActions;
107105
};
108106

109107
interface CreateColumnCellActionParams

packages/kbn-esql-ast/src/antlr/esql_lexer.g4

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ ASTERISK : '*';
166166
SLASH : '/';
167167
PERCENT : '%';
168168

169+
NAMED_OR_POSITIONAL_PARAM
170+
: PARAM LETTER UNQUOTED_ID_BODY*
171+
| PARAM DIGIT+
172+
;
173+
169174
// Brackets are funny. We can happen upon a CLOSING_BRACKET in two ways - one
170175
// way is to start in an explain command which then shifts us to expression
171176
// mode. Thus, the two popModes on CLOSING_BRACKET. The other way could as

packages/kbn-esql-ast/src/antlr/esql_lexer.interp

Lines changed: 4 additions & 1 deletion
Large diffs are not rendered by default.

packages/kbn-esql-ast/src/antlr/esql_lexer.tokens

Lines changed: 65 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -65,62 +65,63 @@ MINUS=64
6565
ASTERISK=65
6666
SLASH=66
6767
PERCENT=67
68-
OPENING_BRACKET=68
69-
CLOSING_BRACKET=69
70-
UNQUOTED_IDENTIFIER=70
71-
QUOTED_IDENTIFIER=71
72-
EXPR_LINE_COMMENT=72
73-
EXPR_MULTILINE_COMMENT=73
74-
EXPR_WS=74
75-
METADATA=75
76-
FROM_LINE_COMMENT=76
77-
FROM_MULTILINE_COMMENT=77
78-
FROM_WS=78
79-
ID_PATTERN=79
80-
PROJECT_LINE_COMMENT=80
81-
PROJECT_MULTILINE_COMMENT=81
82-
PROJECT_WS=82
83-
AS=83
84-
RENAME_LINE_COMMENT=84
85-
RENAME_MULTILINE_COMMENT=85
86-
RENAME_WS=86
87-
ON=87
88-
WITH=88
89-
ENRICH_POLICY_NAME=89
90-
ENRICH_LINE_COMMENT=90
91-
ENRICH_MULTILINE_COMMENT=91
92-
ENRICH_WS=92
93-
ENRICH_FIELD_LINE_COMMENT=93
94-
ENRICH_FIELD_MULTILINE_COMMENT=94
95-
ENRICH_FIELD_WS=95
96-
LOOKUP_LINE_COMMENT=96
97-
LOOKUP_MULTILINE_COMMENT=97
98-
LOOKUP_WS=98
99-
LOOKUP_FIELD_LINE_COMMENT=99
100-
LOOKUP_FIELD_MULTILINE_COMMENT=100
101-
LOOKUP_FIELD_WS=101
102-
MVEXPAND_LINE_COMMENT=102
103-
MVEXPAND_MULTILINE_COMMENT=103
104-
MVEXPAND_WS=104
105-
INFO=105
106-
SHOW_LINE_COMMENT=106
107-
SHOW_MULTILINE_COMMENT=107
108-
SHOW_WS=108
109-
FUNCTIONS=109
110-
META_LINE_COMMENT=110
111-
META_MULTILINE_COMMENT=111
112-
META_WS=112
113-
COLON=113
114-
SETTING=114
115-
SETTING_LINE_COMMENT=115
116-
SETTTING_MULTILINE_COMMENT=116
117-
SETTING_WS=117
118-
METRICS_LINE_COMMENT=118
119-
METRICS_MULTILINE_COMMENT=119
120-
METRICS_WS=120
121-
CLOSING_METRICS_LINE_COMMENT=121
122-
CLOSING_METRICS_MULTILINE_COMMENT=122
123-
CLOSING_METRICS_WS=123
68+
NAMED_OR_POSITIONAL_PARAM=68
69+
OPENING_BRACKET=69
70+
CLOSING_BRACKET=70
71+
UNQUOTED_IDENTIFIER=71
72+
QUOTED_IDENTIFIER=72
73+
EXPR_LINE_COMMENT=73
74+
EXPR_MULTILINE_COMMENT=74
75+
EXPR_WS=75
76+
METADATA=76
77+
FROM_LINE_COMMENT=77
78+
FROM_MULTILINE_COMMENT=78
79+
FROM_WS=79
80+
ID_PATTERN=80
81+
PROJECT_LINE_COMMENT=81
82+
PROJECT_MULTILINE_COMMENT=82
83+
PROJECT_WS=83
84+
AS=84
85+
RENAME_LINE_COMMENT=85
86+
RENAME_MULTILINE_COMMENT=86
87+
RENAME_WS=87
88+
ON=88
89+
WITH=89
90+
ENRICH_POLICY_NAME=90
91+
ENRICH_LINE_COMMENT=91
92+
ENRICH_MULTILINE_COMMENT=92
93+
ENRICH_WS=93
94+
ENRICH_FIELD_LINE_COMMENT=94
95+
ENRICH_FIELD_MULTILINE_COMMENT=95
96+
ENRICH_FIELD_WS=96
97+
LOOKUP_LINE_COMMENT=97
98+
LOOKUP_MULTILINE_COMMENT=98
99+
LOOKUP_WS=99
100+
LOOKUP_FIELD_LINE_COMMENT=100
101+
LOOKUP_FIELD_MULTILINE_COMMENT=101
102+
LOOKUP_FIELD_WS=102
103+
MVEXPAND_LINE_COMMENT=103
104+
MVEXPAND_MULTILINE_COMMENT=104
105+
MVEXPAND_WS=105
106+
INFO=106
107+
SHOW_LINE_COMMENT=107
108+
SHOW_MULTILINE_COMMENT=108
109+
SHOW_WS=109
110+
FUNCTIONS=110
111+
META_LINE_COMMENT=111
112+
META_MULTILINE_COMMENT=112
113+
META_WS=113
114+
COLON=114
115+
SETTING=115
116+
SETTING_LINE_COMMENT=116
117+
SETTTING_MULTILINE_COMMENT=117
118+
SETTING_WS=118
119+
METRICS_LINE_COMMENT=119
120+
METRICS_MULTILINE_COMMENT=120
121+
METRICS_WS=121
122+
CLOSING_METRICS_LINE_COMMENT=122
123+
CLOSING_METRICS_MULTILINE_COMMENT=123
124+
CLOSING_METRICS_WS=124
124125
'dissect'=1
125126
'drop'=2
126127
'enrich'=3
@@ -177,11 +178,11 @@ CLOSING_METRICS_WS=123
177178
'*'=65
178179
'/'=66
179180
'%'=67
180-
']'=69
181-
'metadata'=75
182-
'as'=83
183-
'on'=87
184-
'with'=88
185-
'info'=105
186-
'functions'=109
187-
':'=113
181+
']'=70
182+
'metadata'=76
183+
'as'=84
184+
'on'=88
185+
'with'=89
186+
'info'=106
187+
'functions'=110
188+
':'=114

0 commit comments

Comments
 (0)