Skip to content

Commit

Permalink
Merge branch 'main' into 174239-improve-obs-alert-table
Browse files Browse the repository at this point in the history
  • Loading branch information
maryam-saeidi authored Jan 22, 2024
2 parents 113e3c5 + e404798 commit c2be17b
Show file tree
Hide file tree
Showing 35 changed files with 1,380 additions and 79 deletions.
5 changes: 4 additions & 1 deletion .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ enabled:
- x-pack/test_serverless/api_integration/test_suites/security/common_configs/config.group1.ts
- x-pack/test_serverless/functional/test_suites/observability/config.ts
- x-pack/test_serverless/functional/test_suites/observability/config.examples.ts
- x-pack/test_serverless/functional/test_suites/observability/config.saved_objects_management.ts
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group1.ts
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group2.ts
- x-pack/test_serverless/functional/test_suites/observability/common_configs/config.group3.ts
Expand All @@ -426,6 +427,7 @@ enabled:
- x-pack/test_serverless/functional/test_suites/search/config.ts
- x-pack/test_serverless/functional/test_suites/search/config.examples.ts
- x-pack/test_serverless/functional/test_suites/search/config.screenshots.ts
- x-pack/test_serverless/functional/test_suites/search/config.saved_objects_management.ts
- x-pack/test_serverless/functional/test_suites/search/common_configs/config.group1.ts
- x-pack/test_serverless/functional/test_suites/search/common_configs/config.group2.ts
- x-pack/test_serverless/functional/test_suites/search/common_configs/config.group3.ts
Expand All @@ -435,6 +437,7 @@ enabled:
- x-pack/test_serverless/functional/test_suites/security/config.ts
- x-pack/test_serverless/functional/test_suites/security/config.examples.ts
- x-pack/test_serverless/functional/test_suites/security/config.cloud_security_posture.ts
- x-pack/test_serverless/functional/test_suites/security/config.saved_objects_management.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group2.ts
- x-pack/test_serverless/functional/test_suites/security/common_configs/config.group3.ts
Expand Down Expand Up @@ -516,4 +519,4 @@ enabled:
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_read/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_read/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_bulk_actions/configs/ess.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_bulk_actions/configs/serverless.config.ts
- x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_bulk_actions/configs/serverless.config.ts
4 changes: 2 additions & 2 deletions .buildkite/pipelines/performance/daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ steps:
queue: kb-static-ubuntu
depends_on: build
key: tests
timeout_in_minutes: 60
timeout_in_minutes: 90
retry:
automatic:
- exit_status: '-1'
limit: 3
limit: 2
- exit_status: '*'
limit: 1

Expand Down
17 changes: 3 additions & 14 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,20 +300,9 @@ const uploadPipeline = (pipelineContent: string | object) => {
}

