Skip to content

[9.0] [Test retry service] Add initialDelay option (#224156)#224201

Merged
kibanamachine merged 16 commits intoelastic:9.0from
kibanamachine:backport/9.0/pr-224156
Jun 26, 2025
Merged

[9.0] [Test retry service] Add initialDelay option (#224156)#224201
kibanamachine merged 16 commits intoelastic:9.0from
kibanamachine:backport/9.0/pr-224156

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 9.0:

Questions ?

Please refer to the Backport tool documentation

## Summary

Add `initialDelay` option to the `tryWithRetries` retry service. This is
a common usecase across Kibana where we'd need to wait a little bit
before ES fully refreshes the indexed data to test a specific behavior.
Added a test case to test the new flag as well.

The PR updates the UI counters test case as an example where i needed
this to replace `delay(..)` with the `initialDelay` flag. (original PR
elastic#224151)

closes elastic#98240

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit e4749b0)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Jun 17, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) June 17, 2025 09:50
@Bamieh
Copy link
Copy Markdown
Contributor

Bamieh commented Jun 17, 2025

@elasticmachine merge upstream

@Bamieh
Copy link
Copy Markdown
Contributor

Bamieh commented Jun 17, 2025

Typecheck is failing type checking the kbn-test-jest-helpers being bundled. I only added this package only to use the delay function so i just replaced it with a hardcoded one similar to what we have across the codebase.

@elasticmachine
Copy link
Copy Markdown
Contributor

⏳ Build in-progress, with failures

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #19 / Retry for success should call delay with initialDelay if initialDelay is provided
  • [job] [logs] Jest Tests #19 / Retry for success should call delay with initialDelay if initialDelay is provided

History

cc @Bamieh

@kibanamachine kibanamachine merged commit dc06e5e into elastic:9.0 Jun 26, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants