Skip to content

Commit

Permalink
Merge branch 'main' into 163894/fix-annotation-save-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed Aug 15, 2023
2 parents f8d8694 + bf3dc72 commit d9df484
Show file tree
Hide file tree
Showing 390 changed files with 5,954 additions and 3,702 deletions.
1 change: 1 addition & 0 deletions .buildkite/ftr_configs.yml
Expand Up @@ -46,6 +46,7 @@ disabled:
- x-pack/plugins/apm/ftr_e2e/ftr_config.ts
- x-pack/test_serverless/functional/test_suites/observability/cypress/config_headless.ts
- x-pack/test_serverless/functional/test_suites/observability/cypress/config_runner.ts
- x-pack/test/security_solution_cypress/serverless_config.ts
- x-pack/plugins/profiling/e2e/ftr_config_open.ts
- x-pack/plugins/profiling/e2e/ftr_config_runner.ts
- x-pack/plugins/profiling/e2e/ftr_config.ts
Expand Down
57 changes: 55 additions & 2 deletions .buildkite/pipelines/pull_request/base.yml
Expand Up @@ -94,13 +94,14 @@ steps:
automatic:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/functional/security_serverless.sh
label: 'Serverless Security Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 40
parallelism: 10
soft_fail:
- exit_status: 10
retry:
Expand All @@ -110,8 +111,60 @@ steps:
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-security-serverless/**/*"
- "target/kibana-security-solution/**/*"

- command: .buildkite/scripts/steps/functional/security_serverless_defend_workflows.sh
label: 'Serverless Security Defend Workflows Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 40
soft_fail:
- exit_status: 10
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-security-solution/**/*"

- command: .buildkite/scripts/steps/functional/security_serverless_investigations.sh
label: 'Serverless Security Investigations Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 40
parallelism: 4
soft_fail:
- exit_status: 10
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-security-solution/**/*"

- command: .buildkite/scripts/steps/functional/security_serverless_explore.sh
label: 'Serverless Security Explore Cypress Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 40
parallelism: 2
soft_fail:
- exit_status: 10
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-security-solution/**/*"

- command: .buildkite/scripts/steps/lint.sh
label: 'Linting'
Expand Down
13 changes: 1 addition & 12 deletions .buildkite/pipelines/pull_request/security_solution.yml
Expand Up @@ -11,15 +11,4 @@ steps:
- exit_status: '*'
limit: 1
artifact_paths:
- "target/kibana-security-solution/**/*"

- command: .buildkite/scripts/steps/functional/security_solution_burn.sh
label: 'Security Solution Cypress tests, burning changed specs'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
parallelism: 1
soft_fail: true
artifact_paths:
- "target/kibana-security-solution/**/*"
- "target/kibana-security-solution/**/*"
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/functional/response_ops.sh
Expand Up @@ -10,4 +10,4 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Response Ops Cypress Tests on Security Solution"

yarn --cwd x-pack/plugins/security_solution cypress:run:respops
yarn --cwd x-pack/test/security_solution_cypress cypress:run:respops:ess
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/functional/response_ops_cases.sh
Expand Up @@ -10,4 +10,4 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Response Ops Cases Cypress Tests on Security Solution"

yarn --cwd x-pack/plugins/security_solution cypress:run:cases
yarn --cwd x-pack/test/security_solution_cypress cypress:run:cases:ess
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/functional/security_serverless.sh
Expand Up @@ -10,4 +10,4 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Security Serverless Cypress"

yarn --cwd x-pack/test_serverless/functional/test_suites/security/cypress cypress:run
yarn --cwd x-pack/test/security_solution_cypress cypress:run:serverless
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/steps/functional/common.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

export JOB=kibana-serverless-security-cypress
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Security Defend Workflows Serverless Cypress"

yarn --cwd x-pack/test_serverless/functional/test_suites/security/cypress cypress:run
13 changes: 13 additions & 0 deletions .buildkite/scripts/steps/functional/security_serverless_explore.sh
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/steps/functional/common.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

export JOB=kibana-security-solution-chrome
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Explore Cypress Tests on Serverless"

yarn --cwd x-pack/test/security_solution_cypress cypress:explore:run:serverless
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -euo pipefail

source .buildkite/scripts/steps/functional/common.sh
source .buildkite/scripts/steps/functional/common_cypress.sh

export JOB=kibana-security-solution-chrome
export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Investigations Cypress Tests on Serverless"

yarn --cwd x-pack/test/security_solution_cypress cypress:investigations:run:serverless
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/functional/security_solution.sh
Expand Up @@ -10,4 +10,4 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Security Solution Cypress tests (Chrome)"

yarn --cwd x-pack/plugins/security_solution cypress:run
yarn --cwd x-pack/test/security_solution_cypress cypress:run:ess
Expand Up @@ -12,4 +12,4 @@ buildkite-agent meta-data set "${BUILDKITE_JOB_ID}_is_test_execution_step" 'fals

echo "--- Security Solution Cypress tests, burning changed specs (Chrome)"

yarn --cwd x-pack/plugins/security_solution cypress:changed-specs-only
yarn --cwd x-pack/test/security_solution_cypress cypress:changed-specs-only:ess
Expand Up @@ -10,4 +10,4 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Explore Cypress Tests on Security Solution"

yarn --cwd x-pack/plugins/security_solution cypress:explore:run
yarn --cwd x-pack/test/security_solution_cypress cypress:explore:run:ess
Expand Up @@ -10,4 +10,4 @@ export KIBANA_INSTALL_DIR=${KIBANA_BUILD_LOCATION}

echo "--- Investigations Cypress Tests on Security Solution"

yarn --cwd x-pack/plugins/security_solution cypress:investigations:run
yarn --cwd x-pack/test/security_solution_cypress cypress:investigations:run:ess
49 changes: 23 additions & 26 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -1088,7 +1088,7 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/plugins/security_solution/common/search_strategy/timeline @elastic/security-threat-hunting-investigations
/x-pack/plugins/security_solution/common/types/timeline @elastic/security-threat-hunting-investigations

/x-pack/plugins/security_solution/cypress/e2e/investigations @elastic/security-threat-hunting-investigations
/x-pack/test/security_solution_cypress/cypress/e2e/investigations @elastic/security-threat-hunting-investigations

/x-pack/plugins/security_solution/public/common/components/alerts_viewer @elastic/security-threat-hunting-investigations
/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_action @elastic/security-threat-hunting-investigations
Expand All @@ -1112,12 +1112,11 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/plugins/security_solution/common/search_strategy/security_solution/network @elastic/security-threat-hunting-explore
/x-pack/plugins/security_solution/common/search_strategy/security_solution/user @elastic/security-threat-hunting-explore

/x-pack/plugins/security_solution/cypress/e2e/explore @elastic/security-threat-hunting-explore
/x-pack/plugins/security_solution/cypress/screens/hosts @elastic/security-threat-hunting-explore
/x-pack/plugins/security_solution/cypress/screens/network @elastic/security-threat-hunting-explore
/x-pack/plugins/security_solution/cypress/tasks/hosts @elastic/security-threat-hunting-explore
/x-pack/plugins/security_solution/cypress/tasks/network @elastic/security-threat-hunting-explore
/x-pack/plugins/security_solution/cypress/upgrade_e2e/threat_hunting/cases @elastic/security-threat-hunting-explore
/x-pack/test/security_solution_cypress/cypress/e2e/explore @elastic/security-threat-hunting-explore
/x-pack/test/security_solution_cypress/cypress/screens/hosts @elastic/security-threat-hunting-explore
/x-pack/test/security_solution_cypress/cypress/screens/network @elastic/security-threat-hunting-explore
/x-pack/test/security_solution_cypress/cypress/tasks/hosts @elastic/security-threat-hunting-explore
/x-pack/test/security_solution_cypress/cypress/tasks/network @elastic/security-threat-hunting-explore

/x-pack/plugins/security_solution/public/common/components/guided_onboarding_tour @elastic/security-threat-hunting-explore
/x-pack/plugins/security_solution/public/common/components/charts @elastic/security-threat-hunting-explore
Expand Down Expand Up @@ -1169,8 +1168,8 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/plugins/security_solution/common/detection_engine/rule_management @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/common/detection_engine/rule_monitoring @elastic/security-detection-rule-management

/x-pack/plugins/security_solution/cypress/e2e/detection_response/prebuilt_rules @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_management @elastic/security-detection-rule-management
/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/prebuilt_rules @elastic/security-detection-rule-management
/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management @elastic/security-detection-rule-management

/x-pack/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules @elastic/security-detection-rule-management
/x-pack/plugins/security_solution/docs/testing/test_plans/detection_response/rule_management @elastic/security-detection-rule-management
Expand Down Expand Up @@ -1217,12 +1216,12 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/plugins/security_solution/server/lib/detection_engine/routes/index @elastic/security-detection-engine
/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals @elastic/security-detection-engine

/x-pack/plugins/security_solution/cypress/e2e/data_sources @elastic/security-detection-engine
/x-pack/plugins/security_solution/cypress/e2e/detection_response/rule_creation @elastic/security-detection-engine
/x-pack/plugins/security_solution/cypress/e2e/detection_response/value_lists @elastic/security-detection-engine
/x-pack/plugins/security_solution/cypress/e2e/entity_analytics @elastic/security-detection-engine
/x-pack/plugins/security_solution/cypress/e2e/exceptions @elastic/security-detection-engine
/x-pack/plugins/security_solution/cypress/e2e/overview @elastic/security-detection-engine
/x-pack/test/security_solution_cypress/cypress/e2e/data_sources @elastic/security-detection-engine
/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation @elastic/security-detection-engine
/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/value_lists @elastic/security-detection-engine
/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics @elastic/security-detection-engine
/x-pack/test/security_solution_cypress/cypress/e2e/exceptions @elastic/security-detection-engine
/x-pack/test/security_solution_cypress/cypress/e2e/overview @elastic/security-detection-engine

/x-pack/plugins/security_solution/common/detection_engine/rule_exceptions @elastic/security-detection-engine

Expand All @@ -1241,14 +1240,14 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib
/x-pack/plugins/security_solution/public/common/components/threat_match @elastic/security-detection-engine

## Security Solution cross teams ownership
/x-pack/plugins/security_solution/cypress/fixtures @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/plugins/security_solution/cypress/helpers @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/plugins/security_solution/cypress/e2e/detection_rules @elastic/security-detection-rule-management @elastic/security-detection-engine
/x-pack/plugins/security_solution/cypress/objects @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/plugins/security_solution/cypress/plugins @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/plugins/security_solution/cypress/screens/common @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/plugins/security_solution/cypress/support @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/plugins/security_solution/cypress/urls @elastic/security-threat-hunting-investigations @elastic/security-detection-engine
/x-pack/test/security_solution_cypress/cypress/fixtures @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/test/security_solution_cypress/cypress/helpers @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/test/security_solution_cypress/cypress/e2e/detection_rules @elastic/security-detection-rule-management @elastic/security-detection-engine
/x-pack/test/security_solution_cypress/cypress/objects @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/test/security_solution_cypress/cypress/plugins @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/test/security_solution_cypress/cypress/screens/common @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/test/security_solution_cypress/cypress/support @elastic/security-detections-response @elastic/security-threat-hunting
/x-pack/test/security_solution_cypress/cypress/urls @elastic/security-threat-hunting-investigations @elastic/security-detection-engine

/x-pack/plugins/security_solution/common/ecs @elastic/security-threat-hunting-investigations
/x-pack/plugins/security_solution/common/test @elastic/security-detection-rule-management @elastic/security-detection-engine
Expand Down Expand Up @@ -1284,9 +1283,7 @@ x-pack/plugins/security_solution/server/usage/ @elastic/security-data-analytics
x-pack/plugins/security_solution/server/lib/telemetry/ @elastic/security-data-analytics

## Security Solution sub teams - security-engineering-productivity
x-pack/plugins/security_solution/cypress/ccs_e2e @elastic/security-engineering-productivity
x-pack/plugins/security_solution/cypress/upgrade_e2e @elastic/security-engineering-productivity
x-pack/plugins/security_solution/cypress/README.md @elastic/security-engineering-productivity
x-pack/test/security_solution_cypress/cypress/README.md @elastic/security-engineering-productivity
x-pack/test/security_solution_cypress @elastic/security-engineering-productivity

## Security Solution sub teams - adaptive-workload-protection
Expand Down
3 changes: 3 additions & 0 deletions docs/management/advanced-options.asciidoc
Expand Up @@ -430,6 +430,9 @@ preview:[] Sorts services without anomaly detection rules on the APM Service inv
[[observability-default-service-env]]`observability:apmDefaultServiceEnvironment`::
Set the default environment for the APM app. When left empty, data from all environments will be displayed by default.

[[observability-apm-enable-profiling]]`observability:apmEnableProfilingIntegration`::
Enable the Universal Profiling integration in APM.

[[observability-enable-aws-lambda-metrics]]`observability:enableAwsLambdaMetrics`::
preview:[] Display Amazon Lambda metrics in the service metrics tab.

Expand Down
Expand Up @@ -8,20 +8,28 @@

import { ErrorEmbeddable } from '@kbn/embeddable-plugin/public';

import { OPTIONS_LIST_CONTROL } from '../../../common';
import { ControlOutput } from '../../types';
import { ControlGroupInput } from '../types';
import { pluginServices } from '../../services';
import { DeleteControlAction } from './delete_control_action';
import { OptionsListEmbeddableInput } from '../../options_list';
import { controlGroupInputBuilder } from '../external_api/control_group_input_builder';
import { ControlGroupContainer } from '../embeddable/control_group_container';
import { OptionsListEmbeddableFactory } from '../../options_list/embeddable/options_list_embeddable_factory';
import { OptionsListEmbeddable } from '../../options_list/embeddable/options_list_embeddable';
import { mockedReduxEmbeddablePackage } from '@kbn/presentation-util-plugin/public/mocks';

let container: ControlGroupContainer;
let embeddable: OptionsListEmbeddable;

beforeAll(async () => {
pluginServices.getServices().controls.getControlFactory = jest
.fn()
.mockImplementation((type: string) => {
if (type === OPTIONS_LIST_CONTROL) return new OptionsListEmbeddableFactory();
});

const controlGroupInput = { chainingSystem: 'NONE', panels: {} } as ControlGroupInput;
controlGroupInputBuilder.addOptionsListControl(controlGroupInput, {
dataViewId: 'test-data-view',
Expand All @@ -34,6 +42,7 @@ beforeAll(async () => {
await container.untilInitialized();

embeddable = container.getChild(container.getChildIds()[0]);
expect(embeddable.type).toBe(OPTIONS_LIST_CONTROL);
});

test('Action is incompatible with Error Embeddables', async () => {
Expand Down
Expand Up @@ -8,6 +8,7 @@

import { ErrorEmbeddable } from '@kbn/embeddable-plugin/public';

import { OPTIONS_LIST_CONTROL } from '../../../common';
import { ControlOutput } from '../../types';
import { ControlGroupInput } from '../types';
import { pluginServices } from '../../services';
Expand Down Expand Up @@ -55,13 +56,14 @@ test('Action is compatible with embeddables that are editable', async () => {
const editControlAction = new EditControlAction(deleteControlAction);
const emptyContainer = new ControlGroupContainer(mockedReduxEmbeddablePackage, controlGroupInput);
await emptyContainer.untilInitialized();
await emptyContainer.addOptionsListControl({
const control = await emptyContainer.addOptionsListControl({
dataViewId: 'test-data-view',
title: 'test',
fieldName: 'test-field',
width: 'medium',
grow: false,
});
expect(emptyContainer.getInput().panels[control.getInput().id].type).toBe(OPTIONS_LIST_CONTROL);

expect(
await editControlAction.isCompatible({
Expand All @@ -88,18 +90,16 @@ test('Execute should open a flyout', async () => {

const emptyContainer = new ControlGroupContainer(mockedReduxEmbeddablePackage, controlGroupInput);
await emptyContainer.untilInitialized();
await emptyContainer.addOptionsListControl({
const control = (await emptyContainer.addOptionsListControl({
dataViewId: 'test-data-view',
title: 'test',
fieldName: 'test-field',
width: 'medium',
grow: false,
});
const embeddable: OptionsListEmbeddable = emptyContainer.getChild(
emptyContainer.getChildIds()[0]
);
})) as OptionsListEmbeddable;
expect(emptyContainer.getInput().panels[control.getInput().id].type).toBe(OPTIONS_LIST_CONTROL);

const editControlAction = new EditControlAction(deleteControlAction);
await editControlAction.execute({ embeddable });
await editControlAction.execute({ embeddable: control });
expect(spyOn).toHaveBeenCalled();
});
3 changes: 2 additions & 1 deletion test/functional/apps/discover/group2/_sql_view.ts
Expand Up @@ -31,7 +31,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
'discover:enableSql': true,
};

describe('discover sql view', async function () {
// Failing: See https://github.com/elastic/kibana/issues/159194
describe.skip('discover sql view', async function () {
before(async () => {
await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader']);
log.debug('load kibana index with default index pattern');
Expand Down
Expand Up @@ -20,7 +20,8 @@ import { waitForFleetSetup } from './helpers';

const logFilePath = path.join(__dirname, 'logs.log');

describe('fleet usage telemetry', () => {
// Failing ES promotion: https://github.com/elastic/kibana/issues/156245
describe.skip('fleet usage telemetry', () => {
let core: any;
let esServer: TestElasticsearchUtils;
let kbnServer: TestKibanaUtils;
Expand Down

0 comments on commit d9df484

Please sign in to comment.