Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flaky matcher #2812

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Flaky matcher #2812

wants to merge 4 commits into from

Conversation

paul-butcher
Copy link
Contributor

@paul-butcher paul-butcher commented Jan 15, 2025

What does this change?

Fixes #2807

Part of this is simply to clarify intent, but the fundamental fixes (I believe) are:

  • replace the spinlock waits with eventually.
    • I'm not sure if this actually makes a difference, but I think it's more correct
    • I did see some instances where the spinlock version failed but the Patience version succeeded.
  • Ensure that A starts first
    • One instance of this problem seemed to be that A never had to wait for C to start (because it had already started), which also meant that C never waited (because C finished before A acquired the lock)
  • Lock A before waiting for C
    • As above. Sometimes C didn't have to wait for the A lock to be released, because it got there before the lock was applied.

I have also made some changes to clarify the intent of the waits and make things easier to debug.

How to test

Look at buildkite. Retry the build associated with this PR several times. I have already run it a few times on the associated branch.

Without this fix, I would expect to see at least some failure if run five times.

How can we measure success?

We no longer have to retry the matcher task to get our PRs to build successfully.

Have we considered potential risks?

This is a change to an unreliable test. The only risk is that I haven't actually fixed the problem, but even so, this approach is an improvement on what was there before

@paul-butcher paul-butcher requested a review from a team as a code owner January 15, 2025 10:20
@paul-butcher paul-butcher enabled auto-merge (squash) January 15, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

matcher locking tests are unreliable
1 participant