Skip to content

Retry "lock release" to fix flaky tests#216781

Merged
sorenlouv merged 2 commits intoelastic:mainfrom
sorenlouv:retry-release-to-fix-flaky-tests
Apr 2, 2025
Merged

Retry "lock release" to fix flaky tests#216781
sorenlouv merged 2 commits intoelastic:mainfrom
sorenlouv:retry-release-to-fix-flaky-tests

Conversation

@sorenlouv
Copy link
Member

@sorenlouv sorenlouv commented Apr 2, 2025

Related to #216397
Closes #216763

This change ensures that we do not send the release request and extendTtl request simultaneously in withLock. This caused a conflict causing tests to fail:

           └-> "before all" hook for "should return the result of the callback"
             │ERROR Failed to release lock "my_lock_with_ttl_extension": version_conflict_engine_exception
             │      	Root causes:
             │      		version_conflict_engine_exception: [my_lock_with_ttl_extension]: version conflict, required seqNo [43], primary term [1]. current document has seqNo [44] and primary term [1]

Flaky tests:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8142

@botelastic botelastic bot added the Team:Obs AI Assistant Observability AI Assistant label Apr 2, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant)

@sorenlouv sorenlouv enabled auto-merge (squash) April 2, 2025 10:23
@sorenlouv sorenlouv merged commit 7275d2e into elastic:main Apr 2, 2025
21 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/14218371346

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 2, 2025
Related to elastic#216397
Closes elastic#216763

This change ensures that we do not send the `release` request and
`extendTtl` request simultaneously in `withLock`. This caused a conflict
causing tests to fail:

```
           └-> "before all" hook for "should return the result of the callback"
             │ERROR Failed to release lock "my_lock_with_ttl_extension": version_conflict_engine_exception
             │      	Root causes:
             │      		version_conflict_engine_exception: [my_lock_with_ttl_extension]: version conflict, required seqNo [43], primary term [1]. current document has seqNo [44] and primary term [1]
```

Flaky tests:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8142

(cherry picked from commit 7275d2e)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Apr 2, 2025
# Backport

This will backport the following commits from `main` to `8.x`:
- [Retry release to fix flaky tests
(#216781)](#216781)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Søren
Louv-Jansen","email":"soren.louv@elastic.co"},"sourceCommit":{"committedDate":"2025-04-02T11:21:20Z","message":"Retry
release to fix flaky tests (#216781)\n\nRelated to
https://github.com/elastic/kibana/pull/216397\nCloses
https://github.com/elastic/kibana/issues/216763\n\nThis change ensures
that we do not send the `release` request and\n`extendTtl` request
simultaneously in `withLock`. This caused a conflict\ncausing tests to
fail:\n\n```\n └-> \"before all\" hook for \"should return the result of
the callback\"\n │ERROR Failed to release lock
\"my_lock_with_ttl_extension\": version_conflict_engine_exception\n │
\tRoot causes:\n │ \t\tversion_conflict_engine_exception:
[my_lock_with_ttl_extension]: version conflict, required seqNo [43],
primary term [1]. current document has seqNo [44] and primary term
[1]\n```\n\nFlaky
tests:\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8142","sha":"7275d2e8bd834303898e3f95c5fd1ab734e92947","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Obs
AI Assistant","backport:version","v9.1.0","v8.19.0"],"title":"Retry
release to fix flaky
tests","number":216781,"url":"https://github.com/elastic/kibana/pull/216781","mergeCommit":{"message":"Retry
release to fix flaky tests (#216781)\n\nRelated to
https://github.com/elastic/kibana/pull/216397\nCloses
https://github.com/elastic/kibana/issues/216763\n\nThis change ensures
that we do not send the `release` request and\n`extendTtl` request
simultaneously in `withLock`. This caused a conflict\ncausing tests to
fail:\n\n```\n └-> \"before all\" hook for \"should return the result of
the callback\"\n │ERROR Failed to release lock
\"my_lock_with_ttl_extension\": version_conflict_engine_exception\n │
\tRoot causes:\n │ \t\tversion_conflict_engine_exception:
[my_lock_with_ttl_extension]: version conflict, required seqNo [43],
primary term [1]. current document has seqNo [44] and primary term
[1]\n```\n\nFlaky
tests:\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8142","sha":"7275d2e8bd834303898e3f95c5fd1ab734e92947"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/216781","number":216781,"mergeCommit":{"message":"Retry
release to fix flaky tests (#216781)\n\nRelated to
https://github.com/elastic/kibana/pull/216397\nCloses
https://github.com/elastic/kibana/issues/216763\n\nThis change ensures
that we do not send the `release` request and\n`extendTtl` request
simultaneously in `withLock`. This caused a conflict\ncausing tests to
fail:\n\n```\n └-> \"before all\" hook for \"should return the result of
the callback\"\n │ERROR Failed to release lock
\"my_lock_with_ttl_extension\": version_conflict_engine_exception\n │
\tRoot causes:\n │ \t\tversion_conflict_engine_exception:
[my_lock_with_ttl_extension]: version conflict, required seqNo [43],
primary term [1]. current document has seqNo [44] and primary term
[1]\n```\n\nFlaky
tests:\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8142","sha":"7275d2e8bd834303898e3f95c5fd1ab734e92947"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Søren Louv-Jansen <soren.louv@elastic.co>
@sorenlouv sorenlouv changed the title Retry release to fix flaky tests Retry "lock release" to fix flaky tests Apr 2, 2025
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#8142

[❌] x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts: 175/200 tests passed.

see run history

@sorenlouv sorenlouv deleted the retry-release-to-fix-flaky-tests branch April 2, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Obs AI Assistant Observability AI Assistant v8.19.0 v9.1.0

Projects

None yet

4 participants