Skip to content

Make mirror feature more configurable#16957

Merged
6543 merged 16 commits into
go-gitea:mainfrom
6543-forks:only-push-mirror
Sep 7, 2021
Merged

Make mirror feature more configurable#16957
6543 merged 16 commits into
go-gitea:mainfrom
6543-forks:only-push-mirror

Conversation

@6543
Copy link
Copy Markdown
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
Copy Markdown

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
Comment thread modules/setting/mirror.go Outdated
Comment thread templates/repo/settings/options.tmpl Outdated
@zeripath
Copy link
Copy Markdown
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.

Comment thread docs/content/doc/advanced/config-cheat-sheet.en-us.md Outdated
@zeripath
Copy link
Copy Markdown
Contributor

zeripath commented Sep 5, 2021

minor nits only.

@6543
Copy link
Copy Markdown
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
Comment thread models/repo_pushmirror.go Outdated
Comment thread modules/setting/mirror.go Outdated
Comment thread modules/setting/mirror.go Outdated
@6543
Copy link
Copy Markdown
Member Author

6543 commented Sep 6, 2021

Ref: #11740

Co-authored-by: zeripath <art27@cantab.net>
@6543
Copy link
Copy Markdown
Member Author

6543 commented Sep 6, 2021

resolve #11740 (comment) too ...

Copy link
Copy Markdown
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.

Comment thread docs/content/doc/advanced/config-cheat-sheet.en-us.md Outdated
Comment thread routers/api/v1/repo/migrate.go Outdated
Comment thread routers/api/v1/repo/mirror.go Outdated
Comment thread docs/content/doc/advanced/config-cheat-sheet.en-us.md Outdated
Comment thread modules/setting/mirror.go Outdated
Comment thread modules/setting/mirror.go
Comment thread custom/conf/app.example.ini Outdated
Comment thread custom/conf/app.example.ini Outdated
Comment thread modules/setting/mirror.go
Comment thread routers/api/v1/repo/mirror.go Outdated
@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 release/highlight Marks a PR as a highlight-worthy change for the release notes. label Sep 7, 2021
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
@delvh delvh removed the release/highlight Marks a PR as a highlight-worthy change for the release notes. 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