Repository navigation
test(server): the webhook issue-thread test waits for the event to name its thread - #956
Merged
Merged
Conversation
…me its thread An event reads "joined" once its run is claimed, and names its thread (the run's thread_id) once the run reaches the thread, a step later. The test waited for "joined" and then read the thread at once, so on a busy runner it read null. It now waits for both. Under load the old test failed 2 of 12 runs with CI's error; the new one passed 18 of 18.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This branch was previously deployed
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.
WebhookEvents.test.ts"two events for a new issue share one thread: the second waits for the first's thread" failed now and then withexpected null to equal <thread id>. It knocked the 0.10.1 notes out of the merge queue once.Why
An event reads
joinedas soon as its run is claimed (claimEventRunsets the status in the same transaction that inserts the run, which is stilllaunching). The thread it lists comes from the run'sthread_id, which is set a step later, once the run reaches the thread. The test waited forjoinedand then read the thread at once, so on a busy runner it readnull. In the app the thread link just shows up a moment after the status; users aren't affected.Fix
The test waits until the event is
joinedand names a thread, then checks it's the issue's thread.Checked
vp fmtandvp lintpass.