-
Notifications
You must be signed in to change notification settings - Fork 69
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
spr up seems to always trigger duplicate synchronize webhooks #207
Comments
You should be able to remove the github update call to test out your theory. index fa72383..d2e634c 100644
--- a/spr/spr.go
+++ b/spr/spr.go
@@ -191,7 +191,8 @@ func (sd *stackediff) UpdatePullRequests(ctx context.Context, reviewers []string
sd.profiletimer.Step("UpdatePullRequests::updatePullRequests")
for _, pr := range updateQueue {
- sd.github.UpdatePullRequest(ctx, githubInfo, pr.pr, pr.commit, pr.prevCommit)
+ // sd.github.UpdatePullRequest(ctx, githubInfo, pr.pr, pr.commit, pr.prevCommit)
+ _ = pr
}
sd.profiletimer.Step("UpdatePullRequests::commitUpdateQueue")``` |
Thanks, I'll give it a try. It sort of feels like a github bug to be honest - maybe there is a race between the api and the git push. |
pro tip: |
I also ran into this duplicate issue with a CI workflow that had both
As spr does a push followed by an update of the pull request, as mentioned above, it was triggering this workflow twice. What actually happens is the first event fires on push, then the second event fires on PR update, the first workflow ends up getting cancelled while the second runs and succeeds. This ends up breaking spr 'github checks', as it's looking at the first cancelled workflow rather than the secondary run that succeeded, so you end up with a big red X for spr status even though the PR is really green. For now, I ended up switching to triggering on all
|
Looks like the right approach is to use push events rather than pull_request events. |
@jsravn Did you ever figure out the issue? |
Is there any update on this ? |
Hi, I'm enjoying this project a lot. It really helps the dev workflow on github. Thanks!
I'm encountering one issue - whenever I do a
git spr up
on an existing PR, it causes github to emit two identicalsynchronize
webhooks. As a result, my CI system runs two duplicate builds.AFAIK synchronize should only be issued when the source branch is updated. But whatever spr is doing under the hood causes github to issue it twice. Oddly, the contents are identical - even the headers are the same, except for the X-GitHub-Delivery value. (actually, not always, sometimes there is a 1 second difference in the
pushed_at
fields).Here is an example log output of when it happens
Might be the git push followed by the github update that causes it?
The text was updated successfully, but these errors were encountered: