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

Gitea don't send webhook on push #20482

Closed
vjarskee opened this issue Jul 25, 2022 · 11 comments
Closed

Gitea don't send webhook on push #20482

vjarskee opened this issue Jul 25, 2022 · 11 comments
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail

Comments

@vjarskee
Copy link

Description

I set up the integration with Drone and find that Gitea doesn't send Webhook when pushing. ALLOWED_HOST_LIST has the right address, and the webhook is added, responds to Test Delivery, and also triggers, for example, the creation of a pull request. Console in debug mode does not see anything that could help.

Gitea Version

1.16.9

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

chrome_yHHcPH8eqQ

Git Version

No response

Operating System

No response

How are you running Gitea?

Docker

Database

PostgreSQL

@maoxuner
Copy link

maoxuner commented Aug 4, 2022

When I was using gitea version 1.16.9, webhooks worked well. But after I upgraded gitea to version 1.17.0 (stable, not rc versions), webhooks down. However, if I click Test Delivery button, a request was sent successfully.

I think there is something wrong with event system. Evey time I push my code, there will be a new hanging process named GET: /user/events shown in monitor page.

processes


Docker Version: 18.09.7

Operating System: CentOS Linux 7 (Core)

Architecture: x86_64

Docker Image: gitea/gitea:1.17.0

@maoxuner
Copy link

maoxuner commented Aug 5, 2022

When I was using gitea version 1.16.9, webhooks worked well. But after I upgraded gitea to version 1.17.0 (stable, not rc versions), webhooks down. However, if I click Test Delivery button, a request was sent successfully.

I think there is something wrong with event system. Evey time I push my code, there will be a new hanging process named GET: /user/events shown in monitor page.

processes

Docker Version: 18.09.7

Operating System: CentOS Linux 7 (Core)

Architecture: x86_64

Docker Image: gitea/gitea:1.17.0

Solved after upgrade docker engine. #20678

Gitea 1.17.0 is released | Require docker version >= 20.10.6

It's for 1.17.0 because of base image upgrading. It probably not work for 1.16.9.

@wxiaoguang wxiaoguang added issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail and removed type/bug labels Sep 28, 2022
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Sep 28, 2022

@vjarskee

Have you checked your docker version to make sure it's >= 20.10.6 and tried "Resynchronize pre-receive, update and post-receive hooks of all repositories" on the site admin panel? Is there still a problem?

@MartinLau7
Copy link

I have this situation too, can anyone help me? My version of Docker is currently 20.10.18

@wxiaoguang
Copy link
Contributor

I have this situation too, can anyone help me? My version of Docker is currently 20.10.18

Please provide enough information, otherwise nobody can help.

  1. Is the problem that: you can not see the push activity on the dashboard?
  2. What's your Gitea version?
  3. Have you upgraded Gitea? Did the push activity ever work well before the upgrade?
  4. Have you tried "Resynchronize pre-receive, update and post-receive hooks of all repositories" on the site admin panel?
  5. What your Docker Server version? Docker server and client can have different versions.

@MartinLau7
Copy link

Please provide enough information, otherwise nobody can help.

  1. Is the problem that: you can not see the push activity on the dashboard?
    我尝试 push 代码查看 webhook 是否触发,结果并未触发,drone 也没有接收到通知
  1. What's your Gitea version?
    没有升级,我目前使用的1.17.2
  1. Have you upgraded Gitea? Did the push activity ever work well before the upgrade?
    没有升级,我目前使用的1.17.2
  1. Have you tried "Resynchronize pre-receive, update and post-receive hooks of all repositories" on the site admin panel?
    是的,我执行过一次 还是不行
  1. What your Docker Server version? Docker server and client can have different versions.
Client: Docker Engine - Community
 Version:           20.10.18
 API version:       1.41
 Go version:        go1.18.6
 Git commit:        b40c2f6
 Built:             Thu Sep  8 23:11:45 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Sep 28, 2022

1 The answer doesn't help. Can you see the push activity on the dashboard? And: How do you push? By SSH? By HTTP? By online edit by browser? Have you tested the webhook manually? Can Gitea communicate with Drone correctly?

5 I said "Docker Server", not the "Client"

I can not help since it doesn't seem to be a valid report.

@MartinLau7
Copy link

1 The answer doesn't help. Can you see the push activity on the dashboard? And: How do you push? By SSH? By HTTP? By online edit by browser? Have you tested the webhook manually? Can Gitea communicate with Drone correctly?
是的,通过ssh push,并且尝试手动测试 webhook ,但是 gitea 并没有执行 webhook

5 I said "Docker Server", not the "Client"

Server: Docker Engine - Community
 Engine:
  Version:          20.10.18
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.6
  Git commit:       e42327a
  Built:            Thu Sep  8 23:09:37 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.8
  GitCommit:        9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

明天我尝试在本地构建一个 1.16.9 测试看看是否仍有这个情况

@wxiaoguang
Copy link
Contributor

Again (second or third time...): Can you see the push activity on the dashboard? The timeline on homepage?

并且尝试手动测试 webhook ,但是 gitea 并没有执行 webhook

If you have ever tested the webhook manually, does it mean that the manual webhook test works well and there is no error?

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Sep 28, 2022

I just setup a Gitea 1.17.2 (docker) locally and did a full test, all work as expected.

It doesn't seem to be a Gitea problem (actually, a lot of users are using 1.17.x and they also use CI/CD. If there is a bug, there would be a lot of issues, however there is just a few people asking about why webhook doesn't work on their side)

If there is a problem, there are only a few possibilities:

  1. The docker server (not client!) version is too low: >=20.10.6
  2. The git hooks are out of sync: "Resynchronize pre-receive, update and post-receive hooks of all repositories" on the site admin panel
  3. The git repositories (and hooks) are stored on some filesystems(Windows/NAS) which doesn't support script execution, which is pretty a rare case.

Test Result

The push event works, the push event can be shown on the dashboard activity.

image

The webhook can be triggered when there is a push.

image

@wxiaoguang
Copy link
Contributor

Since 1.16.x is not supported any longer, please use 1.17.x. And this issue is quite old and mixed with different problems, I think it's time to close this one.

If there are still some issues, please report with details in a new issue, please follow the suggestions in the comment above.

@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail
Projects
None yet
Development

No branches or pull requests

4 participants