The Wayback Machine - https://web.archive.org/web/20220211083420/https://github.com/go-gitea/gitea/pull/16957
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

Make mirror feature more configurable #16957

Merged
merged 16 commits into from Sep 7, 2021
Merged

Conversation

@6543
Copy link
Member

@6543 6543 commented Sep 5, 2021

Rename[repository] DISABLE_MIRRORS to [mirror] DISABLE_NEW_PULL and add ENABLED and DISABLE_NEW_PUSH with the below meanings:

  • ENABLED: true: Enables the mirror functionality. Set to false to disable all mirrors.
  • DISABLE_NEW_PULL: false: Disable the creation of new mirrors. Pre-existing mirrors remain valid.
  • DISABLE_NEW_PUSH: false: Disable the creation of new push mirrors. Pre-existing mirrors remain valid.

🚫 DEPRECATION 🚫

This PR deprecates the [repository] DISABLE_MIRRORS setting - which is mapped to [mirror] DISABLE_NEW_PULL.

@6543 6543 added this to the 1.16.0 milestone Sep 5, 2021
Codeberg-org pushed a commit to Codeberg-org/gitea that referenced this issue Sep 5, 2021
@codecov-commenter
Copy link

@codecov-commenter codecov-commenter commented Sep 5, 2021

Codecov Report

❄1¤7 No coverage uploaded for pull request base (main@9fa6bdb). Click here to learn what that means.
The diff coverage is 20.75%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #16957   +/-   ##
=======================================
  Coverage        ?   45.14%           
=======================================
  Files           ?      764           
  Lines           ?    86282           
  Branches        ?        0           
=======================================
  Hits            ?    38956           
  Misses          ?    41020           
  Partials        ?     6306           
Impacted Files Coverage Δ
modules/setting/repository.go 58.49% <ø> (ø)
routers/api/v1/repo/migrate.go 44.17% <0.00%> (ø)
routers/api/v1/repo/mirror.go 0.00% <0.00%> (ø)
services/mirror/mirror.go 14.75% <0.00%> (ø)
modules/setting/mirror.go 6.66% <6.66%> (ø)
routers/web/repo/setting.go 14.36% <15.38%> (ø)
routers/web/repo/migrate.go 36.25% <62.50%> (ø)
modules/setting/setting.go 50.38% <100.00%> (ø)
routers/api/v1/settings/settings.go 100.00% <100.00%> (ø)
routers/web/org/home.go 60.39% <100.00%> (ø)

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 9fa6bdb...4d97128. Read the comment docs.

modules/setting/mirror.go Outdated Show resolved Hide resolved
@zeripath
Copy link
Contributor

@zeripath zeripath commented Sep 5, 2021

Please put better explanations as to what the PR is supposed to be doing in the first comment of the PR.

@zeripath
Copy link
Contributor

@zeripath zeripath commented Sep 5, 2021

minor nits only.

@6543 6543 force-pushed the only-push-mirror branch from 41b966c to 00db6ff Sep 5, 2021
@6543
Copy link
Member Author

@6543 6543 commented Sep 5, 2021

Please put better explanations as to what the PR is supposed to be doing in the first comment of the PR.

@zeripath
thanks for the pull info update - I dont think we have to squash thing and alter commit desc. since this should be done on merge ;)

models/repo_pushmirror.go Outdated Show resolved Hide resolved
modules/setting/mirror.go Outdated Show resolved Hide resolved
modules/setting/mirror.go Outdated Show resolved Hide resolved
@6543
Copy link
Member Author

@6543 6543 commented Sep 6, 2021

Ref: #11740

@6543
Copy link
Member Author

@6543 6543 commented Sep 6, 2021

resolve #11740 (comment) too ...

delvh
delvh approved these changes Sep 6, 2021
Copy link
Contributor

@delvh delvh left a comment

Apart from some minor documentation flaws pretty good.

docs/content/doc/advanced/config-cheat-sheet.en-us.md Outdated Show resolved Hide resolved
routers/api/v1/repo/migrate.go Outdated Show resolved Hide resolved
routers/api/v1/repo/mirror.go Outdated Show resolved Hide resolved
docs/content/doc/advanced/config-cheat-sheet.en-us.md Outdated Show resolved Hide resolved
modules/setting/mirror.go Outdated Show resolved Hide resolved
modules/setting/mirror.go Show resolved Hide resolved
custom/conf/app.example.ini Outdated Show resolved Hide resolved
custom/conf/app.example.ini Outdated Show resolved Hide resolved
modules/setting/mirror.go Show resolved Hide resolved
routers/api/v1/repo/mirror.go Outdated Show resolved Hide resolved
lunny
lunny approved these changes Sep 7, 2021
@6543 6543 merged commit 63d7cbc into go-gitea:main Sep 7, 2021
2 checks passed
@6543 6543 deleted the only-push-mirror branch Sep 7, 2021
@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.
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants