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

sync command support --links #1619

Merged
merged 14 commits into from
Mar 23, 2022
Merged

sync command support --links #1619

merged 14 commits into from
Mar 23, 2022

Conversation

zhijian-pro
Copy link
Contributor

Close #1588

@zhijian-pro zhijian-pro changed the title sync command support --link sync command support --links Mar 21, 2022
@zhijian-pro zhijian-pro marked this pull request as ready for review March 21, 2022 12:32
@zhijian-pro zhijian-pro requested a review from davies March 21, 2022 12:32
pkg/object/s3.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Mar 21, 2022

Codecov Report

Merging #1619 (17b9b38) into main (079ccf8) will increase coverage by 0.21%.
The diff coverage is 59.52%.

@@            Coverage Diff             @@
##             main    #1619      +/-   ##
==========================================
+ Coverage   61.27%   61.48%   +0.21%     
==========================================
  Files         133      133              
  Lines       22460    22552      +92     
==========================================
+ Hits        13762    13867     +105     
+ Misses       7137     7124      -13     
  Partials     1561     1561              
Impacted Files Coverage Δ
pkg/object/interface.go 80.00% <0.00%> (-20.00%) ⬇️
pkg/object/prefix.go 69.76% <0.00%> (-7.16%) ⬇️
pkg/sync/sync.go 39.73% <50.00%> (+2.28%) ⬆️
cmd/sync.go 66.80% <62.50%> (-0.15%) ⬇️
pkg/object/file.go 65.51% <64.86%> (+4.76%) ⬆️
pkg/object/hdfs.go 65.36% <100.00%> (+0.34%) ⬆️
pkg/object/mem.go 75.55% <100.00%> (+0.55%) ⬆️
pkg/object/object_storage.go 76.78% <100.00%> (+2.78%) ⬆️
pkg/object/sftp.go 57.33% <100.00%> (+1.51%) ⬆️
pkg/sync/config.go 100.00% <100.00%> (ø)
... and 16 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 079ccf8...17b9b38. Read the comment docs.

pkg/object/sftp.go Outdated Show resolved Hide resolved
@zhijian-pro zhijian-pro force-pushed the support_--links_for_sync branch from 388223a to 9a95c41 Compare March 21, 2022 15:18
pkg/object/file.go Outdated Show resolved Hide resolved
pkg/sync/sync.go Outdated Show resolved Hide resolved
@zhijian-pro zhijian-pro requested a review from davies March 22, 2022 10:02
pkg/object/file.go Outdated Show resolved Hide resolved
@zhijian-pro zhijian-pro force-pushed the support_--links_for_sync branch from 7a4d266 to 5797aa3 Compare March 23, 2022 03:45
@zhijian-pro zhijian-pro requested a review from davies March 23, 2022 09:28
@davies davies merged commit 556f815 into main Mar 23, 2022
@davies davies deleted the support_--links_for_sync branch March 23, 2022 11:56
if os.IsNotExist(err) {
logger.Warnf("skip not exist file or directory: %s", path)
return nil
}
listed <- nil
logger.Errorf("list %s: %s", path, err)
return err
return nil
Copy link
Contributor

Choose a reason for hiding this comment

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

why not return err?

Copy link
Contributor

Choose a reason for hiding this comment

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

if return nil , sync producer will quit loop, so here need return err to quit recursive walk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support --links for sync command
4 participants