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

Set context for running CreateArchive to that of the request #12555

Conversation

zeripath
Copy link
Contributor

Set the context for CreateArchive to that of the request to ensure that archives
are only built for as long as a request is requesting them

Fix #11551

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

Set the context for CreateArchive to that of the request to ensure that archives
are only built for as long as a request is requesting them

Fix go-gitea#11551

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added this to the 1.13.0 milestone Aug 21, 2020
@codecov-commenter
Copy link

codecov-commenter commented Aug 21, 2020

Codecov Report

Merging #12555 into master will increase coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12555      +/-   ##
==========================================
+ Coverage   43.43%   43.45%   +0.01%     
==========================================
  Files         645      645              
  Lines       71306    71306              
==========================================
+ Hits        30972    30984      +12     
+ Misses      35324    35313      -11     
+ Partials     5010     5009       -1     
Impacted Files Coverage Δ
modules/git/commit_archive.go 0.00% <0.00%> (ø)
routers/repo/repo.go 32.71% <0.00%> (ø)
modules/log/event.go 57.54% <0.00%> (+0.94%) ⬆️
modules/queue/workerpool.go 61.22% <0.00%> (+2.44%) ⬆️
modules/git/repo_language_stats.go 56.60% <0.00%> (+3.77%) ⬆️
modules/indexer/stats/db.go 60.86% <0.00%> (+8.69%) ⬆️

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 d3b5eda...aed6703. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 21, 2020
@lunny
Copy link
Member

lunny commented Aug 22, 2020

So the timeout is the one http client default value?

@zeripath
Copy link
Contributor Author

The timeout becomes the request context, that is if the user is still requesting the archive it still gets created. It just solves the initial issue. We need something more like the migration creation task based approach in general, @kevans91 was doing some work in that direction but the PR # escapes me right now.

@kevans91
Copy link
Contributor

PR #11296

@zeripath zeripath changed the title Set context for running CreateArchive in to that of the request Set context for running CreateArchive to that of the request Aug 23, 2020
@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 Aug 28, 2020
@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 Aug 28, 2020
@lafriks lafriks merged commit eb1bf23 into go-gitea:master Aug 28, 2020
@zeripath zeripath deleted the fix-11551-set-default-command-timeout-for-git-archive branch August 28, 2020 07:17
@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
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.

Default command timeout used for git archive
7 participants