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

Unable to deliver webhook task[53215]: webhook does not exist [id: 134] #25744

Closed
hiifong opened this issue Jul 7, 2023 · 17 comments · Fixed by #26039
Closed

Unable to deliver webhook task[53215]: webhook does not exist [id: 134] #25744

hiifong opened this issue Jul 7, 2023 · 17 comments · Fixed by #26039
Assignees
Labels

Comments

@hiifong
Copy link
Contributor

hiifong commented Jul 7, 2023

Description

2023/07/07 15:54:26 ...s/webhook/webhook.go:125:handler() [E] Unable to deliver webhook task[53215]: webhook does not exist [id: 134]

Gitea Version

v1.20+

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

./gitea web

Database

MySQL

@puni9869
Copy link
Member

puni9869 commented Jul 8, 2023

I can pick this one.

Could you share the repro steps. It will be very use ful for me to understand .

@puni9869 puni9869 self-assigned this Jul 8, 2023
@hiifong
Copy link
Contributor Author

hiifong commented Jul 8, 2023

I can pick this one.

Could you share the repro steps. It will be very use ful for me to understand .

I'm very sorry, I didn't notice this bug before and now I don't know how to reproduce it, anyway he will throw it when I start the gitea instance.

@puni9869
Copy link
Member

puni9869 commented Jul 8, 2023

I will try to repro it.
Wish me luck...

@puni9869 puni9869 removed their assignment Jul 9, 2023
@puni9869
Copy link
Member

puni9869 commented Jul 9, 2023

I found it but different error
image

Steps to repo:
Create A repo.
Commit something.
Create a webhook
Delete the repo.
Then Bingo the error in webhook will produce.
@hiifong @silverwind

@puni9869 puni9869 self-assigned this Jul 9, 2023
@puni9869
Copy link
Member

puni9869 commented Jul 9, 2023

But if you see the error

2023/07/09 16:26:12 ...s/webhook/webhook.go:114:handler() [E] GetHookTaskByID[16] failed: hook task does not exist [task: 16, hook: 0, uuid: ]

Its showing different error. hook task does not exist

@puni9869 puni9869 removed their assignment Jul 9, 2023
@hiifong
Copy link
Contributor Author

hiifong commented Jul 9, 2023

But if you see the error
2023/07/09 16:26:12 ...s/webhook/webhook.go:114:handler() [E] GetHookTaskByID[16] failed: hook task does not exist [task: 16, hook: 0, uuid: ] `` Its showing different error. hook task does not exist`

I guess you might get the same error as me when you restart your gitea instance with console

@puni9869
Copy link
Member

puni9869 commented Jul 9, 2023

Are you testing it on your local system or on testing instance. The error only persist when we delete any repo with a webhook
PS: in my local when I restart the project I don't see any error. I mean make watch

@hiifong
Copy link
Contributor Author

hiifong commented Jul 9, 2023

Are you testing it on your local system or on testing instance. The error only persist when we delete any repo with a webhook
PS: in my local when I restart the project I don't see any error. I mean make watch

prod

@puni9869
Copy link
Member

@hiifong Shall we close this issue, Since I have tried multple time, multiple ways to repro it, still no luck. I have not seen the above issue again. Ofcourse we can reopen this if we encountered

@lunny
Copy link
Member

lunny commented Jul 21, 2023

Maybe we should clean the tasks in queues before deleting database records when deleting a repository.

@puni9869
Copy link
Member

@hiifong I can take this forward. :)

@puni9869 puni9869 self-assigned this Jul 21, 2023
@wxiaoguang
Copy link
Contributor

Maybe we should clean the tasks in queues before deleting database records when deleting a repository.

TBH, it's not the right way. Queue item couldn't/shouldn't be deleted ad-hoc.

It should simply ignore the non-existing webhooks.

@puni9869
Copy link
Member

Shall we log warn level instead of error level in the program.

@lunny
Copy link
Member

lunny commented Jul 21, 2023

Shall we log warn level instead of error level in the program.

Maybe yes.

techknowlogick pushed a commit that referenced this issue Jul 28, 2023
…6039)

Attemp fix: #25744
Fixing the log level when we delete any repo then we get error hook not
found by id. That should be warn level to reduce the noise in the logs.

---------

Co-authored-by: delvh <dev.lh@web.de>
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Jul 28, 2023
…-gitea#26039)

Attemp fix: go-gitea#25744
Fixing the log level when we delete any repo then we get error hook not
found by id. That should be warn level to reduce the noise in the logs.

---------

Co-authored-by: delvh <dev.lh@web.de>
lunny pushed a commit that referenced this issue Jul 29, 2023
…6039) (#26211)

Backport #26039 by @puni9869

Attemp fix: #25744
Fixing the log level when we delete any repo then we get error hook not
found by id. That should be warn level to reduce the noise in the logs.

Co-authored-by: puni9869 <80308335+puni9869@users.noreply.github.com>
@hiifong
Copy link
Contributor Author

hiifong commented Jul 29, 2023

very strange,here is my gitea compiled from the latest commit @puni9869
image

2023/07/30 01:14:28 ...s/webhook/webhook.go:130:handler() [E] Unable to deliver webhook task[53215]: webhook does not exist [id: 134]

Gitea version: Gitea version 1.20.0+rc0-422-g11074258f built with GNU Make 4.2.1, go1.20.6 : bindata

@puni9869
Copy link
Member

puni9869 commented Jul 29, 2023

It works on my system, mine system's configs are same as yours.

@puni9869
Copy link
Member

puni9869 commented Jul 29, 2023

Just checked on my system,
2023/07/29 23:49:13 ...s/webhook/webhook.go:116:handler() [W] GetHookTaskByID[41] warn: hook task does not exist [task: 41, hook: 0, uuid: ]
Created two repos and deleted them then got this
image

image

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants