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

Remove use MakeAssigneeList in webhooks to fix deadlock #6102

Merged

Conversation

zeripath
Copy link
Contributor

The webhooks currently use a call to MakeAssigneeList to get the assignees of an issue - however, this causes an SQL deadlock due to use of models.x whilst in a transaction. This call is unnecessary as the assignees are actually provided in the api.PullRequest.

Fix #6088

Signed-off-by: Andrew Thornton art27@cantab.net


Ceterum autem censeo x exempla monstrabit esse delendam.

Signed-off-by: Andrew Thornton <art27@cantab.net>
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@8d3bb86). Click here to learn what that means.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #6102   +/-   ##
=========================================
  Coverage          ?   38.86%           
=========================================
  Files             ?      345           
  Lines             ?    49510           
  Branches          ?        0           
=========================================
  Hits              ?    19241           
  Misses            ?    27486           
  Partials          ?     2783
Impacted Files Coverage Δ
models/webhook_dingtalk.go 0% <0%> (ø)
models/webhook_discord.go 1.39% <0%> (ø)
models/webhook_slack.go 0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d3bb86...ff3b664. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 17, 2019
@zeripath zeripath changed the title Remove use MakeAssigneeList in webhooks Remove use MakeAssigneeList in webhooks to fix deadlock Feb 17, 2019
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Feb 17, 2019
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 17, 2019
@zeripath zeripath merged commit 11e3166 into go-gitea:master Feb 17, 2019
@zeripath zeripath deleted the issue-6088-deadlock-in-webhook-generation branch February 17, 2019 21:21
zeripath added a commit to zeripath/gitea that referenced this pull request Feb 17, 2019
Signed-off-by: Andrew Thornton <art27@cantab.net>
techknowlogick pushed a commit that referenced this pull request Feb 18, 2019
Signed-off-by: Andrew Thornton <art27@cantab.net>
@lafriks lafriks added the backport/done All backports for this PR have been created label Feb 18, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP 500 Error and site unresponsive when using assignment notifications via slack webhook
6 participants