mirror of
https://github.com/elastic/kibana.git
synced 2025-04-22 17:04:01 -04:00
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> |
||
---|---|---|
.. | ||
hooks | ||
pipeline-resource-definitions | ||
pipeline-utils | ||
pipelines | ||
scripts | ||
.mocharc.json | ||
.npmrc | ||
disabled_jest_configs.json | ||
ftr_base_serverless_configs.yml | ||
ftr_configs_manifests.json | ||
ftr_oblt_serverless_configs.yml | ||
ftr_oblt_stateful_configs.yml | ||
ftr_platform_stateful_configs.yml | ||
ftr_search_serverless_configs.yml | ||
ftr_search_stateful_configs.yml | ||
ftr_security_serverless_configs.yml | ||
ftr_security_stateful_configs.yml | ||
package-lock.json | ||
package.json | ||
pull_requests.json | ||
README.md | ||
tsconfig.json | ||
tsconfig.test.json |
Kibana / Buildkite
Directory Structure
hooks
- special directory used by Buildkite agents for hookspipeline-utils
- Shared TypeScript utils for use in pipeline scriptspipelines
- contains pipeline definitionsscripts/common
- scripts that getsource
d by other scripts to set environment variables or import shared functionsscripts/lifecycle
- general scripts for tasks that run before or after individual steps or the entire buildscripts/steps
- scripts that define something that will run for a step defined in a pipelinescripts/*
- all other scripts are building blocks that make up the tasks in pipelines. They may be run by other scripts, but should not besource
d