This PR works around a bug in mocha's dry run execution by collecting the tests without actually running mocha.
(cherry picked from commit 954e3d3eaa)
Co-authored-by: Robert Oskamp <robert.oskamp@elastic.co>
* FTR support mocha dry run (#125915)
This PR adds support for the mocha CLI flag `--dry-run` in our functional test execution.
(cherry picked from commit b7db60a250)
# Conflicts:
# yarn.lock
* Rebuild @kbn/pm
* Rebuild @kbn/pm part 2
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This PR fixes the functional test runner for execution against cloud (and other existing deployments) by making sure the system_indices_superuser exists.
(cherry picked from commit 8989ead2d6)
# Conflicts:
# x-pack/test/rule_registry/common/services/cluster_client.ts
* [ci-stats] send test results to ci-stats service
* move export to export type
(cherry picked from commit cc0380a461)
# Conflicts:
# packages/kbn-dev-utils/BUILD.bazel
add performance tests for Login and Home pages
- [x] Rename and reduce the number of environment variables for performance test CI job
- [x] ITERATION_COUNT_ENV => PERF_TEST_COUNT
- [x] DISABLE_CACHE, TEST_RUNNER, TEST_THROTTLE_NETWORK removed
- [x] Use c2-16 queue for performance tests
- [x] Run performance tests by running ES and Kibana separately
- [x] Add warmup phase to performance tests (Not reported to APM). APM Label: PERF_TEST_PHASE
- [x] Add playwright dependency
- [x] Throttle network speed ( downloadThroughput: 750.000 B/s, uploadThroughput: 750.000 B/s, latency: 100 ms )
- [x] Disable cache by using - page.route (‘**’, ….)
- [x] Login and Home pages performance tests.
(cherry picked from commit eeb5efcc62)
# Conflicts:
# x-pack/test/performance/config.playwright.ts
Security Solution import route needed to find actions where the action SO id was the old, pre-8.0 _id so we find references to the _id and the originId to make sure the rule we are importing will not error out.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Devin W. Hurley <devin.hurley@elastic.co>
* [Security Solution][Lists][Platform] - Fixes import rules modal to work with latest added exceptions import functionality (#120837)
## Summary
Without the added overwrite support for exceptions separate from rules, unexpected user behavior experienced. This PR does the following:
- Updates the import rules modal text to account for exceptions
- Updates the import rules modal logic to account for the exceptions overwrite option
- Users can now select to overwrite rules, exceptions or both
- Updates the backend logic in the rules import route to batch checking if the exception lists referenced by the rules trying to be imported exist. If the list does not exist, it removes the reference before trying to import the rule. Previously, this check was being done one by one for each rule.
- Added effort to try to speed up the import after added exceptions logic from original PR slowed down functionality
# Conflicts:
# x-pack/plugins/lists/server/services/exception_lists/utils/import/find_all_exception_list_types.ts
* fixing merger conflict
* Remove kibana.alert.rule.risk_score and severity
* Fix tests related to risk_score and severity
* Make translation a template
* Can't use expression in template literal
* Remove commented line added by bad merge
* Fix linting
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
# x-pack/plugins/security_solution/public/common/components/event_details/overview/__snapshots__/index.test.tsx.snap
# x-pack/plugins/security_solution/public/common/components/event_details/overview/index.test.tsx
# x-pack/plugins/security_solution/public/common/components/event_details/overview/index.tsx
# x-pack/plugins/security_solution/public/detections/configurations/examples/observablity_alerts/render_cell_value.tsx
# x-pack/plugins/security_solution/public/detections/configurations/examples/security_solution_rac/render_cell_value.tsx
# x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/all/constants.ts
* add kibana.alert.rule.parameters as a flattened type
* temp
* rule_data_formatter
* fix bug in search strategy with flattend field type where prefix was wrong (kibana.alert.rule.parameters was ignored)
* fix inventory rule data formatters
* remove console log
* hack that prepends kibana.alerts.rule.parameters in the nested subfields
* import ALERT_RULE_PARAMETERS from kbn rule data utils
* remove console log
* format custom metric link
* remove ALERT_PARAMS from technical field names
* fix bug in timelines plugin to use dotField instead of prependField & fix failing tests
* remove console log and unused variable
* delete kibana.alert.rule.params from the mapping
* flatten kibana.alert.rule.parameters and add some unit tests
* fix rule_data_formatter
* handle scenario of having multiple items in an array (multiple conditions setup in the rule)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: mgiota <giota85@gmail.com>
* Add flattend parameters object and populate it in Security Solution
* Fix severity, risk_score, bugs, tests
* Add ALERT_RULE_PARAMETERS to package
* Skip tightly coupled test
* fix more tests
* Remove unused import
* Fix threat matching API test
* Continue overriding kibana.alert.rule.risk_score and severity for now
* Add ignore_above to ALERT_RULE_PARAMETERS
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marshall Main <55718608+marshallmain@users.noreply.github.com>
* [Security Solution][Platform] - Exceptions imports (#118816)
## Summary
Addresses https://github.com/elastic/kibana/issues/92613 and https://github.com/elastic/kibana/issues/117399
Goal is to allow users to import their exception lists and items alongside their rules. This PR does not complete all the UI updates needed, but does tackle the majority of use cases. The bulk of the changes occur in `import_rules_route` and the new `import_exceptions_route`.
- Adds exceptions import endpoint in `lists` plugin
- Adds exceptions import logic in import rules route in `security_solution` plugin
- Adds integration tests for exception import endpoint
- Adds integration tests for rules import endpoint to account for new functionality
- Purposely not yet adding an import modal in the exceptions table UI until further list management features added (checked with product on this front)
* Fix parsing of errros in trusted apps creation dialog to support Exceptions API structure
* add Match Wildcard entry to the list of allowed entries for Endpoint exceptions
* Add additional test for wildcard entry and included it in array of entries
Co-authored-by: Paul Tavares <56442535+paul-tavares@users.noreply.github.com>
* First stab at surfacing deprecations from warning header
* Log deprecations with error level but disable logger context by default
* Don't filter out error logs from ProcRunner
* Another try at not having messages ignored on CI
* Log deprecation logs with warn not info
* Tests
* Let write() do it's writing
* Commit pre-built @kbn/pm package
* Second try to commit pre-built @kbn/pm package
* Enable deprecation logger for jest_integration even though logs aren't interleaved
* Apply suggestions from code review
Co-authored-by: Luke Elmers <lukeelmers@gmail.com>
* deprecations logger: warn for kibana and debug for users
* Refactor split query and deprecation logger out of configure_client
* Unit test for tooling_log_text_writer
* Fix TS
* Use event.meta.request.params.headers to include Client constructor headers
* Fix tests
* Ignore deprecation warnings not from Elasticsearch
* Log on info level
* Log in JSON so that entire deprecation message is on one line
* commit built kbn-pm package
Co-authored-by: Luke Elmers <lukeelmers@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Rudolf Meijering <rudolf.meijering@elastic.co>
Co-authored-by: Luke Elmers <lukeelmers@gmail.com>
* Switches RuleDetails to query alerts by ruleId instead of SO id
* Increases integrity of test outputs
* Cleans up duplicate RuleRegistry functions
* Removes support for rule.id for alerts filter and updates exceptions to use new filter