if (
(await doAnyChangesMatch([
/^src\/plugins\/controls/,
/^packages\/kbn-securitysolution-.*/,
/^x-pack\/plugins\/lists/,
/^x-pack\/plugins\/security_solution/,
/^x-pack\/plugins\/timelines/,
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/sections\/action_connector_form/,
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/sections\/alerts_table/,
/^x-pack\/plugins\/triggers_actions_ui\/public\/application\/context\/connectors_context\.tsx/,
/^x-pack\/test\/defend_workflows_cypress/,
/^x-pack\/test\/security_solution_cypress/,
/^fleet_packages\.json/, // It contains reference to prebuilt detection rules, we want to run security solution tests if it changes
])) ||
GITHUB_PR_LABELS.includes('ci:all-cypress-suites')
((await doAnyChangesMatch([/^x-pack\/plugins\/osquery/, /^x-pack\/test\/osquery_cypress/])) ||
GITHUB_PR_LABELS.includes('ci:all-cypress-suites')) &&
!GITHUB_PR_LABELS.includes('ci:skip-cypress-osquery')
) {
pipeline.push(
getPipeline('.buildkite/pipelines/pull_request/security_solution/osquery_cypress.yml')
Expand Down
2 changes: 1 addition & 1 deletion docs/settings/alert-action-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ Specifies whether to skip writing alerts and scheduling actions if rule
processing was cancelled due to a timeout. Default: `true`. This setting can be
overridden by individual rule types.

`xpack.alerting.rules.maxScheduledPerMinute` {ess-icon}::
`xpack.alerting.rules.maxScheduledPerMinute`::
Specifies the maximum number of rules to run per minute. Default: 10000

`xpack.alerting.rules.minimumScheduleInterval.value` {ess-icon}::
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@
"@opentelemetry/resources": "^1.4.0",
"@opentelemetry/sdk-metrics-base": "^0.31.0",
"@opentelemetry/semantic-conventions": "^1.4.0",
"@reduxjs/toolkit": "1.7.2",
"@reduxjs/toolkit": "1.9.7",
"@slack/webhook": "^7.0.1",
"@smithy/eventstream-codec": "^2.0.12",
"@smithy/util-utf8": "^2.0.0",
Expand Down Expand Up @@ -935,7 +935,7 @@
"deepmerge": "^4.2.2",
"del": "^6.1.0",
"diff": "^5.1.0",
"elastic-apm-node": "^4.3.0",
"elastic-apm-node": "^4.4.0",
"email-addresses": "^5.0.0",
"execa": "^5.1.1",
"expiry-js": "0.1.7",
Expand Down Expand Up @@ -963,7 +963,7 @@
"https-proxy-agent": "^5.0.1",
"i18n-iso-countries": "^4.3.1",
"icalendar": "0.7.1",
"immer": "^9.0.15",
"immer": "^9.0.21",
"inquirer": "^7.3.3",
"intl": "^1.2.5",
"intl-format-cache": "^2.1.0",
Expand Down Expand Up @@ -1071,19 +1071,19 @@
"react-window": "^1.8.9",
"recompose": "^0.30.0",
"reduce-reducers": "^1.0.4",
"redux": "^4.2.0",
"redux": "^4.2.1",
"redux-actions": "^2.6.5",
"redux-devtools-extension": "^2.13.8",
"redux-logger": "^3.0.6",
"redux-observable": "2.0.0",
"redux-saga": "^1.1.3",
"redux-thunk": "^2.4.1",
"redux-thunk": "^2.4.2",
"redux-thunks": "^1.0.0",
"remark-gfm": "1.0.0",
"remark-parse-no-trim": "^8.0.4",
"remark-stringify": "^8.0.3",
"require-in-the-middle": "^7.2.0",
"reselect": "^4.1.6",
"reselect": "^4.1.8",
"rison-node": "1.0.2",
"rxjs": "^7.5.5",
"safe-squel": "^5.12.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const createReduxTools = <
const dispatch: ReduxToolsSetters<ReduxStateType, ReducerType> = Object.keys(reducers).reduce(
(acc, key: keyof ReducerType) => {
const sliceAction =
slice.actions[key as keyof CaseReducerActions<SliceCaseReducers<ReduxStateType>>];
slice.actions[key as keyof CaseReducerActions<SliceCaseReducers<ReduxStateType>, string>];
acc[key] = (payload) => store.dispatch(sliceAction(payload));
return acc;
},
Expand Down
2 changes: 1 addition & 1 deletion test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"api_integration/apis/logstash/pipelines/fixtures/*.json",
"api_integration/apis/telemetry/fixtures/*.json",
"api_integration/apis/telemetry/fixtures/*.json"
],
, "../x-pack/test_serverless/functional/test_suites/common/saved_objects_management/export_transform copy.ts" ],
"exclude": ["target/**/*", "*/plugins/**/*", "plugins/**/*"],
"kbn_references": [
"@kbn/core",
Expand Down
40 changes: 25 additions & 15 deletions x-pack/plugins/cases/public/components/create/description.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import React from 'react';
import { waitFor, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import userEvent, { specialChars } from '@testing-library/user-event';

import type { FormHook } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib';
import { useForm, Form } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib';
Expand All @@ -18,7 +18,11 @@ import type { AppMockRenderer } from '../../common/mock';
import { createAppMockRenderer } from '../../common/mock';
import { MAX_DESCRIPTION_LENGTH } from '../../../common/constants';

describe('Description', () => {
// FLAKY: https://github.com/elastic/kibana/issues/174133
// FLAKY: https://github.com/elastic/kibana/issues/174134
// FLAKY: https://github.com/elastic/kibana/issues/174135
// FLAKY: https://github.com/elastic/kibana/issues/175204
describe.skip('Description', () => {
let globalForm: FormHook;
let appMockRender: AppMockRenderer;
const draftStorageKey = `cases.caseView.createCase.description.markdownEditor`;
Expand Down Expand Up @@ -52,7 +56,7 @@ describe('Description', () => {
</MockHookWrapperComponent>
);

expect(await screen.findByTestId('caseDescription')).toBeInTheDocument();
expect(screen.getByTestId('caseDescription')).toBeInTheDocument();
});

it('it changes the description', async () => {
Expand All @@ -62,10 +66,12 @@ describe('Description', () => {
</MockHookWrapperComponent>
);

const description = await screen.findByTestId('euiMarkdownEditorTextArea');
const description = screen.getByTestId('euiMarkdownEditorTextArea');

userEvent.clear(description);
userEvent.paste(description, 'My new description');
userEvent.type(
description,
`${specialChars.selectAll}${specialChars.delete}My new description`
);

await waitFor(() => {
expect(globalForm.getFormData()).toEqual({ description: 'My new description' });
Expand All @@ -79,12 +85,14 @@ describe('Description', () => {
</MockHookWrapperComponent>
);

const description = await screen.findByTestId('euiMarkdownEditorTextArea');
const description = screen.getByTestId('euiMarkdownEditorTextArea');

userEvent.clear(description);
userEvent.paste(description, ' ');
userEvent.type(description, ' ');

expect(await screen.findByText('A description is required.')).toBeInTheDocument();
await waitFor(() => {
expect(screen.getByText('A description is required.')).toBeInTheDocument();
});
});

it('shows an error when description is too long', async () => {
Expand All @@ -96,14 +104,16 @@ describe('Description', () => {
</MockHookWrapperComponent>
);

const description = await screen.findByTestId('euiMarkdownEditorTextArea');
const description = screen.getByTestId('euiMarkdownEditorTextArea');

userEvent.paste(description, longDescription);

expect(
await screen.findByText(
'The length of the description is too long. The maximum length is 30000 characters.'
)
).toBeInTheDocument();
await waitFor(() => {
expect(
screen.getByText(
'The length of the description is too long. The maximum length is 30000 characters.'
)
).toBeInTheDocument();
});
});
});
2 changes: 1 addition & 1 deletion x-pack/plugins/osquery/public/agents/use_all_agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const useAllAgents = (searchValue = '', opts: RequestOptions = { perPage:
kuery = `(${osqueryPolicies.map((p) => `policy_id:${p}`).join(' or ')})`;

if (searchValue) {
kuery += ` and (local_metadata.host.hostname:*${searchValue}* or local_metadata.elastic.agent.id:*${searchValue}*)`;
kuery += ` and (local_metadata.host.hostname.keyword:*${searchValue}* or local_metadata.elastic.agent.id:*${searchValue}*)`;
} else {
kuery += ` and (status:online ${
agentIds?.length ? `or local_metadata.elastic.agent.id:(${agentIds.join(' or ')})` : ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const fieldIconCss = {
export const fieldSpanCss = {
paddingTop: '0 !important',
paddingBottom: '0 !important',
paddingLeft: '5px',
};

export const descriptionWrapperCss = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const ECSComboboxFieldComponent: React.FC<ECSComboboxFieldProps> = ({
</EuiFlexItem>
<EuiFlexItem grow={false}>
<span css={fieldSpanCss} className="euiSuggestItem__label euiSuggestItem__label--expand">
{option.value.field}
<b>{option.value.field}</b>
</span>
</EuiFlexItem>

Expand Down Expand Up @@ -394,7 +394,7 @@ const OsqueryColumnFieldComponent: React.FC<OsqueryColumnFieldProps> = ({
>
<EuiFlexItem grow={false}>
<span css={fieldSpanCss} className="euiSuggestItem__label euiSuggestItem__label--expand">
{option.value.suggestion_label}
<b>{option.value.suggestion_label}</b>
</span>
</EuiFlexItem>
<EuiFlexItem css={descriptionWrapperCss} grow={false}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export const TestExpression: FunctionComponent<any> = () => {
);
};

describe('rule_add', () => {
// FLAKY: https://github.com/elastic/kibana/issues/174397
describe.skip('rule_add', () => {
afterEach(() => {
jest.clearAllMocks();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"attributes": {
"enabled": true,
"title": "vim-1"
},
"coreMigrationVersion": "7.14.0",
"id": "test-not-visible-in-management:vim-1",
"references": [],
"type": "test-not-visible-in-management",
"updated_at": "2018-12-21T00:43:07.096Z",
"version": "WzIsMV0="
}
3 changes: 2 additions & 1 deletion x-pack/test/functional_execution_context/tests/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import { assertLogContains, isExecutionContextLog, readLogFile } from '../test_u
export default function ({ getService, getPageObjects }: FtrProviderContext) {
const PageObjects = getPageObjects(['common', 'dashboard', 'header', 'home', 'timePicker']);

describe('Browser apps', () => {
// FLAKY: https://github.com/elastic/kibana/issues/112103
describe.skip('Browser apps', () => {
let logs: Ecs[];
const retry = getService('retry');

Expand Down
Loading

0 comments on commit c2be17b

Please sign in to comment.