Skip to content

Conversation

timothycoleman
Copy link
Contributor

@timothycoleman timothycoleman commented Jul 25, 2025

The test writes to a follower node which forwards the write to the leader.

The reason the test was flaky is that it waits for the admin user to be created on the follower node, but this doesn't guarantee that the user is indexed on the leader.

The test fails when the request gets forwarded to the leader but the user isn't yet indexed, at which point the request is rejected.

The fix is to wait for the admin user to be created on the leader as part of spinning up the cluster.

Copy link
Contributor

github-actions bot commented Jul 25, 2025

Qodana for .NET

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@timothycoleman timothycoleman force-pushed the timothycoleman/flaky branch 2 times, most recently from 0cd9947 to 4203743 Compare July 25, 2025 08:29
The test writes to a follower node which forwards the write to the leader.

The reason the test was flaky is that it waits for the admin user to be created on the follower node, but this doesn't guarantee that the user is indexed on the leader.

The test fails when the request gets forwarded to the leader but the user isn't yet indexed, at which point the request is rejected.

The fix is to wait for the admin user to be created on the leader as part of spinning up the cluster.
@timothycoleman timothycoleman changed the title expose logging Fix authenticated_requests_made_from_a_follower flaky test Jul 31, 2025
@timothycoleman timothycoleman marked this pull request as ready for review July 31, 2025 17:04
@timothycoleman timothycoleman requested a review from a team as a code owner July 31, 2025 17:04
@CLAassistant
Copy link

CLAassistant commented Aug 1, 2025

CLA assistant check
All committers have signed the CLA.

@timothycoleman timothycoleman merged commit e18970a into master Aug 1, 2025
11 of 12 checks passed
@timothycoleman timothycoleman deleted the timothycoleman/flaky branch August 1, 2025 07:53
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 @timothycoleman Failed to create cherry Pick PR due to error:

RequestError [HttpError]: Merge conflict
   at /home/runner/work/_actions/kurrent-io/Automations/master/cherry-pick-pr-for-label/node_modules/@octokit/request/dist-node/index.js:66:23
   at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
 status: '409',
 headers: {
   'access-control-allow-origin': '*',
   'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
   'content-length': '127',
   'content-security-policy': "default-src 'none'",
   'content-type': 'application/json; charset=utf-8',
   date: 'Fri, 01 Aug 2025 07:53:52 GMT',
   'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
   server: 'github.com',
   'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
   vary: 'Accept-Encoding, Accept, X-Requested-With',
   'x-accepted-github-permissions': 'contents=write',
   'x-content-type-options': 'nosniff',
   'x-frame-options': 'deny',
   'x-github-api-version-selected': '2022-11-28',
   'x-github-media-type': 'github.v3; format=json',
   'x-github-request-id': 'C029:2AA39F:38A3C3:7283CC:688C7290',
   'x-ratelimit-limit': '5000',
   'x-ratelimit-remaining': '4985',
   'x-ratelimit-reset': '1754038222',
   'x-ratelimit-resource': 'core',
   'x-ratelimit-used': '15',
   'x-xss-protection': '0'
 },
 request: {
   method: 'POST',
   url: 'https://api.github.com/repos/kurrent-io/KurrentDB/merges',
   headers: {
     accept: 'application/vnd.github.v3+json',
     'user-agent': 'octokit-core.js/3.3.2 Node.js/20.19.3 (linux; x64)',
     authorization: 'token [REDACTED]',
     'content-type': 'application/json; charset=utf-8'
   },
   body: '{"base":"cherry-pick-cherry-pick/5210/timothycoleman/flaky-release/v24.10-a6e9adee-25b8-4fd8-8d43-5d8264ddf1ef","commit_message":"Merge dc5cd3abf44afa6d6d36721df857480643c3df3f into cherry-pick-cherry-pick/5210/timothycoleman/flaky-release/v24.10-a6e9adee-25b8-4fd8-8d43-5d8264ddf1ef [skip ci]\\n\\n\\nskip-checks: true\\n","head":"dc5cd3abf44afa6d6d36721df857480643c3df3f"}',
   request: { agent: [Agent], hook: [Function: bound bound register] }
 },
 documentation_url: 'https://docs.github.com/rest/branches/branches#merge-a-branch'
}

🚨👉 Check https://github.com/kurrent-io/KurrentDB/actions/runs/16669592247

@timothycoleman timothycoleman changed the title Fix authenticated_requests_made_from_a_follower flaky test [DB-1507] Fix authenticated_requests_made_from_a_follower flaky test Aug 1, 2025
Copy link

linear bot commented Aug 1, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants