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

Defer closing the gitrepo until the end of the wrapped context functions #15653

Merged

Conversation

zeripath
Copy link
Contributor

There was a mistake in #15372 where deferral of gitrepo close occurs before it should.

This PR fixes this.

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

There was a mistake in go-gitea#15372 where deferral of gitrepo close occurs before it should.

This PR fixes this.

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

codecov-commenter commented Apr 28, 2021

Codecov Report

Merging #15653 (1ef7f35) into master (5c5cfd6) will decrease coverage by 0.00%.
The diff coverage is 51.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15653      +/-   ##
==========================================
- Coverage   43.89%   43.89%   -0.01%     
==========================================
  Files         678      678              
  Lines       81868    81898      +30     
==========================================
+ Hits        35933    35946      +13     
- Misses      40086    40101      +15     
- Partials     5849     5851       +2     
Impacted Files Coverage Δ
modules/nosql/manager_redis.go 0.00% <0.00%> (ø)
modules/web/route.go 79.89% <36.84%> (-4.82%) ⬇️
routers/repo/release.go 24.39% <66.66%> (+1.19%) ⬆️
modules/context/repo.go 53.32% <87.50%> (+0.17%) ⬆️
services/pull/pull.go 43.47% <0.00%> (-0.46%) ⬇️

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 ed39377...1ef7f35. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 28, 2021
@zeripath zeripath added the performance/speed performance issues with slow downs label May 1, 2021
@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 May 5, 2021
@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 May 5, 2021
@6543 6543 merged commit eedc0c8 into go-gitea:main May 5, 2021
zeripath added a commit to zeripath/gitea that referenced this pull request May 6, 2021
…ons (go-gitea#15653)

Backport go-gitea#15653

There was a mistake in go-gitea#15372 where deferral of gitrepo close occurs before it should.

This PR fixes this.

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added the backport/done All backports for this PR have been created label May 6, 2021
6543 pushed a commit that referenced this pull request May 7, 2021
…ons (#15653) (#15746)

* Defer closing the gitrepo until the end of the wrapped context functions (#15653)

Backport #15653

There was a mistake in #15372 where deferral of gitrepo close occurs before it should.

This PR fixes this.
@zeripath zeripath deleted the only-close-the-gitrepo-at-the-end-of-wrap branch May 7, 2021 18:10
@zeripath zeripath mentioned this pull request May 9, 2021
12 tasks
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this pull request Aug 10, 2021
…ons (go-gitea#15653)

There was a mistake in go-gitea#15372 where deferral of gitrepo close occurs before it should.

This PR fixes this.

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
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. performance/speed performance issues with slow downs type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants