## Summary
- addresses https://github.com/elastic/kibana/issues/179767
- ignore_fields tests run as expected on basic/essentials license, so
moved to that tier
- moves the rest of files in `general_logic` set of tests to basic
level, apart from synthetic source tests that requires platinum(trial)
license
### Summary
- Closes#89741
This PR contains the resulting work of a massive effort that ports our
on top bundler abstraction (called @kbn/optimizer) from Webpack v4 into
Webpack v5. It's essential in terms of long term maintenance since v4
was not receiving updates any longer but will also unblock some new
features that could be beneficial for our future DevEx endeavours.
Next you can find a small list of all the accomplished tasks on this
journey.
### Completed Tasks
- [x] Upgrade dependencies to match the ones on webpack v5
- [x] Fix null-loader usages
- [x] Fix raw-loader usages
- [x] Fix file-loader usages
- [x] Fix url-loader usages
- [x] Fix `@kbn/optimizer-webpack-helpers` to support webpack v5
- [x] Adopt previous webpack v4 polyfill-all strategy with
node-polyfill-webpack-plugin
- [x] Fix theme-loader on @kbn/optimizer
- [x] Migrate configurations and ad-hoc loader options on all webpack
configs from v4 to v5
- [x] Fix @kbn/test jest resolver for file-loader cases
- [x] Migrate public-path loader on UiSharedDeps
- [x] Fix all usages of webpack-merge
- [x] Migrate BundleRemoteModule
- [x] Migrate BundleRemotesPlugin
- [x] Correctly migrate PopulateBundleCachePlugin
- [x] Correctly migrate BundleMetricsPlugin
- [x] Check if the profiling plugins still work (--profile flag)
- [x] Recover if possible the previous webpack v4 cacheGroup chunks
rename to something like `data.plugin.chunk.0.js`
- [x] Run `/ci` and make sure we get our first green CI, otherwise work
on the errors until we do
- [x] Profile and solve bottlenecks until we get a cold build
performance similar to the one we had on webpack v4 (`node
scripts/build_kibana_platform_plugins --no-cache`).
- [x] OpenSSL Legacy Warnings: try to remove `--openssl-legacy-provider
` flags
- [x] Add Webpack to Renovate config
- [x] Explore removing `NodePolyfillPlugin`
([here](https://www.npmjs.com/package/node-polyfill-webpack-plugin)) and
add each polyfill needed individually per each webpack config to check
if we get smaller bundles. If we do it's better to go with the case by
case need approach instead of deploying a bunch of polyfills with
NodePolyfillPlugin. As another alternative, create a custom smaller
plugin with only the union of all needed polyfills.
- [x] Evaluate if we want to touch the resolutions on mainFields and
conditionNames
- [x] Understand why `@import 'src/core/public/mixins'` does not work
anymore (not a problem, we should use relative paths anyway but we want
to track why it changed from v4 to v5)
- [x] BUG: Child compilers are having errors hidden and/or changed from
error to warning
- [x] Fix license check for
[Artistic-2.0](https://spdx.org/licenses/Artistic-2.0.html) is the
license for
[domain-browser](https://github.com/bevry/domain-browser?tab=License-1-ov-file).
This package is a dependency of
[NodePolyfillPlugin](https://www.npmjs.com/package/node-polyfill-webpack-plugin).
Artistic 2.0 license is [classified as
yellow](https://github.com/elastic/open-source/blob/main/elastic-product-policy.md#yellow-list)
and should only be used for dev dependencies.
- [x] Make sure `resourceQuery: { not: /raw/ }` is not necessary on
other webpack configs like storybook one
- [x] Find what is being wrongly removed by usedExports optimization;
hint: I believe it is identifying a lot of exports inside the sync entry
of plugins as unused exports and removing them. Then `__kbnBootstrap__`
can't be found
- [x] Rebalance @kbn/optimizer pickMaxWorkerCount
- [x] Re-open the issue to fix sass-warnings
[#190345](https://github.com/elastic/kibana/issues/190345) or downgrade
sass-loader to v10
- [x] Remove previous esm no parse rules
- [x] Confirm esm support is working
- [x] Confirm console override is needed
- [x] Confirm react prod builds on ui shared deps for distributable
- [x] Remove customization for
[xyflow](https://github.com/xyflow/xyflow) from webpack configs
- [x] Clean all the code
- [x] Make sure collected metrics from stats are still aligned with what
we were collecting before; also verify if the modules used for optimizer
caches etc are well generated (@kbn/node-libs-browser)
- [x] Fix watch performance
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Brad White <brad.white@elastic.co>
Pre-GA, we previously modified the critical path, weekly Quality Gate
pipelines over to non-preemptible images in order to avoid the
inconsistent "agent lost" Buildkite issue that might cause unnecessary
churn.
Now that we're GA, the periodic pipelines are becoming more critical
path as well, and in addition, we're seeing a concerning increase in the
number of "agent lost" issues we're encountering, as described here:
https://github.com/elastic/security-team/issues/11700
As such, this PR is hoping to address this issue for the periodic
pipelines as well.
## Summary
https://buildkite.com/elastic/kibana-on-merge/builds/60136 shows how
even though some preliminary checks failed, some cypress tests started
after the build step was successful. It's probably because they had
explicit dependencies, but only on a subset of the pre-checks.
## Summary
Similar to https://github.com/elastic/kibana/pull/195581
Adds a pipeline that builds Kibana and starts cloud deployment without
going through the CI test suites (as in normal pull-request pipeline
runs). It can be useful if a developer would like to save time/compute
on re-building/re-testing the whole project before deploying to the
cloud.
Added labels (`ci:cloud-deploy / ci:cloud-redeploy`) are required
similarly to the usual CI flow.
Related to: https://github.com/elastic/kibana-operations/issues/121
## Summary
Closes https://github.com/elastic/kibana/issues/206664
This PR moves Profiling Cypress tests to be run on the main pipeline
instead of the unsupported one.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This change converts Cypress tests for the custom logs flow into
Playwright using [the Scout
wrapper](https://github.com/elastic/kibana/tree/main/packages/kbn-scout).
> [!NOTE]
> As Scout package is still being developed, the PR pipeline configured
to runs Playwright tests only when code in certain plugins have been
changed and not on every PR.
### How to run tests locally
Start the Scout server
```bash
node scripts/scout.js start-server --stateful
```
In a separate terminal run the tests
```bash
npx playwright test --config x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/playwright.config.ts
```
Playwright runs browsers in a headless mode by default, user `--headed`
option if needed
## Summary
Based on [work by @v1v to notify Slack teams when there are unsupported
FTR failures](https://github.com/elastic/kibana/pull/205260), I've added
the remaining ones for synthetics and inventory tests here.
Previously reverted due to the number of statuses we were tracking, and
the subsequent rate limiting.
The number of updates we need to do after
https://github.com/elastic/kibana/pull/199073 is significantly lower.
We've already been using org-wide status checks for [on-merge commit
statuses](https://github.com/elastic/kibana/commits/main) in the interim
and are not seeing issues.
This adds a daily build that runs tests again
`docker.elastic.co/package-registry/distribution:lite` and if
successful, promotes the image to
`docker.elastic.co/kibana-ci/package-registry-distribution:lite`.
A follow up pull request will swap integration tests over to use the
promoted image, and add environment overrides to run tests against the
source image in this pipeline.
https://buildkite.com/elastic/kibana-package-registry-promote/builds/2
## Summary
PR has been generated with script `node scripts/relocate --team
"@elastic/obs-ux-management-team"`
Relocating module `@kbn/slo-plugin`
We are facing emotion issues that we need to fix !!
We need to figure out why app is broken after relocating with following
error

---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
## Summary
Part of https://github.com/elastic/kibana-team/issues/1271
This PR introduces the first set of end to end integration test for the
inference APIs, and the tooling required to do so (see issue for more
context)
- Add a dedicated pipeline for ai-infra GenAI tests. pipeline is
triggered when:
- genAI stack connectors, or ai-infra owned code is changed
- when the `ci:all-gen-ai-suites` label is present on a PR
- on merge
- adapt the `ftr_configs.sh` script to load GenAI connector
configuration from vault when a specific var env is set
- create the `@kbn/gen-ai-functional-testing` package, which for now
only contains utilities to load the GenAI connector configuration in FTR
tests
- Add FTR integration tests for the `chatComplete` API of the
`inference` plugin
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Defines disk size for artifact builds. This will be a no-op - the boot
disk size is >= the definitions in this PR.
A test run with the smaller boot disk can be seen in
https://buildkite.com/elastic/kibana-pull-request/builds/248242. I plan
on making further adjustments after the boot disk has been promoted.
## Summary
Closes#192233
Just in time for Thanksgiving - a full buffet of FIPS testing fixes
Usage of non-compliant algorithms manifest as runtime errors, so it is
imperative that we attempt to run all tests possible with Kibana in FIPS
mode. However, several overrides are needed to run Kibana in FIPS mode,
resulting in setup that make it impossible to run.
## In this PR
- Enable Unit tests for FIPS pipeline
- Enable Integration Tests for FIPS pipeline
- Enable Full FTR suite for FIPS pipeline (smoke test had originally run
a subset)
- Skip tests that break with overrides
- Fix/change tests to work in FIPS mode to maximize coverage
- Examine necessity of MD5 when installing from source (TBD based Ops PR
feed back, see self review below)
- Remove md5 from es_file_client options
## Latest Successful FIPS Test Run
https://buildkite.com/elastic/kibana-fips/builds/268
---------
Co-authored-by: Brad White <Ikuni17@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Larry Gregory <larry.gregory@elastic.co>
## Summary
Publish OAS docs to bump.sh on merge to `main` or `8.x`
## To reviewers
* For now actual publication requires a manual step on bump.sh (so
things aren't going live immediately)
* Will get to serverless OAS docs next!
## Blockers
* Address vulnerable deps before merging:
https://github.com/bump-sh/cli/issues/583
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Fix the link for test command in the MKT tests
Just change tests to be similar what we have in periodic pipeline
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
The platform plugin builds were used when functional tests were, at
times, run from source.
This is mostly no longer a requirement. There are two remaining cypress
scripts that I updated to use the build instead.
With the time saved I'm dropping the number of vCPUs from 16 to 8. These
are mostly underutilized by this step, with the exception of the
distribution plugin build.
## Summary
Adds FTR tests that check our Serverless prebuilt roles against our
exception list endpoints.
We have had little coverage or visibility to know if any changes made in
elasticsearch-controller introduce a bug in our prebuilt roles.
We could certainly discuss how such tests should be organized - I chose
to create an `authentication` folder that then has a matching folder for
the other sections and a file for each prebuilt role. With us nearing
GA, I'd like to prioritize having coverage and following up with any
improvements.
Adds a placeholder pipeline for `kibana / package registry promote`.
Initially, in a follow up PR, this will run a daily promotion of
`docker.elastic.co/package-registry/distribution:lite` to the kibana-ci
namespace. We can also run some verification steps if desired.
The distribution is a relatively large image, and nearly always running
uncached on CI due to the update frequency. This should help us balance
having an up to date image and avoiding cache misses.
Should be the last group to move before tests for now.
The intent has been to move steps that fit in the build window to run
before tests start. Catching errors before parallel steps should help
reduce the number of test runs with known issues.
## Summary
This PR breaks down long running FTR groups into smaller chunks that now
run in <~15 min.
- Addresses https://github.com/elastic/kibana/issues/192109
- There is no existing ticket but rule_execution group tests are taking
~55m to run and will soon be a bottle neck for us.
- No edits made to any existing tests.
- Purely just a reshuffle of the tests.
See https://github.com/elastic/kibana/issues/198209 for details on bug.