-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Webhooks triggered twice #7702
Comments
It seems there is one PR fixed that. |
You mean #7684?, I saw this PR, but it doesn't seem to work for my case. |
No, I mean #7516, but it seems it hasn't been fixed. |
So I think this is because we're now running commits through the git hooks - so the webhook actions in commit repo action might be no longer needed. @0x1793d1 are you sure that the webhooks you receive are absolutely the same? |
@zeripath Yes, they are the same. Result on try.gitea.io : https://webhook.site/#!/ad98b669-2775-45b5-a98e-164aed79aa48/01e88be5-81b8-4582-9cc9-f72ba6b3a8b3/1 |
It seems recent version fixed this. But I don't know which PR did that. |
|
@0x1793d1 could you check if you have two webhooks from the same ci server. |
@lunny I am using Drone as CI server, and it receive two hooks when I commit via the website. I can reproduce this bug with a dummy webhook on try.gitea.io: |
@zeripath You mean this? https://github.com/go-gitea/gitea/blob/master/modules/repofiles/action.go#L115 |
Yeah that's my worry but I'm a busy at the moment to double check this. |
I found this will occupy randomly in v1.9.0. |
Looking at some logs, I can confirm that it add a task during post-receive call and a other one later after the post-receive ended. |
I think that call to PushUpdate should not be call anymore on web edit like in CreateOrUpdateRepoFile: gitea/modules/repofiles/update.go Line 117 in 7ad6710
Line 147 in 3563650
|
|
Is the "latest" docker image updated with that fix ? I updated image last friday (6 sept) and I still see that issue with Drone. |
It should be, what kind of webhook was trigger for you twice? |
For me gitea/gitea:last send twice gitea/gitea:1.10 send one time. |
@adrianyorke that looks different, that's duplicate notifications and I suspect you may have two Gitea post-receive hooks in your repository. But please open a different issue if you don't |
Thanks for replying @zeripath. Apologies, I was a little embarrassed when I realized I had added a comment to a Closed issue. I really wasn't expecting a reply, especially "same day" so thank you. I will experiment more and report back. So far this is a "default installation" but let's see. |
I think similar issue was fixed and will be in 1.11.2 |
This is a closed thread but for anyone turning up here, my problem went away after the first day or so. I didn't need to fix anything myself or change any config, the duplicate triggers just stopped happening. Gitea has been stable since. |
You are right! Issue went away after i restarted gitea. |
[x]
):Description
Hi,
Since 1.9.0, webhooks are triggered twice when committing via the website.
The text was updated successfully, but these errors were encountered: