Commit graph

79 commits

Author SHA1 Message Date
Eyo O. Eyo
29d18cb0d1
Allow overrides for comment on PR script (#219016)
## Summary

Culled from the work happening in
https://github.com/elastic/kibana/pull/212674.

Allows passing args to the `comment-on-pr.ts` script to specify
overrides, this is useful in cases where the build that want to invoke
this script would like to explicitly specify a value other than the
values it would previously have default to.

This allows to use the script in the following manner for example; 

```bash
ts-node .buildkite/scripts/lifecycle/comment_on_pr.ts \
	 --message "Linux headless chromium build started at: https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/309" \
	--context "chromium-linux-build-job-start" \
	--issue-number 212732 \
	--repository kibana \
	--repository-owner elastic \
	--clear-previous
```

<!--

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] 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/src/platform/packages/shared/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
- [ ] 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 was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...


-->
2025-04-24 09:55:31 +02:00
Alex Szabo
7120074ec3
[ci] More info to test annotation failure logging (#215515)
## Summary
While annotating test failures, we're seeing increased amount of errors
like this:
```
2025-03-21 13:52:32 INFO   Artifact uploads completed successfully
--
  | Annotate test failures error Request failed with status code 404
  | HTTP Error Response Status 404
  | HTTP Error Response Body { message: 'Not Found' }
  | user command error: exit status 10
```

It would be nicer to show a bit more from the error to help debugging.
2025-03-24 19:01:32 +01:00
Gerard Soldevila
355a834659
SKA: Relocate /test to /src/platform/test (#210956)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1503

This is a first step towards the relocation of all the Kibana tests.

The `/test/` folder at the root, which is in itself a package
(`@kbn/test-suites-src`), and contains a large number of tests and test
plugins, is being relocated under `src/platform/test`.

All the tests under this folder should be related to common platform
features, and they should not have any dependency towards
solution-specific components or features.

<details >
<summary>Updated relative paths</summary>

```
src/platform/test/analytics/plugins/analytics_ftr_helpers/jest.config.js:12
src/platform/test/analytics/plugins/analytics_ftr_helpers/package.json:10
src/platform/test/analytics/plugins/analytics_ftr_helpers/package.json:11
src/platform/test/analytics/plugins/analytics_ftr_helpers/tsconfig.json:11
src/platform/test/analytics/plugins/analytics_ftr_helpers/tsconfig.json:2
src/platform/test/analytics/plugins/analytics_plugin_a/package.json:10
src/platform/test/analytics/plugins/analytics_plugin_a/package.json:11
src/platform/test/analytics/plugins/analytics_plugin_a/tsconfig.json:10
src/platform/test/analytics/plugins/analytics_plugin_a/tsconfig.json:2
src/platform/test/api_integration/jest.config.js:12
src/platform/test/common/plugins/newsfeed/tsconfig.json:2
src/platform/test/common/plugins/otel_metrics/tsconfig.json:2
src/platform/test/functional/jest.config.js:12
src/platform/test/harden/child_process.js:13
src/platform/test/harden/lodash_template.js:13
src/platform/test/harden/prototype.js:10
src/platform/test/health_gateway/plugins/status/tsconfig.json:2
src/platform/test/interactive_setup_api_integration/plugins/test_endpoints/tsconfig.json:2
src/platform/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json:11
src/platform/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json:12
src/platform/test/interpreter_functional/plugins/kbn_tp_run_pipeline/tsconfig.json:11
src/platform/test/interpreter_functional/plugins/kbn_tp_run_pipeline/tsconfig.json:2
src/platform/test/node_roles_functional/plugins/core_plugin_initializer_context/package.json:11
src/platform/test/node_roles_functional/plugins/core_plugin_initializer_context/package.json:12
src/platform/test/node_roles_functional/plugins/core_plugin_initializer_context/tsconfig.json:2
src/platform/test/node_roles_functional/plugins/core_plugin_initializer_context/tsconfig.json:9
src/platform/test/package/Vagrantfile:2
src/platform/test/plugin_functional/README.md:40
src/platform/test/plugin_functional/plugins/app_link_test/package.json:11
src/platform/test/plugin_functional/plugins/app_link_test/package.json:12
src/platform/test/plugin_functional/plugins/app_link_test/tsconfig.json:10
src/platform/test/plugin_functional/plugins/app_link_test/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_app_status/package.json:11
src/platform/test/plugin_functional/plugins/core_app_status/package.json:12
src/platform/test/plugin_functional/plugins/core_app_status/tsconfig.json:10
src/platform/test/plugin_functional/plugins/core_app_status/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_dynamic_resolving_a/package.json:11
src/platform/test/plugin_functional/plugins/core_dynamic_resolving_a/package.json:12
src/platform/test/plugin_functional/plugins/core_dynamic_resolving_a/tsconfig.json:11
src/platform/test/plugin_functional/plugins/core_dynamic_resolving_a/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_dynamic_resolving_b/package.json:11
src/platform/test/plugin_functional/plugins/core_dynamic_resolving_b/package.json:12
src/platform/test/plugin_functional/plugins/core_dynamic_resolving_b/tsconfig.json:11
src/platform/test/plugin_functional/plugins/core_dynamic_resolving_b/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_history_block/package.json:11
src/platform/test/plugin_functional/plugins/core_history_block/package.json:12
src/platform/test/plugin_functional/plugins/core_history_block/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_history_block/tsconfig.json:6
src/platform/test/plugin_functional/plugins/core_http/package.json:11
src/platform/test/plugin_functional/plugins/core_http/package.json:12
src/platform/test/plugin_functional/plugins/core_http/tsconfig.json:11
src/platform/test/plugin_functional/plugins/core_http/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_a/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_a/package.json:12
src/platform/test/plugin_functional/plugins/core_plugin_a/tsconfig.json:11
src/platform/test/plugin_functional/plugins/core_plugin_a/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_appleave/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_appleave/package.json:12
src/platform/test/plugin_functional/plugins/core_plugin_appleave/tsconfig.json:10
src/platform/test/plugin_functional/plugins/core_plugin_appleave/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_b/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_b/package.json:12
src/platform/test/plugin_functional/plugins/core_plugin_b/tsconfig.json:11
src/platform/test/plugin_functional/plugins/core_plugin_b/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_chromeless/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_chromeless/package.json:12
src/platform/test/plugin_functional/plugins/core_plugin_chromeless/tsconfig.json:10
src/platform/test/plugin_functional/plugins/core_plugin_chromeless/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_deep_links/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_deep_links/package.json:12
src/platform/test/plugin_functional/plugins/core_plugin_deep_links/tsconfig.json:10
src/platform/test/plugin_functional/plugins/core_plugin_deep_links/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_deprecations/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_deprecations/package.json:12
src/platform/test/plugin_functional/plugins/core_plugin_deprecations/tsconfig.json:11
src/platform/test/plugin_functional/plugins/core_plugin_deprecations/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_execution_context/package.json:10
src/platform/test/plugin_functional/plugins/core_plugin_execution_context/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_execution_context/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_helpmenu/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_helpmenu/tsconfig.json:10
src/platform/test/plugin_functional/plugins/core_plugin_helpmenu/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_route_timeouts/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_route_timeouts/package.json:12
src/platform/test/plugin_functional/plugins/core_plugin_route_timeouts/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_route_timeouts/tsconfig.json:8
src/platform/test/plugin_functional/plugins/core_plugin_static_assets/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_static_assets/package.json:12
src/platform/test/plugin_functional/plugins/core_plugin_static_assets/tsconfig.json:10
src/platform/test/plugin_functional/plugins/core_plugin_static_assets/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_provider_plugin/package.json:11
src/platform/test/plugin_functional/plugins/core_provider_plugin/package.json:12
src/platform/test/plugin_functional/plugins/core_provider_plugin/tsconfig.json:10
src/platform/test/plugin_functional/plugins/core_provider_plugin/tsconfig.json:2
src/platform/test/plugin_functional/plugins/data_search/package.json:10
src/platform/test/plugin_functional/plugins/data_search/package.json:9
src/platform/test/plugin_functional/plugins/data_search/tsconfig.json:2
src/platform/test/plugin_functional/plugins/data_search/tsconfig.json:8
src/platform/test/plugin_functional/plugins/elasticsearch_client_plugin/package.json:10
src/platform/test/plugin_functional/plugins/elasticsearch_client_plugin/package.json:9
src/platform/test/plugin_functional/plugins/elasticsearch_client_plugin/tsconfig.json:2
src/platform/test/plugin_functional/plugins/elasticsearch_client_plugin/tsconfig.json:8
src/platform/test/plugin_functional/plugins/eui_provider_dev_warning/package.json:11
src/platform/test/plugin_functional/plugins/eui_provider_dev_warning/package.json:12
src/platform/test/plugin_functional/plugins/eui_provider_dev_warning/tsconfig.json:10
src/platform/test/plugin_functional/plugins/eui_provider_dev_warning/tsconfig.json:2
src/platform/test/plugin_functional/plugins/hardening/package.json:11
src/platform/test/plugin_functional/plugins/hardening/package.json:12
src/platform/test/plugin_functional/plugins/hardening/tsconfig.json:12
src/platform/test/plugin_functional/plugins/hardening/tsconfig.json:2
src/platform/test/plugin_functional/plugins/index_patterns/package.json:11
src/platform/test/plugin_functional/plugins/index_patterns/package.json:12
src/platform/test/plugin_functional/plugins/index_patterns/tsconfig.json:10
src/platform/test/plugin_functional/plugins/index_patterns/tsconfig.json:2
src/platform/test/plugin_functional/plugins/kbn_sample_panel_action/package.json:11
src/platform/test/plugin_functional/plugins/kbn_sample_panel_action/package.json:12
src/platform/test/plugin_functional/plugins/kbn_sample_panel_action/tsconfig.json:10
src/platform/test/plugin_functional/plugins/kbn_sample_panel_action/tsconfig.json:2
src/platform/test/plugin_functional/plugins/kbn_top_nav/package.json:11
src/platform/test/plugin_functional/plugins/kbn_top_nav/package.json:12
src/platform/test/plugin_functional/plugins/kbn_top_nav/tsconfig.json:11
src/platform/test/plugin_functional/plugins/kbn_top_nav/tsconfig.json:2
src/platform/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json:11
src/platform/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json:12
src/platform/test/plugin_functional/plugins/kbn_tp_custom_visualizations/tsconfig.json:10
src/platform/test/plugin_functional/plugins/kbn_tp_custom_visualizations/tsconfig.json:2
src/platform/test/plugin_functional/plugins/management_test_plugin/package.json:11
src/platform/test/plugin_functional/plugins/management_test_plugin/package.json:12
src/platform/test/plugin_functional/plugins/management_test_plugin/tsconfig.json:10
src/platform/test/plugin_functional/plugins/management_test_plugin/tsconfig.json:2
src/platform/test/plugin_functional/plugins/rendering_plugin/package.json:11
src/platform/test/plugin_functional/plugins/rendering_plugin/package.json:12
src/platform/test/plugin_functional/plugins/rendering_plugin/tsconfig.json:11
src/platform/test/plugin_functional/plugins/rendering_plugin/tsconfig.json:2
src/platform/test/plugin_functional/plugins/saved_object_export_transforms/package.json:11
src/platform/test/plugin_functional/plugins/saved_object_export_transforms/package.json:12
src/platform/test/plugin_functional/plugins/saved_object_export_transforms/tsconfig.json:2
src/platform/test/plugin_functional/plugins/saved_object_export_transforms/tsconfig.json:9
src/platform/test/plugin_functional/plugins/saved_object_import_warnings/package.json:11
src/platform/test/plugin_functional/plugins/saved_object_import_warnings/package.json:12
src/platform/test/plugin_functional/plugins/saved_object_import_warnings/tsconfig.json:11
src/platform/test/plugin_functional/plugins/saved_object_import_warnings/tsconfig.json:2
src/platform/test/plugin_functional/plugins/saved_objects_hidden_from_http_apis_type/package.json:11
src/platform/test/plugin_functional/plugins/saved_objects_hidden_from_http_apis_type/package.json:12
src/platform/test/plugin_functional/plugins/saved_objects_hidden_from_http_apis_type/tsconfig.json:2
src/platform/test/plugin_functional/plugins/saved_objects_hidden_from_http_apis_type/tsconfig.json:9
src/platform/test/plugin_functional/plugins/saved_objects_hidden_type/package.json:11
src/platform/test/plugin_functional/plugins/saved_objects_hidden_type/package.json:12
src/platform/test/plugin_functional/plugins/saved_objects_hidden_type/tsconfig.json:2
src/platform/test/plugin_functional/plugins/saved_objects_hidden_type/tsconfig.json:9
src/platform/test/plugin_functional/plugins/session_notifications/package.json:11
src/platform/test/plugin_functional/plugins/session_notifications/package.json:12
src/platform/test/plugin_functional/plugins/session_notifications/tsconfig.json:11
src/platform/test/plugin_functional/plugins/session_notifications/tsconfig.json:2
src/platform/test/plugin_functional/plugins/telemetry/package.json:11
src/platform/test/plugin_functional/plugins/telemetry/package.json:12
src/platform/test/plugin_functional/plugins/telemetry/tsconfig.json:2
src/platform/test/plugin_functional/plugins/telemetry/tsconfig.json:6
src/platform/test/plugin_functional/plugins/ui_settings_plugin/package.json:11
src/platform/test/plugin_functional/plugins/ui_settings_plugin/package.json:12
src/platform/test/plugin_functional/plugins/ui_settings_plugin/tsconfig.json:2
src/platform/test/plugin_functional/plugins/ui_settings_plugin/tsconfig.json:8
src/platform/test/plugin_functional/plugins/usage_collection/package.json:11
src/platform/test/plugin_functional/plugins/usage_collection/package.json:12
src/platform/test/plugin_functional/plugins/usage_collection/tsconfig.json:11
src/platform/test/plugin_functional/plugins/usage_collection/tsconfig.json:2
src/platform/test/server_integration/plugins/status_plugin_a/package.json:10
src/platform/test/server_integration/plugins/status_plugin_a/package.json:11
src/platform/test/server_integration/plugins/status_plugin_a/tsconfig.json:2
src/platform/test/server_integration/plugins/status_plugin_a/tsconfig.json:9
src/platform/test/server_integration/plugins/status_plugin_b/package.json:10
src/platform/test/server_integration/plugins/status_plugin_b/package.json:11
src/platform/test/server_integration/plugins/status_plugin_b/tsconfig.json:2
src/platform/test/server_integration/plugins/status_plugin_b/tsconfig.json:9
```

</details>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-14 16:57:23 +00:00
Alex Szabo
e36833b3a6
[ci] Click to deploy cloud (#205623)
## 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
2025-01-23 10:26:03 +01:00
Dzmitry Lemechko
1023402f8d
[kbn-scout-reporting] add failed test reporter (#205096)
## Summary

Extending scout-reporter with `failed-test-reporter`, that saves
failures in json summary file. For each test failure html report file is
generated and linked in summary report:
```
[
  {
    "name": "stateful - Discover app - saved searches - should customize time range on dashboards",
    "htmlReportFilename": "c51fcf067a95b48e2bbf6098a90ab14.html"
  },
  {
    "name": "stateful - Discover app - value suggestions: useTimeRange enabled - dont show up if outside of range",
    "htmlReportFilename": "9622dcc1ac732f30e82ad6d20d7eeaa.html"
  }
]
```

This PR updates `failed_tests_reporter_cli` to look for potential Scout
test failures and re-generate test failure artifacts in the same format
we already use for FTR ones.

These new artifacts are used to list failures in BK annotation: 

<img width="1092" alt="image"
src="https://github.com/user-attachments/assets/09464c55-cdaa-45a4-ab47-c5f0375b701c"
/>


test failure html report example: 
<img width="1072" alt="image"
src="https://github.com/user-attachments/assets/81f6e475-1435-445d-82eb-ecf5253c42d3"
/>

Note for reviewer: 3 Scout + 1 FTR tests were "broken" to show/test
reporter, those changes must be reverted before merge. See failed
pipeline
[here](https://buildkite.com/elastic/kibana-pull-request/builds/266822)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-15 18:40:34 +00:00
Victor Martinez
acc5e039ba
ci(ftr): notify owners in the slack message when failures (#205260) 2025-01-07 11:53:04 +00:00
Alex Szabo
ae86b54a36
[CI] Fix project build & deploy job (#196562)
## Summary
In #195581 we've added the option to deploy through the clickable
triggers. But in it's current state, it's broken in several aspects.

(1) It's not starting on click. Triggers was resulting in a 422 on
Buildkite's side, and after digging more into it, this was the error:
<img width="1019" alt="Screenshot 2024-10-16 at 16 53 13"
src="https://github.com/user-attachments/assets/f602dde9-2cc4-474f-b432-a3d4f9d5ae91">
Apparently, building PRs needs to be enabled on jobs that want to be
triggered through the PR bot.

(2) It is set up to run regardless of the labels

(3) There's no feedback on runs

## Changes
This PR:
 - enables buildability in the pipeline's config
 - exits early if deploy labels are missing
 - adds a comment on the PR if a deploy job is started or finished 
- removes the kibana build step, it's not needed, as we have a step to
build the docker image

TODO: 
- [x] Add feedback about a started job (either through a non-required
check, or a github comment)
 - [x] Early exit if a label is missing

There are several other builds started right now, because the logic that
would trigger a build on changing a draft to ready. To be fixed in
https://github.com/elastic/buildkite-pr-bot/issues/78

Tested after manually by enabling the option on the UI, and triggering
through the checkbox:
https://buildkite.com/elastic/kibana-deploy-project-from-pr/builds/23
2024-10-29 16:57:01 +01:00
Jon
149c514e83
Re-enable org wide PR bot (#195131)
https://github.com/elastic/kibana/pull/194768 without the merge
conflicts.

Switches over to the org wide PR bot, with backwards compatibility for
both versions.

Updating the pipeline definition here is a global set for environment
variables on all branches, so I intend on merging the backports first to
support both versions and then proceeding with this.
2024-10-07 13:00:12 -05:00
Alex Szabo
bce4a17f08
[CI] Archive logs from yarn es docker runs (#189231)
## Summary
The problem we're trying to solve here is to get access to
`elasticsearch-serverless` logs when they're started in docker
containers in the background (and `elasticsearch`, although currently we
don't test against that in docker for now).
## Solution
In essence:
- we needed to remove the `--rm` flag, this would allow for the
containers to stay present after they're done.
- after this, we can run `docker logs ...` on FTR post-hooks, save
these, then archive these files to buildkite
- because the containers are not removed upon finishing, we need to
clean up dangling containers before starting up

Backporting is probably not necessary, because this is only applicable
for serverless - and serverless is only supposed to run on main.

Solves: https://github.com/elastic/kibana/issues/191505
2024-09-16 10:43:12 +02:00
Luke Elmers
b6287708f6
Adds AGPL 3.0 license (#192025)
Updates files outside of x-pack to be triple-licensed under Elastic
License 2.0, AGPL 3.0, or SSPL 1.0.
2024-09-06 19:02:41 -06:00
Alex Szabo
243de82cc6
[CI] Enable failed test collection on ES-intake triggered serverless verification runs (#191937)
## Summary
Currently, failed runs on
https://buildkite.com/elastic/kibana-elasticsearch-serverless-verify-and-promote
that were triggered by the ES Serverless pipeline's downstream, are not
collecting failures. This makes it harder to grasp what set of tests
failed.

I think we originally disabled this reporting not to muddy our stats
based on runs on various ES Serverless versions - however, with this,
it's really hard to get an overview on which tests are failing for a
run, so I'd like to get the failed suites to be displayed on the job.

With this change - if I'm not mistaken - we'll generate the annotation
on the Buildkite job, but we won't report to ci-stats or create github
issues.

### In short
What we have:
<img width="889" alt="Screenshot 2024-09-02 at 18 28 45"
src="https://github.com/user-attachments/assets/d294dc00-4dd0-4b29-9e2f-866d68246a5d">

What I'd like:
<img width="1195" alt="Screenshot 2024-09-02 at 18 29 14"
src="https://github.com/user-attachments/assets/455465ba-f176-4ab5-ba31-9578c167448f">


Tested in:
https://buildkite.com/elastic/kibana-elasticsearch-serverless-verify-and-promote/builds/1962
2024-09-04 16:58:45 +02:00
Jon
2c8b2ff4a5
Revert org wide PR bot (#188771)
We're seeing frequent check timeouts on the org wide version. This rolls
back to the Kibana version
2024-07-19 13:20:12 -05:00
Brad White
dd9d6434ca
Remove Agent Debug Info (#187126)
## Summary

- Removes SSH info to avoid confusion since we cannot SSH into agents on
the new infra
- Removes old agent metrics and logs links because they are in a
different cluster and the new links are in an annotation
2024-07-09 07:10:14 +10:00
Jon
bd41c659d9
[ci] Use org wide PR status bot (#187386) 2024-07-03 08:07:19 -05: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
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
1de8c74a68
[ci] Disable post-build manual retries (#178675)
This will cause metrics to be collected twice. See linked issue for more
information.
2024-03-13 15:59:12 -07:00
Alex Szabo
a89fb9b2fb
[Ops] Refactor env loading & fix agent-targeting rewrite (#178320)
## Summary
This PR refactors a bit of the pre-command env setup, separating parts,
so they can be individually skipped. Then it removes the setup-avoidance
based on agent types, as this won't be useful after the migration.

Also, it fixes a missed bit in the agent-targeting rewrite used for the
migration, where the `provider: 'gcp'` was missing, and adds an optional
targeting for the script.

- add gcp as provider to all rewritten agent targeting rules
- add option to target specific pipelines
- refactor env-var loading to a separated file
- refactor node installs so it can be switched by a flag
- skip node installing in (some) jobs that don't require it
2024-03-12 16:31:26 +01:00
Jon
813b515374
[ci] Update kibana-ci-apm endpoint (#177727)
This updates APM metrics collected by CI to a serverless project
endpoint.
2024-03-11 10:37:50 -05:00
Jon
6680f85383
[ci] Validate CDN assets are available (#176943)
https://buildkite.com/elastic/kibana-artifacts-container-image/builds/10074#018dae94-80cf-4c79-9d97-d4c44a4a9fef
2024-02-21 19:05:30 -06:00
Jon
f96214235b
[ci/serverless] Update CDN bucket (#177316)
Switches over from using the QA bucket to the production bucket for
storing assets.
2024-02-20 11:07:28 -07:00
Dzmitry Lemechko
de35ef9818
[ftr] upload page html for svl test failures (#176839)
## Summary

Adding html snapshots to be upload on svl functional test failure. Login
flakiness is a good example where it might help to better understand why
some elements were not found.

<img width="1316" alt="Screenshot 2024-02-14 at 09 56 56"
src="82a66af2-ac23-47d7-bcc2-13e17ae6ff6d">
2024-02-14 13:53:43 +01:00
Nassim Kammah
096bf5515a
Update docs-preview link (#176468)
## Summary

Following the migration from Jenkins to Buildkite, docs previews are now
available at <repo>_bk_<PR>.
More context in https://github.com/elastic/docs/pull/2898

### Checklist


### Risk Matrix


### 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-02-08 08:42:35 +01:00
Alex Szabo
455ee0a450
[Ops] Fix GCS bucket access for future buildkite agents (#174756)
## Summary
Once we're moving to the elastic-wide buildkite agents, and away from
the kibana-buildkite-managed ones, we won't have default access to the
buckets we used to use, as the assumed service account will differ.

**Note:** Although this will only be required in the new infra, but this
change can be merged and expected to work properly in the current infra
as well.

### Solution
We've set up a central service-account with rights to impersonate other
service accounts that have controlled access to individual buckets to
minimize the reach and influence of individual accounts. See:
https://github.com/elastic/kibana-operations/pull/51

**several of the changes weren't tested, as they're part of CI tasks
outside the PR build** - will merge with caution and monitor the
stability afterwards

TODO:  _add access, and assume account before other GCS bucket usages_
- [x] storybook
- [x] coverage
(.buildkite/scripts/steps/code_coverage/reporting/uploadPrevSha.sh)
- [x] upload static site
(.buildkite/scripts/steps/code_coverage/reporting/uploadStaticSite.sh)
- [x] SO object migration
(.buildkite/scripts/steps/archive_so_migration_snapshot.sh)
- [x] ES Snapshot manifest upload
(.buildkite/scripts/steps/es_snapshots/create_manifest.ts)
- [x] Scalability?
(.buildkite/scripts/steps/functional/scalability_dataset_extraction.sh)
- [x] Benchmarking
(.buildkite/scripts/steps/scalability/benchmarking.sh)
- [x] Webpack bundle analyzer
(.buildkite/scripts/steps/webpack_bundle_analyzer/upload.ts)
- [x] ~Build chromium (x-pack/build_chromium/build.py)~ Not needed, as
it's manual, and not a CI task

TODO:  _others_
- [x] Remove manifest upload
(.buildkite/scripts/steps/es_serverless/promote_es_serverless_image.sh)
- [x] Decide if we should merge with the CDN access: no, SRE is managing
that account
- [x] Bazel remote cache seems to also rely on gcs - roles PR:
https://github.com/elastic/kibana-operations/pull/56


Closes: https://github.com/elastic/kibana-operations/issues/29
Part of: https://github.com/elastic/kibana-operations/issues/15
2024-02-07 09:34:55 +01:00
Jon
88612c4517
[ci] Fix serverless project creation (#174403)
In https://github.com/elastic/kibana/pull/173159 we authenticated with
another service account, and were no longer operating under the expected
config. This was causing `gcloud secrets` to access the wrong project
and throw errors.

This revokes the service account after we're done uploading CDN assets
so we can switch back to the default service account.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2024-01-08 10:02:14 +01:00
Jon
615e3f554d
[build] Upload CDN assets (#173159)
This uploads CDN assets to a GCS bucket on commit and after all tests
have passed. This will run on pull requests with `ci:project-deploy-*`
and `ci:build-serverless-image` labels, and on `main`. Assets will
include the first 12 digits of the commit sha as a base path.
2024-01-04 11:19:38 -06:00
Alex Szabo
1022ccdf78
[Ops] Switch to using the migrated secret paths for vault secrets (#172175)
## Summary
We're moving to a different vault address/instance when we're on the
elastic-wide buildkite infra. While the migration is in progress, we can
bridge between using this solution.

 Tested the status quo by running the PR pipeline (tests all the loads
from `pre-command`) and by using `ci:cloud-deploy` (tests vault
writing).

🟠 Tested the new vault provider on this PR:
https://github.com/elastic/kibana/pull/171317
The secrets can be accessed, *but they can't be written* (neither by me
nor) by the PR pipeline. Change requested here:
https://elasticco.atlassian.net/browse/ENGPRD-414

However, this PR can be merged without figuring out write access to
secrets, this will work as long as we're on the `kibana-buildkite`
infra.

---
Closes: https://github.com/elastic/kibana-operations/issues/28

Based on: https://github.com/elastic/kibana/pull/157220

---------

Co-authored-by: Jon <jon@budzenski.me>
2023-12-06 10:40:44 +01:00
Alex Szabo
1208a8e6b5
[Ops] Buildkite job for serverless deployment (#170655)
## Summary
Connected to: https://github.com/elastic/kibana-operations/issues/18
Pre-requisite for:
https://github.com/elastic/kibana-operations/issues/30

You can test the current assistant from the branch:
https://buildkite.com/elastic/kibana-serverless-release-1/builds?branch=buildkite-job-for-deployment
- use `DRY_RUN=1` in the runtime params to not trigger an actual release
:)

This PR creates the contents of a Buildkite job to assist the Kibana
Serverless Release initiation process at the very beginning and lay some
groundwork for further additions to the release management.

At the end of the day, we would like to create a tag deploy@<timestamp>
which will be picked up by another job that listens to these tags:
https://buildkite.com/elastic/kibana-serverless-release. However,
several parts of the preparation for release require manual research,
collecting information about target releases, running scripts, etc.

Any further addition to what would be useful for someone wanting to
start a release could be contained here.

Furthermore, we could also trigger downstream jobs from here. e.g.:
https://buildkite.com/elastic/kibana-serverless-release is currently set
up to listen for a git tag, but we may as well just trigger the job
after we've created a tag.

Check out an example run at:
https://buildkite.com/elastic/kibana-serverless-release-1/builds/72
(visible only if you're a
member of @ elastic/kibana-release-operators) 

Missing features compared to the git action:

- [x] Slack notification about the started deploy
- [x] full "useful links" section

Missing features:
- [x] there's a bit of useful context that should be integrated to the
display of the FTR results (*)
- [x] skip listing and analysis if a commit sha is passed in env


(*) - Currently, we display the next FTR test suite that ran after the
merge of the PR. However, the next FTR that will contain the changes,
and show useful info related to the changeset is ONLY in the FTR that's
ran after the first successful onMerge after the merge commit. Meaning:
if main is failing when the change is merged, an FTR suite won't pick up
the change right after.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Thomas Watson <w@tson.dk>
Co-authored-by: Thomas Watson <watson@elastic.co>
2023-12-01 07:10:52 -07:00
Brad White
17ed0748e8
fix/redact axios headers (#171803)
Fix token things

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-11-22 22:12:33 +00:00
Ash
1c2521705a
[Security Solution][Endpoint][Cypress] Update endpoint cypress config to include videos (#170499)
## Summary

Adds videos to failed cypress tests for debugging.
2023-11-06 17:04:42 +01:00
Tomasz Ciecierski
a15a9484e6
[EDR Workflows] Verify flaky osquery tests (#169749) 2023-11-01 07:09:41 +01:00
Jon
f4aa3bb8dc
[ci] Support serverless deployments from pull requests (#167163)
Closes https://github.com/elastic/kibana/issues/162819
2023-10-31 17:56:54 -05:00
Tomasz Ciecierski
69cfe3ac49
[EDR Workflows] Add junit config to osquery cypress tests (#169060)
Co-authored-by: Patryk Kopyciński <contact@patrykkopycinski.com>
2023-10-18 17:15:22 +02:00
Maxim Palenov
369d2fe367
[Security Solution] Fix a build step when there are no tests to execute (#165929)
## Summary

Fixes failed build steps when there are no tests to execute and hence no
reports.

## Details

Despite this [PR](https://github.com/elastic/kibana/pull/165824) fixes
tests failure when there are no reports but `yarn junit:merge` tries to
convert them to junit format the problem is partially stays as `Failed
Test Reporter` runs for every build step meaning also for successful
build steps. We don't need to handle failed test reports for successful
build steps. There are cases when there are no tests to run so Cypress
doesn't produce reports and nothing is converted to junit format so
`Failed Test Reporter` fails and causes a build step to fails. It could
be solved by defining an environment variable
`DISABLE_MISSING_TEST_REPORT_ERRORS=true` but we need to make sure
reports exist for failed tests. Taking this into account we can rely on
`BUILDKITE_COMMAND_EXIT_STATUS` to avoid running `Failed Test Reporter`
if the build step successed.

One may ask why don't skip `Upload Artifacts` too. We may need some
build artifacts for successful build steps.

---------

Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
2023-09-07 17:02:16 +01:00
Alex Szabo
0edc23e02a
[Ops] Skip buildkite hooks for non kibana jobs (#165597)
## Summary

Kibana's build jobs work on a different subset of executors than the
buildkite pipelines defined in `catalog-info.yaml`.

The former jobs require a set of `pre_command` / `post_command` steps to
prepare the jobs for building/testing kibana.
The latter don't have access rights to certain vault secrets (and
possibly other missing config from the Kibana world), but for now,
they're also not building Kibana, they just trigger other jobs, so we
can just skip the problematic hooks.

~~A probably good indicator I found for deciding whether we need the
kibana-related `pre_command` is the
`BUILDKITE_AGENT_META_DATA_AGENT_MANAGER` flag, that's set to `"kibana"`
in the case of the kibana executors.~~

We can try to match on the agent names for the CI-systems agents. They
seem to be starting with `bk-agent`.

This should allow for the
[kibana-tests](https://buildkite.com/elastic/kibana-tests) job to run.

Split from: https://github.com/elastic/kibana/pull/165346

---------

Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
2023-09-04 09:29:16 -07:00
Jon
e52dd715ca
[ci] Stricter check on pre_command skip (#165519)
When buildkite-agent is uploading a pipeline we can skip setting up our
node environment. This stricter check avoids matching on similarly named
steps, e.g. our storybooks upload.
2023-09-01 14:42:14 -05:00
Brandon Kobel
75a23c86c5
Echoing out BUILDKITE_COMMAND (#165506) 2023-09-01 14:26:24 -04:00
Brandon Kobel
39ef9bc81c
Skipping pre-command when running the Upload pipeline (#165505)
Context: https://elastic.slack.com/archives/C5UDAFZQU/p1693587045671319
2023-09-01 14:15:49 -04:00
Jon
fa1ef3cfeb
[ci] Support for serverless ftr tests on pull requests (#159310)
Adds four pipeline steps for running serverless common, observability,
search, and security suites on pull requests.

While tests go through a stabilization period, configs will need to be
added `serverless_ftr.sh` in addition to `ftr_configs.yml`. These tests
will be allowed to fail without causing a build failure. After
stabilization and integration with the primary test pipeline, we can
revert these changes.
2023-06-13 10:20:46 -05:00
Jonathan Budzenski
cf7d6cc6de
Remove buildbuddy cache (#144356)
* Remove buildbuddy cache

* Update .buildkite/scripts/steps/on_merge_ts_refs_api_docs.sh

* Update .buildkite/scripts/common/setup_bazel.sh
2022-11-01 15:23:24 -07:00
Brian Seeders
a74c3fab96
[CI] Enable kibana build reuse where possible (#136653) 2022-08-02 15:39:02 -04:00
Brian Seeders
82b5d8e120
[CI] Install global npm modules with a retry and failsafe (#135437) 2022-06-30 10:46:47 -04:00
Julia Bardi
f320b3302a
[Fleet] add upload report to cypress tests (#135282)
* add upload report to cypress tests

* added missing cypress reporter

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-29 09:13:11 -05:00
Brian Seeders
0b0b68786a
[CI] Move kibana-buildkite-library into kibana (#134787) 2022-06-28 13:19:05 -04:00
Kibana Machine
0d2e8e62ab
[api-docs] 2022-06-14 Daily api_docs build (#134407) 2022-06-15 10:47:12 -04:00
Spencer
63fd2dd552
[kbn/es] capture es debug files (#132355)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-05-17 17:23:13 -05:00
Brian Seeders
c21c8f7006
[bazel] Use a GCS bucket for local dev remote bazel cache (#131866) 2022-05-11 14:21:23 -04:00
Spencer
0b37272c8e
[jest] automatically determine run order (attempt 2) (#131091) 2022-04-27 11:18:15 -07:00
spalger
f149a17871 Revert "[jest] automatically determine run order (#130857)"
This reverts commit 1a05ce5cab.
2022-04-27 11:38:19 -05:00
Spencer
1a05ce5cab
[jest] automatically determine run order (#130857) 2022-04-27 11:10:47 -05:00