Skip to content

Conversation

@lunny
Copy link
Member

@lunny lunny commented Aug 11, 2022

This PR also introduce generics syntax of Go1.18 and merged many iterate functions as one.
Fix #20566

@lunny lunny added type/enhancement An improvement of existing functionality backport/v1.17 labels Aug 11, 2022
@lunny lunny added this to the 1.18.0 milestone Aug 11, 2022
@lunny lunny requested review from 6543, KN4CK3R and wxiaoguang August 11, 2022 02:05
Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

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

The space => tab change looks strange to me (is it required by the new linter?)

Otherwise LGTM except the question below.

Already updated, LGTM again.

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Aug 11, 2022
@lunny lunny force-pushed the lunny/migrate_more_storages branch from a44c8f1 to e283d58 Compare August 11, 2022 02:22
@lunny lunny added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Aug 11, 2022
@KN4CK3R
Copy link
Member

KN4CK3R commented Aug 11, 2022

Please update this too and the docs if there any:

	Flags: []cli.Flag{
		cli.StringFlag{
			Name:  "type, t",
			Value: "",
			Usage: "Kinds of files to migrate, currently only 'attachments' is supported",
		},

@lunny
Copy link
Member Author

lunny commented Aug 11, 2022

@wxiaoguang test added.
@KN4CK3R All done. And find there is a tmp directory under package storage directory. It maybe not suitable. An OS tmp directory or a Gitea global special tmp directory maybe better.

@KN4CK3R
Copy link
Member

KN4CK3R commented Aug 11, 2022

That's automaticaly added:

if config.TemporaryPath == "" {
config.TemporaryPath = config.Path + "/tmp"
}

@codecov-commenter
Copy link

codecov-commenter commented Aug 11, 2022

Codecov Report

Merging #20757 (233e02d) into main (86c85c1) will increase coverage by 0.01%.
The diff coverage is 15.87%.

@@            Coverage Diff             @@
##             main   #20757      +/-   ##
==========================================
+ Coverage   47.03%   47.04%   +0.01%     
==========================================
  Files         987      988       +1     
  Lines      136398   136352      -46     
==========================================
- Hits        64154    64151       -3     
+ Misses      64361    64318      -43     
  Partials     7883     7883              
Impacted Files Coverage Δ
models/db/iterate.go 0.00% <0.00%> (ø)
models/git/lfs.go 25.90% <ø> (+2.53%) ⬆️
models/repo/attachment.go 53.38% <ø> (+6.72%) ⬆️
models/repo/repo_list.go 78.80% <ø> (+3.13%) ⬆️
models/user/search.go 87.83% <ø> (+16.40%) ⬆️
routers/private/mail.go 0.00% <0.00%> (ø)
services/repository/avatar.go 36.00% <0.00%> (ø)
cmd/migrate_storage.go 5.76% <15.38%> (+5.76%) ⬆️
modules/packages/content_store.go 100.00% <100.00%> (ø)
modules/process/manager_exec.go 86.04% <0.00%> (-6.98%) ⬇️
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@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 14, 2022
@lunny
Copy link
Member Author

lunny commented Aug 16, 2022

make L-G-T-M work.

@lunny lunny merged commit 1f14609 into go-gitea:main Aug 16, 2022
@lunny lunny deleted the lunny/migrate_more_storages branch August 16, 2022 04:05
lunny added a commit to lunny/gitea that referenced this pull request Aug 16, 2022
go-gitea#20757)

* Add migrate repo archiver and packages storage support on command line

* Fix typo

* Use stdCtx

* Use packageblob and fix command description

* Add migrate packages unit tests

* Fix comment year

* Fix the migrate storage command line description

* Update cmd/migrate_storage.go

Co-authored-by: zeripath <[email protected]>

* Update cmd/migrate_storage.go

Co-authored-by: zeripath <[email protected]>

* Update cmd/migrate_storage.go

Co-authored-by: zeripath <[email protected]>

* Fix test

Co-authored-by: 6543 <[email protected]>
Co-authored-by: zeripath <[email protected]>
@lunny lunny added the backport/done All backports for this PR have been created label Aug 16, 2022
zjjhot added a commit to zjjhot/gitea that referenced this pull request Aug 16, 2022
* giteaofficial/main:
  auth/reverseproxy: Add support for full name (go-gitea#20776)
  Add migrate repo archiver and packages storage support on command line (go-gitea#20757)
  Refactor AssertExistsAndLoadBean to use generics (go-gitea#20797)
  [skip ci] Updated translations via Crowdin
  Fix the commit diff route (go-gitea#20796)
  Fix push mirror address backend get error Address cause setting page display error (go-gitea#20593)
lunny added a commit that referenced this pull request Aug 18, 2022
#20757) (#20806)

* Add migrate repo archiver and packages storage support on command line (#20757)

* Add migrate repo archiver and packages storage support on command line

* Fix typo

* Use stdCtx

* Use packageblob and fix command description

* Add migrate packages unit tests

* Fix comment year

* Fix the migrate storage command line description

* Update cmd/migrate_storage.go

Co-authored-by: zeripath <[email protected]>

* Update cmd/migrate_storage.go

Co-authored-by: zeripath <[email protected]>

* Update cmd/migrate_storage.go

Co-authored-by: zeripath <[email protected]>

* Fix test

Co-authored-by: 6543 <[email protected]>
Co-authored-by: zeripath <[email protected]>

* bug fix

Co-authored-by: 6543 <[email protected]>
Co-authored-by: zeripath <[email protected]>
vsysoev pushed a commit to IntegraSDL/gitea that referenced this pull request Aug 28, 2022
go-gitea#20757)

* Add migrate repo archiver and packages storage support on command line

* Fix typo

* Use stdCtx

* Use packageblob and fix command description

* Add migrate packages unit tests

* Fix comment year

* Fix the migrate storage command line description

* Update cmd/migrate_storage.go

Co-authored-by: zeripath <[email protected]>

* Update cmd/migrate_storage.go

Co-authored-by: zeripath <[email protected]>

* Update cmd/migrate_storage.go

Co-authored-by: zeripath <[email protected]>

* Fix test

Co-authored-by: 6543 <[email protected]>
Co-authored-by: zeripath <[email protected]>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/done All backports for this PR have been created 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/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate packages storage from local to minio and viceversa

7 participants