Commit graph

1059 commits

Author SHA1 Message Date
Jon
8f9630b0b9
[ci] Remove defend workflows from on-merge-unsupported (#185047)
This is already in the on-merge pipeline.
2024-06-07 14:35:34 -05:00
Jon
79ab4de52f
Add serverless pointer compression builds (#184675)
This introduces a Node.js build with pointer compression enabled to our
serverless artifacts. Pointer compression is a v8 feature that can
reduce memory consumption. Details can be found at
https://v8.dev/blog/pointer-compression.

Impact depends on the workload. For idle projects we're seeing runtime
memory drop by ~33%.

### Implementation

Previously, build archives were created based on platform and CPU
architecture. Archives can now also be created with a variant. In this
case we're introducing a `serverless` variant. In the future we can
split this further per project type if needed.

The serverless variant installs two versions of Node.js: the existing
glibc-217 compatible version and the new pointer compression version.
Build scripts for the pointer compression version were introduced at
https://github.com/elastic/kibana-custom-nodejs-builds/pull/18.
kibana-serverless will default to using the pointer compression version.

### Tradeoffs

- Pointer compression builds have a heap limit of 4Gb. To mitigate this
we continue installing the glibc-217 compatible version and can swap
runtimes if a larger heap is needed.
- Pointer compression builds are not official Node.js builds
- Unofficial builds have been [functional since Node
14](https://github.com/nodejs/unofficial-builds/commits/main/recipes/x64-pointer-compression)
- We're already running an unofficial build to support operating systems
running older versions of glibc


Additional test runs:
https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4366

https://buildkite.com/elastic/appex-qa-serverless-kibana-ftr-tests/builds/1884

Closes https://github.com/elastic/kibana/issues/96062
2024-06-07 11:18:44 -05:00
Alex Szabo
ab6ecdb3a5
[CI] Fix inverted DRY_RUN behaviour (#184841)
## Summary
We added this check in https://github.com/elastic/kibana/pull/177736 but
we haven't really tested it in action, it looks like we had the dry-run
behaviour inverted.
2024-06-05 17:10:00 +02:00
Alex Szabo
e4326522a2
[CI] Add docs link to deployment secrets (#184779)
## Summary
Adds some messaging to direct developers toward the prod-ci vault, plus
CI docs links.

Also, removes branching that were added for the duration of the
migration. Since the PR build pipelines that are using these are
migrated, only one branch was active.
2024-06-05 16:59:23 +02:00
Angela Chuang
7ab3676af4
[SecuritySolution] Relocate endpoint tests (#183611)
## Summary

https://github.com/elastic/kibana/issues/181683

This PR moves 

1. x-pack/test/security_solution_endpoint_api_int to
`x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint_api_int`
2. x-pack/test/security_solution_endpoint to
`x-pack/test/security_solution_api_integration/test_suites/security_solution_endpoint`
3. x-pack/test/timeline to
`x-pack/test/security_solution_api_integration/test_suites/investigation/timeline`

### To test:

1. ```cd x-pack/test/security_solution_api_integration```

2. ```node ../../../scripts/functional_tests_server.js --config
./test_suites/security_solution_endpoint/serverless.endpoint.config.ts```

Once the server is launched (you might need Docker to run the serverless
tests), open another terminal, go to the same path, and execute the
command appears in the original:

The command should look like: ```node
../../../scripts/functional_test_runner
--config=test_suites/security_solution_endpoint/serverless.endpoint.config.ts```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-06-04 13:04:01 +01:00
Sébastien Loix
eee34b2486
[Stateful sidenav] Cleanup iteration 2 (#184367) 2024-06-03 12:59:27 +01:00
Alex Szabo
265e8799b8
[CI] Prevent deployment of missing/failed serverless docker images (#184594)
## Summary
Removes `soft_fail` to prevent the run of the deploy script if something
about the image build fails.

Closes: https://github.com/elastic/kibana/issues/184591
2024-05-31 11:16:08 -05:00
Jean-Louis Leysens
975eeed255
[HTTP/OAS] Commit OAS snapshot (#183338)
Close https://github.com/elastic/kibana/issues/181992

## Summary

First iteration of a CLI to capture an OAS snapshot.

## How to test

Run `node ./scripts/capture_oas_snapshot.js --update --include-path
/api/status` and see result in `oas_docs/bundle.json`.

If you have the [bump CLI](https://www.npmjs.com/package/bump-cli)
installed you can preview the hosted output with `bump preview
./oas_docs/bundle.json`

## Notes
* Added ability to filter by `version`, `access` (public/internal) and
excluding paths explicitly to the OAS generation lib
* Follows the same general pattern as our other "capture" CLIs like
`packages/kbn-check-mappings-update-cli`
* Result includes only `/api/status` for now, waiting for other paths to
add missing parts

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-05-30 06:02:19 -07:00
Anton Dosov
88757a30a6
Add updated_by to saved objects (#182687)
## Summary

close https://github.com/elastic/kibana-team/issues/899

- Adds `updated_by` to saved object, similar to recently added
`created_by` https://github.com/elastic/kibana/pull/179344
- Fixes `created_by` / `created_at` should be set during upsert
- Improves functional tests coverage
2024-05-29 08:03:11 -07:00
Drew Tate
cf1ff97c12
[ES|QL] add function definition sync to CI (#184225)
## Summary

Runs the script added in https://github.com/elastic/kibana/pull/179584
on the weekly schedule.

Successful run:
https://buildkite.com/elastic/kibana-es-ql-grammar-sync/builds/21#018fab3b-d051-4852-a03e-889cf156fb70/838

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2024-05-28 11:02:20 -05:00
Alex Szabo
ab78b725ba
[CI] Serverless Release assistant to consider recent QAF builds (#184306)
## Summary
Builds on: https://github.com/elastic/qaf-tests/pull/75

If we only rely on the 3-hour cycle of the QAF test suite as an
indication for a "releaseable" build, then we always work with this 3-4
hour lead time. This can make releasing on-demand very delayed.

@pheyos added `PRE_RELEASE_CHECK=true` to some builds, we can use this
as an indicator that a test run was meant to prove the releaseability of
a version.

This PR also moves the release assistant job together with other
ES_Serverless jobs.
2024-05-27 15:30:12 +02:00
Alex Szabo
f321c4ff2c
[CI] Fix agent targeting for pipelines added since the PR-build migration (#184208)
## Summary
Some pipelines were added/changed since the PR build pipeline was open,
this retroactively fixes those agent targeting rules.
2024-05-24 13:30:16 +02:00
Alex Szabo
09a165f3e6
[BK] Migrate batch 2 - kibana-pull-request job (#183158)
## Summary

Part of: https://github.com/elastic/kibana-operations/issues/79

Migrates: 
- kibana / pull-request
[base.yml](https://buildkite.com/elastic/kibana-pull-request)

## Validations
- [x] Validated RRE locally

Tested on the kme test pipeline: 
- [x] Main: https://buildkite.com/elastic/kibana-kme-test/builds/343
- [x] [8.14](https://github.com/elastic/kibana/pull/183537):
https://buildkite.com/elastic/kibana-kme-test/builds/340
- [x] [7.17](https://github.com/elastic/kibana/pull/183707):
https://buildkite.com/elastic/kibana-kme-test/builds/339
2024-05-24 10:37:36 +02:00
Alex Szabo
989729fe39
[CI] Skip build step, if KIBANA_BUILD_ID is given (#184121)
## Summary
Similar to other cases in our CI, if `KIBANA_BUILD_ID` is present, we
can skip the build step, and the test steps would download artifacts
from the referenced build.

If the elasticsearch side invocations to this pipeline provide
`KIBANA_BUILD_ID`, then we can save ~15-20m on these runs.

see: https://elastic.slack.com/archives/C5UDAFZQU/p1716450726916959

closes: https://github.com/elastic/kibana-operations/issues/116
2024-05-23 15:48:21 +02:00
Alex Szabo
6f00ab1e19
[CI] Add missing slack notification channels (#184045)
## Summary
Some jobs were missing the notification channel, despite having
originally had notifications turned on.
This PR adds `SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts'`
here.
2024-05-22 11:36:12 -07:00
dkirchan
abb29e8c75
[Security][Serverless] Quality Gate API Integration tests split (#183612)
## Summary
This PR splits the API Integration test suite from one pipeline
including all tests to using the already existing pipelines for the
security quality gate and splitting the TS scripts per team.

With this PR merged the following should happen:
- The [FTR API integration
tests](https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-api-integration/builds/445)
pipeline should be removed
- All the scripts of this pipeline are split to the relevant team
pipelines. For example the team which maintains the tests should be able
to see the following structure when a build is triggered. (The noted
group is the API tests for the specific team)
<img width="1182" alt="Screenshot 2024-05-20 at 5 56 49 PM"
src="87c1fc1c-4425-4756-890f-b458da0e189a">
- In order to identify why the build is triggered, (Quality gate OR
Periodic Pipeline) the following two snippets will define the _triggered
by_ information.

---

**Triggered By Quality Gate**
<img width="1156" alt="Screenshot 2024-05-20 at 5 21 04 PM"
src="0e3e8928-7306-44ee-acd8-4368d93e452d">

** Triggered By Periodic Pipeline ** 
<img width="1154" alt="Screenshot 2024-05-20 at 5 49 11 PM"
src="aa8d6591-a612-4f60-a433-c80e213bc6b8">

---------

Co-authored-by: Gloria Hornero <gloria.hornero@elastic.co>
2024-05-22 15:55:49 +03:00
Brad White
8cb8306000
[CI / FIPS] Adjust FIPS daily pipeline alerts, start time (#183855)
## Summary

The FIPS pipeline may be failing for quite awhile for issues to get
fixed and as the project ramps up. For now divert the alerts to a new
Slack channel. Also adjusted the start time so that it completes earlier
in the day.
2024-05-20 11:47:25 -07:00
Yan Savitski
a9cb7d2423
[Search] [Playground] FTR tests (#183329)
Approach with different configs for kibana ui and serverless was peek
out from security_solution test. 48 serverless config files are defined
in the test folder.

Test: no index

check no index message
Test: no connector

Add Index of example data (can be 10 docs into elasticsearch, BM25)
Add a connector (showing the modal)
verify the modal is shown
Test: with connector

seed ES with a connector in the test
Ask a question
Validate the connector has been called and respond back
validate the response is returned
validate the view query can be opened and content (query + fields) is as
expected
validate the edit context is can be opened and the fields is as expected
2024-05-20 09:18:11 -05:00
Shahzad
8b7fa0d3f8
[SLO] Synthetics based SLO e2e tests (#183637)
## Summary

Setting up Elastic/Synthetics based slo e2e tests !!

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-05-20 11:49:22 +02:00
Isaac Karrer
135961b720
Update docker.elastic.co/ci-agent-images/quality-gate-seedling Docker tag to v0.0.4 (#183781)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.elastic.co/ci-agent-images/quality-gate-seedling | patch |
`0.0.2` -> `0.0.4` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjMuOSIsInVwZGF0ZWRJblZlciI6IjM3LjM2My45IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2024-05-17 15:06:18 -07:00
Konrad Szwarc
3d1d2a5d43
[EDR Workflows] Unified Manifest - Manifest Manager (#179698)
This pull request introduces a new SO used for keeping relations between
artifactId and policyId. It addresses an issue where some users found
the single SO structure containing too many nested entries. Originally,
we planned to rewrite the existing Manifest Manager. However, during the
POC implementation, it became clear that the effort required to refactor
and retest the existing solution would be substantial. Therefore, this
pull request can be considered as the first step in transitioning our
approach from one SO to this new, distributed one.

The main idea behind these changes is to modify the structure of the SO,
rather than the logic of the Manifest Manager. To accomplish this, we
need to retrieve the SO from the new source, translate it into the
existing SO format (many SOs to one), execute the unchanged operations
of the Manifest Manager on artifacts, translate the resulting SO into
multiple SOs, and save them.

This change is expected to be deployed with a Feature Flag, and we need
to ensure that everything continues to function correctly in both cases.
Therefore, I've introduced a new FTR suite with the Feature Flag
enabled, which should be run alongside tests with the Feature Flag
disabled. This suite contains duplicated test files that depend on SO
logic. When we activate the Feature Flag, these tests should replace the
existing ones, as the Unified Manifest SO will become the default
approach.

It appears that there is no need to introduce any kind of migrations, as
the Manifest Manager is capable of recreating missing SOs (which has
been tested).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-05-17 16:57:12 +02:00
Brad White
e53ff4411b
[FIPS / CI] Fix ES ML startup issues, UUID permissions, FTR tests status, OpenSSL target. Switch to Ubuntu (#182295)
Closes elastic/kibana-operations#96

[new pipeline run](https://buildkite.com/elastic/kibana-fips/builds/28)
[old pipeline run](https://buildkite.com/elastic/kibana-fips/builds/24)

- Fixes OpenSSL compilation so that it does not overwrite the OS version
and break OS functionality.
- Fixes issue where ES would not start due to ML pipe being unable to
write to Vagrant synced folder.
  - Reenabled ML in FIPS pipeline
- Fixes permission where Kibana could not write UUID file.
- Fixes smoke test exit code not reporting correctly.
- Fixes Buildkite annotation for failed tests
[example](https://buildkite.com/elastic/kibana-fips/builds/23).
- Switches the base VM image from RHEL9 to Ubuntu due to RHEL9
subscription requirements to install repo packages.
- This blocked installing Chrome, causing tests using Webdriver to fail.

---------

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2024-05-16 08:13:57 -07:00
Jon
70b18796f8
[ci/project-deploy] Fix links (#183511) 2024-05-15 17:03:37 -05:00
Alex Szabo
5e95a76796
[CI] Use new-infra-type agent targeting for chainguard build (#183545)
## Summary
This PR ties https://github.com/elastic/kibana/pull/183200 +
https://github.com/elastic/kibana/pull/182582 together
2024-05-15 19:26:44 +02:00
Jon
fe6397bfed
[artifacts/serverless] Fix artifact upload (#183506)
`kibana` should be `kibana-serverless`. Also uploads the docker context.
2024-05-15 12:01:42 -05:00
Alex Szabo
834ea8810c
[CI] Increase artifact build timeout (#183482)
## Summary
Increases step timeout for building the whole artifact collection by
15m.

With some recent additions ([chainguard
build](https://github.com/elastic/kibana/pull/183200) adds ~7m) and the
new infra overhead, we've gone from ~50-52 minutes to ~57-60 minutes
(this one timed out exactly on the last bit:
https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/4295#018f7b4c-3629-4c4f-8d80-85b2552a43c4)
2024-05-15 12:28:58 +02:00
Alex Szabo
05fce3b4ba
[CI] Fix issues related to publish (#183393)
## Summary
On the new infra, the publish step will still require legacy vault
credentials and login.
(https://buildkite.com/elastic/kibana-artifacts-staging/builds/3513#018f7691-73c8-4e6f-862b-328b05d9de3b)

As a fix: this PR digs up the credentials from the vault instead of
gcloud secrets on the new infra.

Also, other usages of role-id/secret-id is used are moved in the
legacy-vault usages, plus minor code re-org, to reduce branching, and
future cleanup.
2024-05-15 09:42:42 +02:00
Jon
6aa7987eeb
[build] Add image based on chainguard (#183200)
Adds a new docker image, `kibana-chainguard` using
[chainguard-base](https://images.chainguard.dev/directory/image/chainguard-base).
For now this is only for testing, exact naming tbd.

Testing
```
docker load < kibana-chainguard-8.15.0-SNAPSHOT-docker-image-aarch64.tar.gz
docker run --rm docker.elastic.co/kibana/kibana-chainguard:8.15.0-SNAPSHOT
```
2024-05-14 16:10:07 -05:00
Jon
0982835800
[ci] Fix ci:build-serverless-image (#183394)
artifacts_container_image.yml is attempting to select an agent that
doesn't exist on Kibana CI's infrastructure
2024-05-14 09:26:32 -05:00
Patryk Kopyciński
13db1c9b21
Downgrade Cypress to 13.6.2 (#183047)
## Summary

We noticed some instability in Cypress in current version, downgrading
seems to be solving the issue.
2024-05-14 16:04:23 +02:00
Alex Szabo
9d1a37d2db
[CI] Avoid docker login if docker is not running (#183379)
## Summary
We've found that the command tries to log in to docker in cases when the
`docker` binary is available (installed) but not running on the devices.
This can happen, for example, on a device that's set up a bit
differently than our normal CI executors (e.g.: [bare metal
executors](https://buildkite.com/elastic/kibana-single-user-performance/builds/13383)).

This PR makes it sure that we only interact with docker in that step, if
it's running.
2024-05-14 05:09:38 -07:00
Jon
931b587dac
[ci/docker] Only run commands if docker bin exists (#183310)
Fixes specific cases, like static agents used for updating caches
without the docker binary, from running docker commands.
2024-05-13 11:14:37 -05:00
Alex Szabo
a4bb0ab5bf
[BK] Fix pipeline resources post-merge (#183317)
## Summary
8.13-related builds/schedules should be removed from the pipelines,
because that branch has been deactivated since then
2024-05-13 18:04:34 +02:00
Jon
306e5ec864
[ci] Refactor docker login (#183278)
Originally `docker login` was localized to a single step and was managed
only in that step. Over time, this has expanded most pipelines and
steps. This changes the pattern to authenticate once during pre command.
2024-05-13 10:15:02 -05:00
Alex Szabo
d5362fdaf7
[BK] Migrate batch 1 (Artifact builds) (#182582)
## Summary
Migrates batch 1 - artifact builds. The upload aspect wasn't tested,
because it's programmed only to run from `main`, and we didn't want to
interfere with the ongoing releases. This can be tested after the merge.

Verification:
- [x] RREs tested locally
- [x] kibana / artifacts trigger
(https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/87)
- [x] kibana / artifacts container image
(https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/86)
- [x] kibana / artifacts snapshot
(https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/88)
- [x] kibana / artifacts staging
(https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/88)
- [x] 8.13 / 8.14 / 7.17 verification (only a few jobs need to work
here)

Originals:
- kibana / artifacts trigger
[kibana-artifacts-trigger.yml](https://buildkite.com/elastic/kibana-artifacts-trigger)
- kibana / artifacts container image
[kibana-artifacts.yml](https://buildkite.com/elastic/kibana-artifacts-container-image)
- kibana / artifacts snapshot
[kibana-artifacts.yml](https://buildkite.com/elastic/kibana-artifacts-snapshot)
- kibana / artifacts staging
[kibana-artifacts.yml](https://buildkite.com/elastic/kibana-artifacts-staging)

Backports:
 - https://github.com/elastic/kibana/pull/182781
 - https://github.com/elastic/kibana/pull/182780
 
The backports don't need to have the pipeline resource definition files,
however, we forked 8.14 off from main, where we already had the
resources. I'll remove all the unnecessary resource defs from the legacy
branches, once we finalize the state (simply to save a little
inconvenience on future backports.)
2024-05-13 16:06:55 +02:00
Alex Szabo
ef35ee9db6
[CI] Mitigate typecheck timeout issues (#183257)
## Summary
We've recently seen a handful of step timeouts when running type-checks.
While this is not the best solution, it mitigates for potential builds
failed, and retries due to timeouts.

This PR also contains some cleanup around previous, type-check related
jobs (e.g.: the [type-check issue of 2023
august](https://github.com/elastic/kibana/pull/167060))
2024-05-13 15:17:12 +02:00
Alex Szabo
38d4230e61
[CI] Comment flaky test results on tested PR (#183043)
## Summary
Extends the flaky-test-runner with the capability to comment on the
flaky test runs on the PR that's being tested.

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

- chore(flaky-test-runner): Add a step to collect results and comment on
the tested PR
2024-05-13 03:47:30 -07:00
Alex Szabo
a1b32be9a2
[CI] Switch to use elastic-images-prod for all migrated pipeline steps (#183140)
## Summary
We stuck with using the `elastic-images-qa` because that's how we
initially set up the migration scripts and didn't bother to switch over
once we got the images working as most of the pipelines were low-risk,
and a potential issue would have been easy to fix.

While the same image goes to QA and prod every day, moving forward, we
need to allow some experimentation at the QA images level, as we work on
the caching and further optimizations. We shouldn't allow that
experimentation to affect the already migrated pipelines.

This PR switches over to using the `elastic-images-prod` repo. Images
get promoted here if they're built from the `main` of
https://github.com/elastic/ci-agent-images, or promoted manually from a
branch build.

This change should not affect existing behavior. 
We didn't test every pipeline but the assumption is that if one works,
all works:
https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/94

Will merge this once 8.13 is no longer active.
2024-05-10 10:03:11 -05:00
Angela Chuang
517e4a4d39
[SecuritySolution] Security Solution API integration test files relocation (#181605)
## Summary

https://github.com/elastic/kibana/issues/181683

This PR moves the existing Security Solution API integration tests from
`x-pack/test/api_integration/apis` to
`x-pack/test/security_solution_api_integration` and apply tags for each
scenario.
(x-pack/test/timeline is not included in this PR as this PR is already
big)

## Todo in the follow up PR:
move `x-pack/test/timeline` to
`x-pack/test/security_solution_api_integration` (as this PR is already
big)

## What to review?
1. Please review if the codeowner is assigned  correctly.
2. Please review if the test cases are still valid.

## How to run the tests: 

Here we use explore/hosts with trial license as an example:
```
cd ./x-pack/test/security_solution_api_integration
```


**Start ESS server:**
```
node ./scripts/index.js server explore trial_license_complete_tier hosts ess

```

When the server is started, open another terminal

```
cd ./x-pack/test/security_solution_api_integration

node ../../../scripts/functional_test_runner --config=test_suites/explore/hosts/trial_license_complete_tier/configs/ess.config.ts

```





**Start Serverless server:**
```
node ./scripts/index.js server explore trial_license_complete_tier hosts serverless

```

When the server is started, open another terminal

```
cd ./x-pack/test/security_solution_api_integration

node ../../../scripts/functional_test_runner --config=test_suites/explore/hosts/trial_license_complete_tier/configs/serverless.config.ts

```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-05-10 13:29:25 +01:00
Jon
240b54180a
[ci/project-deploy] Run more checks before deploying (#183058)
This splits the project build and deploy steps into two: build the
container image, and then deploy. This will allow us to build the
project image in parallel with other checks, and deploy later after a
smoke test is completed. Currently this uses static checks of:
- project image build
- linting
- lint with types
- checks
- type check

Time to project deployment is expected to be ~5~ 1 minute longer. If
needed we can expand to functional tests, but in the interim this should
cover the issue we saw in https://github.com/elastic/kibana/pull/180309.
2024-05-10 06:33:33 -05:00
Jon
d717894274
[jest_integration] Reduce --max-old-space-size, add --trace-warnings (#183030)
We're seeing a process closed on garbage collection, with the subsequent
warning terminating Node.js. This adds the trace-warnings flag to jest
tests. This also reduces the max-old-space-size - there's 1.5gb
allocated to the OS and up to 3 elasticsearch nodes, which is not
enough.


https://buildkite.com/elastic/kibana-on-merge/builds/45020#018f5bd0-04c0-4427-b897-c398b9c29550
2024-05-09 17:17:51 -05:00
Jon
07b8df2a1e
[ci/on-merge] Security solution tests depend on quick_checks (#183031)
Currently, if quick checks fail, security solution tests will continue
to run. We want to skip running the extended test suite.
2024-05-09 17:17:00 -05:00
Victor Martinez
b7265d39ce
github-issue: remove PR owner from the GitHub issue content (#182954)
This will reduce the spam when the deployment happens
2024-05-08 17:49:20 +02:00
Panagiota Mitsopoulou
7536b91e33
[SLO] Write functional tests for slo embeddables (#182568)
Fixes https://github.com/elastic/kibana/issues/182637

## Summary

This PR introduces our first functional tests for the SLO Overview
Embeddable with a bunch of helper functions to interact with the
different UI elements. Here are the basic scenarios that have been
covered:
- Add a single SLO Overview panel
  - Verify the configuration flyout opens
  - Verify the SLO selection dropdown exists
  - Verify the Save button is enabled
  - Verify an SLO Overview panel is added
  - Verify the title is present
- Add a group SLO Overview panel
- Verify the overview mode selector exists and opens the group
configuration screen
  - Verify the Group by dropdown exists
  - Verify the Group dropdown exists
  - Verify the KQL bar exists
  - Verify an SLO Group Overview panel is added


Here's a list of scenarios that need to be covered in a follow up PR (I
will create a separate ticket with following acceptance criteria):
- Check that clicking on the SLO card item opens the SLO details flyout
- Check that clicking on the group expands the accordion and shows the
respective SLOs
- Check that `Edit criteria` link exists in the Group embeddable
- Interact with edit criteria link
  - Check that selected group by is shown
  - Check that selected group is shown
  - Check that custom filter is shown in the kql bar
- With Remote enabled

## How to test

```
node scripts/functional_tests_server.js --config x-pack/test/functional/apps/slo/embeddables/config.ts

node scripts/functional_test_runner --config=x-pack/test/functional/apps/slo/embeddables/config.ts

```
2024-05-07 22:25:47 +02:00
Jon
df11bea8c9
[ci] skip failed test reporting when triggered upstream (#182815)
This skips failed test reporting when elasticsearch triggers a pipeline
to validate an unpublished version against Kibana.
2024-05-07 06:18:50 -07:00
Jon
4982ead45c
[ci/verify-es-serverless] Add annotation with command to run es image locally (#182579)
https://buildkite.com/elastic/kibana-elasticsearch-serverless-verify-and-promote/builds/1074#annotation-es-serverless-run
2024-05-06 17:12:43 -05:00
Jon
a20b226599
[ci/es-verify] Report failed tests to github (#182578)
Enable test failure reporting (via opening a github issue) on:
- kibana-es-serverless-snapshots
- kibana-es-snapshots.yml.
2024-05-06 08:45:26 -05:00
dkirchan
130329510e
[Security] Ftr API Integration tests (#182626)
## Summary

[Try catch
statement](9473241cf8/.buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api_ftr_execution.ts (L144))
in the PR for the [API Ftr Integration
tests](https://github.com/elastic/kibana/pull/182245), introduced a
cover above the target fix of the specific PR.

The tests were failing however the exit code was still 0 so the failures
are hidden. This PR addresses the specific issue.
2024-05-06 09:56:05 +02:00
dkirchan
75c7f1190d
[Security][Serverless] FTR API Integration tests - Refactoring - Issue fixing (#182245)
## Summary

This PR is addressing the following issues:
- The pipelines defined in
`.buildkite/pipeline-resource-definitions/security-solution-quality-gate/`
folder were skipping intermediate builds. We need to be able to run more
than one build in the same time for these pipelines.
- As part of the refactoring / optimization of the
`.buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh`
script, it now executes a TS script in order to handle the projects for
serverless and execute the yarn script provided.
- As part of this refactoring, the methods and worfklow defined in the
`x-pack/plugins/security_solution/scripts/run_cypress/parallel_serverless.ts`
is now followed in order to reduce code duplication and maintenance.
- Fixed an issue in
`x-pack/test/security_solution_api_integration/scripts/index.js`. This
issue was causing false green test executions in buildkite. The exit
code was not actually returned from the child process so the exit code
of this script was 0, even though the child process (test execution) was
failing giving back an exit code 1.
- Parameterized
`.buildkite/pipelines/security_solution/api_integration.yml` to be
running the correct test suite (release or periodic) depending on
whether the environment variable `QUALITY_GATE=1` is passed or not.

The last bullet was misleading the test results interpretation, reading
as successful test runtime scripts which had one or more test failures.
E.g: [Buildkite Test Execution being green with failing
tests.](https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-api-integration/builds/307#018f3409-c062-4edf-9663-3ba785823a6c/294-757)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-05-03 13:50:03 +02:00
Alex Szabo
389025e814
[CI] Fix axios requests to allow retry (#182386)
## Summary
Related to #181733 - I didn't check, and axios rejects requests'
promises that don't result in `2xx`.

This PR wraps the attempt in a try-catch to be able to retry.
2024-05-03 08:58:36 +02:00