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 the type/enhancement An improvement of existing functionality label Sep 5, 2021
@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 pull request Sep 5, 2021
@codecov-commenter
Copy link

codecov-commenter commented Sep 5, 2021

Codecov Report

❗ 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.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 5, 2021
modules/setting/mirror.go Outdated Show resolved Hide resolved
@zeripath
Copy link
Contributor

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 commented Sep 5, 2021

minor nits only.

@6543
Copy link
Member Author

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 ;)

@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 Sep 5, 2021
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 commented Sep 6, 2021

Ref: #11740

@6543
Copy link
Member Author

6543 commented Sep 6, 2021

resolve #11740 (comment) too ...

Copy link
Member

@delvh delvh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@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 Sep 7, 2021
@6543 6543 merged commit 63d7cbc into go-gitea:main Sep 7, 2021
@6543 6543 deleted the only-push-mirror branch September 7, 2021 15:49
@zeripath zeripath added the type/changelog Adds the changelog for a new Gitea version label Sep 7, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
@delvh delvh removed the type/changelog Adds the changelog for a new Gitea version label Oct 7, 2023
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/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants