Get global retry coordinator only inside test#715
Merged
chombium merged 1 commit intocloudfoundry:mainfrom Jan 7, 2026
Merged
Conversation
Before this tests were failing sometimes. It is not 100% clear why. It looks to me like `WithParallelRetries` recreates the RetryCoordinator while `GetRetryCoordinator` does so as well. Verified this assumption via: ``` syslog.WithParallelRetries(2) coord1 := coordinator coordinator = syslog.GetGlobalRetryCoordinator() coord2 := coordinator Expect(coord1).To(BeIdenticalTo(coord2)) // Not the same pointer ```
| coordinator.Acquire("test-host", "test-app") | ||
| blocked.Wait() | ||
| coordinator.Acquire("test-host", "test-app") | ||
| coordinator.Release() |
Contributor
There was a problem hiding this comment.
this was for sure wrong.
nice catch 👍
Comment on lines
90
to
+91
| syslog.WithParallelRetries(2) | ||
| coordinator := syslog.GetGlobalRetryCoordinator() |
Contributor
There was a problem hiding this comment.
moving the GetGlobalRetry here is correct, as this is the only test where it is used anyways.
I am pretty sure the issue was the second calling of syslog.WithParallelRetries which should only be done once per test and was done twice before.
moving everything to where it is used is correct as well, maybe even more comprehensive.
So I am totally in agreement with your fix. 👍
nicklas-dohrn
approved these changes
Jan 7, 2026
Contributor
nicklas-dohrn
left a comment
There was a problem hiding this comment.
Nice catch, this was inconsistent and is now fixed 👍
chombium
approved these changes
Jan 7, 2026
Contributor
chombium
left a comment
There was a problem hiding this comment.
@jorbaum thanks for the fix and @nicklas-dohrn for the review.
LGTM!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
coordinator.Release()to the second retrier, which does not change the test outcome but looks wrong to meBefore this change tests were failing sometimes. It is not 100% clear why. See for example https://github.com/cloudfoundry/loggregator-agent-release/actions/runs/20717887432/job/59473536901 .
It looks to me like
WithParallelRetriesrecreates the RetryCoordinator whileGetRetryCoordinatordoes so as well.Verified this assumption via:
I think ginkgo is creating a race condition for some reason. I tried to move
WithParallelRetriesthis intoBeforeSuite():But this did not work.
Type of change
Testing performed?
Checklist:
mainbranch, or relevant version branch