kibana/.buildkite
Sid e0886ba73f
[Session cleanup] Update session index cleanup to check for missing shards (#205744)
Closes https://github.com/elastic/kibana/issues/205146

## Summary
We run a session clean up task that opens a point in time query to try
and delete any older sessions in the session index. We've noticed that
this task fails quite often with the same error
`no_shard_available_action_exception`. On investigating, it's possible
that the point in time query is opened when there are no shards
available for that index. This PR fixes that by checking if the PIT
query fails with 503 bails if it throws the error - allowing the task to
be tried again in the next run of the task manager. We allow for up to
10 failures of the clean up task in succession before logging an error.


### Testing
Unfortunately, there's no reliable way to simulate missing shards
locally. I've added a new integration test config here:

```
node scripts/functional_tests_server.js --config x-pack/test/security_api_integration/session_shard_missing.config.ts
```

This overrides the ES function to return 503 when opening PIT query and
then attempts to assert the result from the task manager.

### Release note
Updates session cleanup mechanism to account for potential missing
shards in Session index.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.


- [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
[kibana-flaky-test-suite-runner#7836](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7836)
- [ ] 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)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-18 10:26:30 +01:00
..
hooks [Ops] Refactor env loading & fix agent-targeting rewrite (#178320) 2024-03-12 16:31:26 +01:00
pipeline-resource-definitions [ci] enable Scout reporter for on-merge-unsupported-ftrs (#210627) 2025-02-11 18:01:54 +00:00
pipeline-utils [ci] Click to deploy cloud (#205623) 2025-01-23 10:26:03 +01:00
pipelines chore(NA): upgrade to webpack 5 (#191106) 2025-02-14 03:01:36 +00:00
scripts chore(NA): upgrade to webpack 5 (#191106) 2025-02-14 03:01:36 +00:00
.mocharc.json [CI] Move kibana-buildkite-library into kibana (#134787) 2022-06-28 13:19:05 -04:00
.npmrc [CI] Move kibana-buildkite-library into kibana (#134787) 2022-06-28 13:19:05 -04:00
disabled_jest_configs.json [Index Management] Fix broken jest tests (#173029) 2023-12-18 17:21:28 +01:00
ftr_base_serverless_configs.yml [FTR] support "deployment agnostic" api-integration tests (#189853) 2024-08-07 10:34:52 -05:00
ftr_configs_manifests.json [FTR] split configs by target into multiple manifest files (#187440) 2024-07-19 15:00:53 +02:00
ftr_oblt_serverless_configs.yml [Discover] Add context awareness telemetry tests for Observability profiles (#201310) 2024-11-28 20:12:26 -04:00
ftr_oblt_stateful_configs.yml [Profiling] Migrate Profiling Cypress tests to on_merge from on_merge_unsupported_ftrs (#206727) 2025-01-21 17:09:42 +01:00
ftr_platform_stateful_configs.yml [Session cleanup] Update session index cleanup to check for missing shards (#205744) 2025-02-18 10:26:30 +01:00
ftr_search_serverless_configs.yml Balance serverless test groups 2024-11-27 17:00:05 +02:00
ftr_search_stateful_configs.yml [FTR] split configs by target into multiple manifest files (#187440) 2024-07-19 15:00:53 +02:00
ftr_security_serverless_configs.yml [Security Solution] Implement rule customization license checks (#206079) 2025-01-29 18:20:47 +01:00
ftr_security_stateful_configs.yml [Security Solution] Implement rule customization license checks (#206079) 2025-01-29 18:20:47 +01:00
package-lock.json [ci] Click to deploy cloud (#205623) 2025-01-23 10:26:03 +01:00
package.json [ci] Click to deploy cloud (#205623) 2025-01-23 10:26:03 +01:00
pull_requests.json [ci] Click to deploy cloud (#205623) 2025-01-23 10:26:03 +01:00
README.md [CI] Move kibana-buildkite-library into kibana (#134787) 2022-06-28 13:19:05 -04:00
tsconfig.json fix(NA): adds pipeline-resource-definitions/fix-location-collection.ts into a tsconfig 2024-04-04 15:16:01 +01:00
tsconfig.test.json [CI] Move kibana-buildkite-library into kibana (#134787) 2022-06-28 13:19:05 -04:00

Kibana / Buildkite

Directory Structure

  • hooks - special directory used by Buildkite agents for hooks
  • pipeline-utils - Shared TypeScript utils for use in pipeline scripts
  • pipelines - contains pipeline definitions
  • scripts/common - scripts that get sourced by other scripts to set environment variables or import shared functions
  • scripts/lifecycle - general scripts for tasks that run before or after individual steps or the entire build
  • scripts/steps - scripts that define something that will run for a step defined in a pipeline
  • scripts/* - all other scripts are building blocks that make up the tasks in pipelines. They may be run by other scripts, but should not be sourced