Skip to content

Conversation

@zeripath
Copy link
Contributor

This PR represents a continuation of some work on #12813.

It provides for a self-registering storage solution and means that we can (mostly) avoid changing code outside of modules/storage if we add a storage system.

I think there is an extension to this to do with the default mapping and further improvements to do with default settings but this gives the first steps for this.

Signed-off-by: Andrew Thornton [email protected]

@zeripath zeripath added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Sep 29, 2020
@codecov-commenter
Copy link

codecov-commenter commented Sep 29, 2020

Codecov Report

Merging #12978 into master will decrease coverage by 0.00%.
The diff coverage is 46.92%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12978      +/-   ##
==========================================
- Coverage   42.62%   42.61%   -0.01%     
==========================================
  Files         672      673       +1     
  Lines       73785    73797      +12     
==========================================
+ Hits        31448    31452       +4     
+ Misses      37247    37244       -3     
- Partials     5090     5101      +11     
Impacted Files Coverage Δ
cmd/migrate_storage.go 0.00% <0.00%> (ø)
models/unit_tests.go 73.83% <ø> (-0.49%) ⬇️
modules/setting/setting.go 47.50% <ø> (-0.12%) ⬇️
modules/storage/minio.go 2.04% <13.33%> (+2.04%) ⬆️
modules/storage/local.go 39.62% <50.00%> (+1.52%) ⬆️
modules/storage/storage.go 46.87% <50.00%> (+8.41%) ⬆️
modules/storage/helper.go 54.54% <54.54%> (ø)
modules/setting/storage.go 72.97% <71.42%> (+29.49%) ⬆️
modules/setting/attachment.go 100.00% <100.00%> (+35.71%) ⬆️
modules/setting/lfs.go 43.90% <100.00%> (-1.10%) ⬇️
... and 12 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 5e1c51c...f572e2f. 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 29, 2020
@zeripath zeripath requested a review from lunny September 30, 2020 17:21
Signed-off-by: Andrew Thornton <[email protected]>
@zeripath zeripath force-pushed the lunny/storage_config-self-register branch from 6d908b3 to 7f2f6fe Compare September 30, 2020 18:07
@zeripath zeripath added this to the 1.13.0 milestone Oct 1, 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 Oct 5, 2020
@lafriks
Copy link
Member

lafriks commented Oct 5, 2020

Please resolve conflicts ;)

@zeripath
Copy link
Contributor Author

zeripath commented Oct 5, 2020

conflicts resolved

@lafriks
Copy link
Member

lafriks commented Oct 10, 2020

@lunny please review

@codecov-io
Copy link

codecov-io commented Oct 11, 2020

Codecov Report

Merging #12978 into master will increase coverage by 0.10%.
The diff coverage is 46.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12978      +/-   ##
==========================================
+ Coverage   42.25%   42.35%   +0.10%     
==========================================
  Files         675      676       +1     
  Lines       74520    74532      +12     
==========================================
+ Hits        31485    31569      +84     
+ Misses      37922    37826      -96     
- Partials     5113     5137      +24     
Impacted Files Coverage Δ
cmd/migrate_storage.go 0.00% <0.00%> (ø)
models/migrations/migrations.go 2.44% <0.00%> (ø)
models/unit_tests.go 73.83% <ø> (-0.49%) ⬇️
modules/setting/setting.go 46.13% <ø> (-0.11%) ⬇️
modules/storage/minio.go 2.04% <13.33%> (+2.04%) ⬆️
modules/context/api.go 75.22% <50.00%> (ø)
modules/storage/local.go 39.62% <50.00%> (+1.52%) ⬆️
modules/storage/storage.go 46.87% <50.00%> (+8.41%) ⬆️
modules/storage/helper.go 54.54% <54.54%> (ø)
modules/setting/storage.go 72.97% <71.42%> (+29.49%) ⬆️
... and 19 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 ade9c8d...696b9b6. Read the comment docs.

@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 Oct 12, 2020
@6543
Copy link
Member

6543 commented Oct 13, 2020

failed unrelated

@techknowlogick techknowlogick merged commit 6b1266b into go-gitea:master Oct 13, 2020
@techknowlogick techknowlogick added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Oct 13, 2020
@zeripath zeripath deleted the lunny/storage_config-self-register branch October 13, 2020 06:08
@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. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/refactoring Existing code has been cleaned up. There should be no new functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants