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

Support Force-update in Mirror and improve Tracing in mirror #12242

Merged
merged 7 commits into from
Aug 20, 2020

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Jul 13, 2020

This PR allows the mirror service to handle force-updates and improves Trace logging within the mirror service considerably.

It also fixes a bug in log.NewColoredIDValue() which led to a double indirection and incorrect IDs being printed out.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added this to the 1.13.0 milestone Jul 13, 2020
services/mirror/mirror.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 14, 2020
@lafriks
Copy link
Member

lafriks commented Jul 14, 2020

small nit but otherwise lgtm

modules/log/colors.go Outdated Show resolved Hide resolved
@6543
Copy link
Member

6543 commented Jul 23, 2020

@zeripath there should be an option to enable/disable force-update on mirrors since it could be an eavel atack to delete code

some mirrors exist to have a copy of some code (prevent code erase of eavil actions witch could happen on opencource repos)

@zeripath
Copy link
Contributor Author

@6543 git is doing the mirroring not us - so the force update already happens - the issue is that the gitea UI doesn't get updated.

@6543
Copy link
Member

6543 commented Jul 24, 2020

ok konssider this pull as bugfix (as lable already indecate) and my comment as new feature-request

@codecov-commenter
Copy link

Codecov Report

Merging #12242 into master will increase coverage by 0.00%.
The diff coverage is 21.42%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #12242   +/-   ##
=======================================
  Coverage   43.50%   43.51%           
=======================================
  Files         642      642           
  Lines       71013    71040   +27     
=======================================
+ Hits        30893    30910   +17     
- Misses      35113    35123   +10     
  Partials     5007     5007           
Impacted Files Coverage Δ
services/mirror/mirror.go 18.58% <21.42%> (+0.36%) ⬆️
modules/indexer/stats/db.go 43.47% <0.00%> (-17.40%) ⬇️
modules/indexer/stats/queue.go 64.70% <0.00%> (-11.77%) ⬇️
modules/process/manager.go 72.50% <0.00%> (-2.50%) ⬇️
models/issue_comment.go 53.90% <0.00%> (+0.15%) ⬆️
models/error.go 35.32% <0.00%> (+0.51%) ⬆️
modules/log/event.go 57.54% <0.00%> (+0.94%) ⬆️
modules/queue/unique_queue_disk_channel.go 55.38% <0.00%> (+1.53%) ⬆️
modules/queue/workerpool.go 60.81% <0.00%> (+2.04%) ⬆️
services/pull/check.go 50.00% <0.00%> (+2.30%) ⬆️
... and 1 more

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 7c0862b...f07cec8. Read the comment docs.

@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 20, 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 20, 2020
@techknowlogick techknowlogick merged commit c6943cc into go-gitea:master Aug 20, 2020
@zeripath zeripath deleted the mirror-queue-logging branch August 20, 2020 21:46
@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.

8 participants