Commit graph

1111 commits

Author SHA1 Message Date
Tiago Costa
0af1324fe1
chore(NA): update pipeline resource definitions after v8.16.0 bump (#187594)
This PR is a simple update of our pipeline resource definition files
after the recent bumps.

---------

Co-authored-by: Jonathan Budzenski <jon@elastic.co>
2024-07-05 11:24:05 -05:00
dkirchan
55bbab1756
[Security Solution][Serverless] Fixed periodic pipeline for Gen AI (#187561)
Buildkite format was not preserved during a past merge into main. Fixing
this issue.
2024-07-05 09:11:07 +02:00
Robert Oskamp
22a940f5db
Move serverless pipeline definitions to separate files (#187253)
## Summary

This PR moves the definitions of the following pipelines from
`catalog-info.yaml` to `.buildkite/pipeline-resource-definitions`:
- `buildkite-pipeline-kibana-emergency-release` ->
`.buildkite/pipeline-resource-definitions/kibana-serverless-emergency-release.yml`
- `kibana-tests-pipeline` ->
`.buildkite/pipeline-resource-definitions/kibana-serverless-quality-gates.yml`

More details in the original PR #186833, which is split into the
creation of the new pipeline (#187251) and moving existing pipelines
from catalog-info.yaml to .buildkite/pipeline-resource-definitions (this
PR).
2024-07-05 08:58:19 +02:00
Gloria Hornero
07a74304fe
[Security Solution][Threat Hunting] Adds threat hunting API tests to our QGs (#187389)
## Summary

The Threat Hunting API tests are not part of our QGs, in this PR we are
adding them to it.

Once this PR is merged:

- All the API tests marked as `@serverless` are going to be executed as
part of the periodic pipeline
- Once this other [PR](https://github.com/elastic/kibana/pull/187266) is
merged, all the API tests marked as `@serverlessQA` will be executed as
part of the Kibana QA QG (second quality gate).

---------

Co-authored-by: dkirchan <diamantis.kirchantzoglou@elastic.co>
2024-07-04 19:00:44 +10:00
Jon
bd41c659d9
[ci] Use org wide PR status bot (#187386) 2024-07-03 08:07:19 -05:00
Gloria Hornero
2afe55eaec
[Security Solution] Updates periodic pipeline job names (#187378)
## Summary

Currently is not possible to see at first sight which execution is from
Cypress and which one from API.

<img width="2545" alt="Screenshot 2024-07-02 at 17 18 04"
src="c89c204d-e2cf-4661-87f4-1e206ad822d7">

In this PR we are updating the naming to make it easier to find out as
well as simplifying the names.
2024-07-02 12:00:15 -05:00
Jon
5b0dc5faeb
[ci] Use org wide PR comment bot (#187354) 2024-07-02 10:03:58 -05:00
Robert Oskamp
013bda4e60
Add pipeline for serverless emergency release quality gate (#187251)
## Summary

This PR adds separately quality gate pipelines for the emergency release
process.

More details in the original PR #186833, which is split into the
creation of the new pipeline (this PR) and moving existing pipelines
from `catalog-info.yaml` to `.buildkite/pipeline-resource-definitions`
(#187253).
2024-07-02 13:15:31 +02:00
Alex Szabo
6b61af3fde
[CI] Use elastic-images-prod everywhere (#185952)
## Summary
Some references to `elastic-images-qa` were left in the code, probably
as these pipelines were on a pending PR when the rest got changed.

Optionally, we should remove all the `imageProject` fields, and
everything we're setting defaults - it's just generating bloat.
2024-07-02 10:16:07 +02:00
Konrad Szwarc
414acd16a5
[EDR Workflows] Turn on new Manifest Manager feature flag. (#186596)
Turns on feature flag introduced in
https://github.com/elastic/kibana/pull/179698

Aligned tests - removed tests that were based on feature flag being
present or not.
2024-07-01 14:08:44 -05:00
Jon
581e88ba81
[ci] Use github action to approve API docs (#187246)
Cleans up our auto-approve scripts a bit to be consistent. This matches
the auto-approve backport workflow.
2024-07-01 11:23:06 -05:00
Tomasz Ciecierski
cf11c5fb3f
[EDR Workflows] change osquery pipeline (#187222) 2024-07-01 15:57:27 +02:00
Lola
64a01ef638
[Cloud Security] Agentless cloud credentials (#184162)
## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.
This PR add Automation Credentials buttons for GCP and AWS. UX copy will
be addressed in the [folllowing
ticket](https://github.com/elastic/kibana/issues/178858).

<img width="900" alt="image"
src="f7329fa7-ae48-4dc0-a7cf-a0a26d80ad6b">

For Agentless the CSPM AWS integrations, users  will able to : 
* click Launch Cloud Formation button for single account or organization
account which opens external link to Cloud Formation page.
*  create a cloud formation stack that generates access keys. 
We will use the Cloud Formation template url from the package info
`getTemplateUrlFromPackageInfo` exposed as common utility in fleet.


<img width="884" alt="image"
src="d5e5e7d2-21fe-44bc-88e7-908d29817dfb">

For Agentless the CSPM GCP integrations, users will able to click Launch
Cloud Shell button for single accounts or organization account. We get
the cloud shell template url from the package info
`getTemplateUrlFromPackageInfo`


## To test PR:

AWS
1. Log in as an admin in the management account of the AWS Organization
you want to onboard
2. Click the Launch CloudFormation button below.
3. (Optional) Change the Amazon region in the upper right corner to the
region you want to deploy your stack to
4. Tick the checkbox under capabilities in the opened CloudFormation
stack review form: I acknowledge that AWS CloudFormation might create
IAM resources.
5. Click Create stack.
6. Once stack status is CREATE_COMPLETE then click the Outputs tab
7. Copy Access Key Id and Secret Access Key then paste the credentials
below

Use: `eu-west-1` region to create stacks 

GCP
1.Replace <PROJECT_ID> in the following command with your project ID
then copy the command
2. Click Launch Google Cloud Shell, then run the command
3. Check `Trust Repo` and click `CONFIRM` button 
5. Paste and run command in the cloud shell terminal
Cloud Security team `gcloud config set project test-project-1-396010 &&
ORG_ID=693506308612 && ./deploy_service_account.sh`
5. Run 'cat KEY_FILE.json' to view the service account key. Copy and
paste it in the CSPM GCP integration.

Internal Team Developer  Tips for testing :
- Look for `cloudshell_git_branch` in the url and change `8.XX` to
`main`.
- To run script, see command
[here](https://p.elstc.co/paste/XyJg0wW8#srnavdS0GZtxapNA1ZcNu9TddLpG+zWP-99KWWpIEnr)
- 
 Any question for GCP account issue reachout to @orouz

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-06-28 16:40:58 -05:00
Jon
9854ecf93c
[build] Rename chainguard -> wolfi (#187095)
To be consistent with other stack products.
2024-06-28 09:13:52 -05:00
Jonathan Budzenski
e23230f072 Revert "Add serverless emergency release quality gate pipeline (#186833)"
This reverts commit cbedb5fff8.
2024-06-28 09:07:52 -05:00
Robert Oskamp
cbedb5fff8
Add serverless emergency release quality gate pipeline (#186833)
## Summary

This PR adds separately quality gate pipelines for the emergency release
process.
This gives us the opportunity to run a different set of checks during an
emergency release compared to a regular release.

### Details

- Add new emergency quality gates pipeline definitions in
`.buildkite/pipelines/quality-gates/emergency`. These are copies of the
regular quality gates pipeline files with the following adjustments:
- The entry point `kibana-serverless-quality-gates-emergency.yml` has an
adjusted `QG_PIPELINE_LOCATION` and comment
- The QA quality gates in `pipeline.tests-qa.yaml` is reduced to just
the CP e2e tests
- Add new pipeline
`.buildkite/pipeline-resource-definitions/kibana-serverless-quality-gates-emergency.yml`
is added that will trigger the emergency version of the quality gates.

### Other changes

In order to have things around the serverless quality gates and the
emergency release consistent, I've taken the opportunity and moved the
definitions of the following pipelines from `catalog-info.yaml` to
`.buildkite/pipeline-resource-definitions`
- `buildkite-pipeline-kibana-emergency-release` ->
`.buildkite/pipeline-resource-definitions/kibana-serverless-emergency-release.yml`
- `kibana-tests-pipeline` ->
`.buildkite/pipeline-resource-definitions/kibana-serverless-quality-gates.yml`
2024-06-28 13:04:38 +02:00
Alex Szabo
c9d2b70f84
[CI] Print ES docker images versions (#186885)
## Summary
When we're seeing errors in FTR or on the serverless verification
pipeline, we have difficulty connecting back what version of
ES-Serverless is behind the tag `:latest`.
With a recent addition to the ES Serverless docker image, this info is
now contained in labels of the image.

This PR highlights this info in the verification pipeline, as well as
the FTR output from `kbn-es`.

- Serverless verification pipeline:
https://buildkite.com/elastic/kibana-elasticsearch-serverless-verify-and-promote/builds/1454
- FTR:
![Screenshot 2024-06-25 at 17 30 48
(1)](b6244f99-52e8-4fc6-ac22-e69e01254f1f)
2024-06-27 10:36:09 +02:00
Brad White
15a0b8e4cf
[CI / FIPS] Convert smoke tests to use FIPS agent (#186858)
## Summary

Closes elastic/kibana-operations#137

- Convert FIPS daily smoke test pipeline to use FIPS agents
  - This allows the smoke tests to run in parallel now
- Removes FIPS Vagrant box from package testing
- Adds verify FIPS enabled check to pipeline 

Pipeline run: https://buildkite.com/elastic/kibana-fips/builds/90
2024-06-26 12:55:51 -07:00
Brad White
d4011ae655
[CI] Switch to prod FIPS image (#186939)
## Summary

The FIPS image has been promoted to `prod` project so use it instead of
`qa`.
2024-06-26 09:08:04 -07:00
Jon
985a28fd3b
Update obs-onboarding cypress CI config (#186926)
- removes parallelism: 2 from step definition. The test suites are not
sharded.
- Updates the path used to trigger a test run. The previous path is out
of date.
2024-06-26 09:15:03 -05:00
Kevin Lacabane
a493e4075b
[eem] rename asset_manager to entity_manager (#186617)
## Summary

Renames the experimental asset_manager plugin (never
documented/officially released) into entity_manager. I've used `node
scripts/lint_ts_projects --fix` and `node scripts/lint_packages.js
--fix` to help with the procedure and also renamed manually the
asset_manager references left.

The change also removes the deprecated asset_manager code, including the
`assetManager.alphaEnabled` plugin configuration. This means
entityManager plugin will be enabled by default.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-06-26 14:25:32 +02:00
Brad White
8c83173e62
[CI / FIPS] Fix env var for checks (#186565)
In #183777 review iterations `FIPS_ENABLED` was changed, but not updated
here.

`Checks` with FIPS agents enabled:
https://buildkite.com/elastic/kibana-pull-request/builds/217048#019037fd-675f-4860-839a-d5e0602a40c4/281-284
2024-06-24 12:38:02 -07:00
Jon
ecda2a8fc1
[.buildkite] Upgrade braces to 3.0.3 (#186421) 2024-06-24 06:39:18 -05:00
elena-shostak
d839b03027
FTR http2 configs for security tests (#186444)
## Summary

Added FTR configs over http2 for security tests.

- `security_api_integration/oidc.http2.config.ts`
- `security_api_integration/saml.http2.config.ts`
- `security_functional/oidc.http2.config.ts`
- `security_functional/saml.http2.config.ts`

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

__Fixes: https://github.com/elastic/kibana/issues/184769__

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-06-21 20:27:24 +02:00
Alex Szabo
350044a927
[BK] Migrate emergency-release-branch-testing pipeline to the new infra (#186537)
## Summary
Migrates (without history preservation) the emergency release branch
testing job to the new infra

Verified through:
 - [x] locally tested the pipeline definition file
- [x] ran the testing pipeline through the migration staging job
(https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/125#_)
2024-06-21 16:16:02 +02:00
Thibault Richard
548301d6a9
Update deploy.sh to fail if curl doesn't get 2xx (#186546)
This adds the use of the `-f` flag to `curl` commands so that the
`deploy.sh` script will fail if an HTTP response is not 2xx.

This will prevent, for example, us from thinking that an update of a
project worked when instead the API responded `405` and nothing happened.

Related to https://github.com/elastic/kibana/pull/186543.
2024-06-20 22:35:57 +02:00
Brad White
324673c8d6
[ci / FIPS] Dynamic agent selection. Add FIPS agents (#183777)
## Summary

- Closes https://github.com/elastic/kibana-operations/issues/100
- Utilizes FIPS agent from elastic/ci-agent-images#686
- Adds dynamic agent selection during PR pipeline upload
- FIPS agents can be used with `FTR_ENABLE_FIPS_AGENT` env variable or
`ci:enable-fips-agent` label
- Removes agent image config from individual steps in favor of image
config for the whole pipeline.
- Steps can still override this config by adding `image`, `imageProject`
etc
- Adds a conditional assertion to `Check` CI step which validates that
FIPS is working properly


### Testing
- [Pipeline run using FIPS
agents](https://buildkite.com/elastic/kibana-pull-request/builds/215332)
  - Failures are expected and this possibly ran with flaky tests
2024-06-20 13:09:45 -07:00
Tom Myers
16bfe577d5
[EEM] Add APIs for managing api keys and enabling entity discovery (#184548)
## Summary

This PR adds endpoints for managing builtin entity discovery:
- `GET /internal/api/entities/managed/enablement`: check if stored API
key exists and is valid, then checks whether builtin definitions are
installed and running
- `PUT /internal/api/entities/managed/enablement`: creates API key if
none exists, then installs and kickoff the builtin definitions
- `DELETE /internal/api/entities/managed/enablement`: stops and
uninstalls builtin definitions, then delete API key
- `GET /internal/api/entities/definition`: returns the definitions
installed and their corresponding state `{ installed: bool, running:
bool }`

The API key is stored in an encrypted saved object, and has only the
permissions required to manage the transforms/ingest pipelines, and read
the source data.
Built in definitions are stored in code and have hardcoded IDs with a
special prefix `builtin_`.

The change also includes an `entityClient` that can be consumed by
public plugins and exposes methods that proxy the http endpoints listed
previously.

### Testing
- verify entity discovery is not enabled with `GET
kbn:/internal/api/entities/managed/enablement`
- setup entity discovery with `PUT
kbn:/internal/api/entities/managed/enablement`
- verify builtin definitions are installed and running `GET
kbn:/internal/api/entities/definition?builtIn=true`
- verify entity discovery is enabled with `GET
kbn:/internal/api/entities/managed/enablement`
- disable entity discovery with `DELETE
kbn:/internal/api/entities/managed/enablement`
- verify builtin definitions are not installed anymore `GET
kbn:/internal/api/entities/definition?builtIn=true`
- verify entity discovery is disabled with `GET
kbn:/internal/api/entities/managed/enablement`

---------

Co-authored-by: Kevin Lacabane <kevin.lacabane@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-06-20 20:56:30 +02:00
Alejandro Fernández Haro
8c17c138b9
fix(serverless/deploy): use patch instead of put (#186543)
## Summary

The `PUT` endpoint was deprecated and removed on [February
20](https://groups.google.com/a/elastic.co/g/dev/c/1S0xcVAbmCA/m/Ybkr1H01AQAJ).
We should use `PATCH` when updating the existing projects.
2024-06-20 17:26:23 +02:00
dkirchan
6ce61db2ff
[Security][Serverless] Add Product types in FTR API Integration tests. (#184309)
# Pull Request Overview
This pull request (PR):
1. Enables Product Types for FTR API Integration Test Suites in
Serverless MKI:
- Previously, the test suites ignored product types entirely. With this
PR, scripts to run the tests have been relocated to
x-pack/test/security_solution_api_integration/scripts.
- Users can now run tests from the API Integration tests directory for
security solutions by using the command:
TARGET_SCRIPT={script_from_package_json} node
./scripts/mki_start_api_ftr_execution. This will execute the following
steps:
1. Create a security serverless project, respecting the product types
specified in the serverless configuration found in the config folder of
the relevant test suite.
      2. Reset credentials.
3. Wait for Elasticsearch (ES) and Kibana to be ready and available.
      4. Execute the tests.
      5. Delete the project upon completion.
2. Adds Proxy Services Organizations to .ftr Role Users Files:
- This PR updates the .ftr role_users files to include all proxy
services organizations, ensuring they have the necessary permissions for
the tests.

# Implementation Details
Product Types

  - Previous Setup:
- A project was created and handed over to the test suite to run the API
tests against, without considering product types.
  - Changes Introduced:
- The script execution for tests has moved to
x-pack/test/security_solution_api_integration/scripts.
- Tests can be initiated using the command from the API Integration
tests folder where package.json exists:
      ```
TARGET_SCRIPT={script_from_package_json} node
./scripts/mki_start_api_ftr_execution
      ```
- The mki_start_api_ftr_execution script performs several steps to run
the tests, including creating a security serverless project with
specified product types, resetting credentials, ensuring ES and Kibana
readiness, executing tests, and cleaning up the project afterward.
- The script reads extra configuration (currently only product types are
supported) in the specific format as is, from the following file :
[api_configs.json](https://github.com/elastic/kibana/pull/184309/files#diff-1122baffe7ff843b1f486cee95468bed5851a9a4934be747f540bd42dc9a07daR2).
The key for the JSON file is the name of the script in
[package.json](https://github.com/elastic/kibana/pull/184309/files#diff-c6af1c81947b3a77bed431c688c7ad38c8969bd52e1c3ea92d643f09d422eb61R296)
- If a specific configuration is not required and the default complete
project is needed for the test to run, the key and configuration in the
`api_configs.json` file can be ommitted.

# Summary

This PR enhances the flexibility and functionality of the FTR API
integration test suites for serverless MKI by incorporating product type
considerations and updating the role_users configuration to include
proxy services organizations.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-06-20 17:30:35 +03:00
Alex Szabo
5259fa6764
[CI] Use legacy vault for deployment credentials (#184944)
## Summary
With the migration to the shared buildkite infra, we've also switched to
using the ci-prod vault (https://vault-ci-prod.elastic.dev) for all
CI-related secrets. We found it reasonable then, to also switch the
storage of the credentials for the deployments there. It's since been
proven unnecessary, even confusing for developers, as they might not be
adequately set up for accessing the two vaults. We've also learned, that
both of these vault instances are here to stay, so there's no push to
migrate everything to the ci-prod instance.

So, this PR switches back to using the legacy vault in all cases for
storing deployment keys, as it fits better with the developers' daily
secret handling duties.

Also, adds a cleanup part to the purge routine.

- [x] extract vault read / write to a parametric shell script, because
the typescript invocations to vault won't have an easy access to the
`set_in_legacy_vault`
2024-06-20 09:51:37 +02:00
Davis McPhee
57891ff353
[Discover] Add support for contextual awareness functional tests (#185905)
## Summary

This PR adds functional test support for the Discover contextual
awareness framework, and adds tests for the initial `getCellRenderers`
extension point using example profiles.

To support this, this PR introduces a new YAML setting called
`discover.experimental.enabledProfiles` which can be used to selectively
enable profiles both for functional testing and demoing WIP profiles
that aren't yet ready for GA.

Example usage:
```yml
discover.experimental.enabledProfiles: ['example-root-profile', 'example-data-source-profile', 'example-document-profile']
```

Flaky test runs:
- Stateful x50:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6304
- Serverless Observability x50:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6305
- Serverless Search x50:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6306
- Serverless Security x50:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6307

Resolves #184699.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2024-06-19 14:17:26 -03:00
Yulia Čech
5e346b2561
[Console] Enable monaco by default (#184862)
## Summary

Closes https://github.com/elastic/kibana/issues/184025

This PR enables the migration from Ace to Monaco in Dev Tools Console by
default in the main branch. All serverless projects will still have the
migration disabled by default. After 8.15 is branched, the migration
will be disabled there as well. The intended release version for this
migration is 8.16.

### Functional tests 
This PR creates a copy of functional tests for Monaco Console and keeps
the tests for Ace in a separate folder. When the migration is released,
we can remove the code for Ace together with tests.
The Monaco tests are not the exact copy of the Ace tests, since some
functionality and autocomplete behaviour is slightly different in the
migrated Console. For example, the auto-closing of brackets works in
Monaco when typing something, but is not kicking in in the tests.

Flaky test runner 

### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-06-19 17:37:04 +02:00
Sébastien Loix
37ca5c6bd9
[Spaces] Add solution view select in UI (#186178) 2024-06-19 16:18:13 +01:00
Alex Szabo
c2986d9a6f
[CI] Fix missing test failure annotations (#186446)
## Summary
rename `SLACK_NOTIFICATIONS_ENABLED` =>
`ELASTIC_SLACK_NOTIFICATIONS_ENABLED` to follow up on elastic-wide
buildkite changes.
This should re-enable test failure listing on the slack errors we post.
2024-06-19 15:55:18 +01:00
Maxim Palenov
858ef15c5a
[Security Solution] Auto-bundle Detections API OpenAPI specs (#186384)
**Addresses:** https://github.com/elastic/kibana/issues/184428

## Summary

This PR adds scripts for automatic bundling Detections API OpenAPI spec as a part of PR pipeline. Corresponding resulting bundles are automatically committed to `x-pack/plugins/security_solution/docs/openapi/ess/` and `x-pack/plugins/security_solution/docs/openapi/serverless` folders.
2024-06-18 13:29:29 -07:00
Maxim Palenov
7a0065d5b6
[Security Solution] Add missing Lists API OpenAPI specifications (#185865)
**Resolves:** https://github.com/elastic/kibana/issues/183821

## Summary

This PR adds missing OpenAPI specifications for Lists API which are the following

- `POST /api/lists`
- `GET /api/lists`
- `PUT /api/lists`
- `DELETE /api/lists`
- `PATCH /api/lists`
- `GET /api/lists/_find`
- `GET /api/lists/privileges`
- `POST /api/lists/items`
- `GET /api/lists/items`
- `PUT /api/lists/items`
- `DELETE /api/lists/items`
- `PATCH /api/lists/items`
- `POST /api/lists/items/_export`
- `POST /api/lists/items/_import`
- `GET /api/lists/items/_find`
- `POST /api/lists/index`
- `GET /api/lists/index`
- `DELETE /api/lists/index`

**Note:** Code generation is enabled for the added specs to verify that it works and produces expected results. Generated Zod schemas and types aren't integrated in the route's code.
2024-06-18 13:22:19 -07:00
Jon
3528d54e27
[ci] Remove 8.13 (#186377)
8.14 is released.  8.13 tests do not need to run now.
2024-06-18 12:17:33 -05:00
Jon
b98fc1418b
[ci] Prevent alerts for spot preemptions (#186329)
After migrating to gobld, the string identifying spot instances has
changed. This updates the check to determine if there are retries
available by filtering on the metadata for both gobld and
buildkite-agent-manager.
2024-06-18 08:13:09 -05:00
Julia Rechkunova
250c729087
[Discover][ES|QL] Reset selected fields when modifying the ES|QL query (#185997)
- Closes https://github.com/elastic/kibana/issues/183961

## Summary

This PR updates the logic of resetting columns when modifying the ES|QL
query. The previous implementation was added in
https://github.com/elastic/kibana/pull/167492 and then changed in
https://github.com/elastic/kibana/pull/177241.


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>
2024-06-18 10:07:07 +02:00
Nicolas Chaulet
a2c068a5f2
[Fleet] Filter space aware entities in Fleet UI/API (#184869) 2024-06-17 10:03:01 -04:00
Jordan
6fc0663d2a
[Cloud Security] Serverless PLI auth block using UI extension infra (#184665) 2024-06-17 16:46:16 +03:00
Alex Szabo
f6968f3091
[CI] Prevent duplicate serverless image build (#186164)
## Summary
Only adds build_project.yml if there's not already a deploy_project.yml
added through labels

## Context
Based on the labeling logic, if we had `ci:build-serverless-image` and
`ci:project-deploy-*`, the steps for building the docker image would be
added twice.

See: https://elastic.slack.com/archives/C0D8P2XK5/p1718268306523329
2024-06-17 10:42:47 +02:00
Patrick Mueller
f016398f8b
[ResponseOps] implement task claiming strategy mget (#180485)
resolves: https://github.com/elastic/kibana/issues/181325

## Summary

Adds a new task claiming strategy `unsafe_mget`, which can be used instead of
the default one `default`. Add the following to your `kibana.yml` to
enable it:

    xpack.task_manager.claim_strategy: 'unsafe_mget'
2024-06-13 16:04:23 -04:00
Drew Tate
ca98a8bd93
[ES|QL] add docs step to sync pipeline (#186011)
## Summary

https://github.com/elastic/kibana/pull/184689 added a script to gather
ES|QL function docs from Elasticsearch.

This PR adds it to our CI pipeline!

Close https://github.com/elastic/kibana/issues/173492
Close https://github.com/elastic/kibana/issues/173817

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-06-12 17:42:37 -07:00
Alex Szabo
2433131aed
[CI] Remove caching of api-docs (#186050)
## Summary
When building the VM image, especially concerning the cache-warmup step
(https://github.com/elastic/ci-agent-images/pull/736) this step will
fail, because it's running on agents that won't have access to this
repository ([see this
build](https://buildkite.com/elastic/ci-vm-images/builds/5275#01900893-db68-4242-b73e-cda24df6e20c)).

We're probably not losing much by not having this repo cached, or if we
need it, we can always build the VM image with this repo cloned, and use
it through the git-mirrors.
2024-06-12 18:28:27 +02:00
Jon
642ceeb19c
[ci] Collapse list of agents in annotiation (#186009)
Collapses the list of agents at the top of the Buildkite UI. Thanks to
`@brianseeders` for the fix.

Before:
https://buildkite.com/elastic/kibana-on-merge/builds/46264#annotation-ctx-gobld-metrics
2024-06-11 15:39:57 -05:00
Ievgen Sorokopud
4392ee80bc
Manual rule run from rule details and rules table (#9327) (#184500)
## Summary

Main ticket https://github.com/elastic/security-team/issues/9327

With this changes we introduce the way to schedule rule run manually.
There are two ways to do that in UI:
1. Via "All actions" button on rules management page
2. Via "All actions" button on rule's details page

**NOTES**:
1. To be able to test these changes, you need to enable feature flag
`manualRuleRunEnabled` first
2. Bulk action will be part of a separate ticket/PR

**RECORDING**:


d49bad53-026e-49c2-aeea-481203260b23

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
    - [x] https://github.com/elastic/security-docs/issues/5264
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] [Cypress RM (100 ESS & 100
Serverless)](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6263)
- [ ] [Cypress DE (100 ESS & 100
Serverless)](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6280)
- [x] [Integration Rule Gaps (100 ESS & 100
Serverless)](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6257)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
2024-06-11 21:12:29 +02:00
Alex Szabo
b5af943714
[BK] Migrate the kibana-on-merge job (#184391)
## Summary
This PR adds the pipeline resource definition and adjusts the agent
targeting rules for the
[kibana-on-merge](https://buildkite.com/elastic/kibana-on-merge) job.

Migration staging runs: 
-
https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/116

8.14: #184513 
7.17: #184497
2024-06-11 10:08:16 +02:00
Lukas Olson
7094c8e1d8
Create ES|QL performance journey for Discover (#184768)
## Summary

Resolves https://github.com/elastic/kibana/issues/183419.

Adds a performance journey that performs the same tests as the existing
Discovery journey.

To run locally:

```
node scripts/run_performance.js --journey-path x-pack/performance/journeys_e2e/many_fields_discover_esql.ts
```
2024-06-10 15:53:42 -07:00