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

Migrate: pick latest instead of oldest snapshot with --latest-only #1420

Merged
merged 1 commit into from
Oct 19, 2021

Conversation

bob1de
Copy link
Contributor

@bob1de bob1de commented Oct 19, 2021

Fix #1414

@bob1de
Copy link
Contributor Author

bob1de commented Oct 19, 2021

I've got zero experience with golang, but this should be simple enough I guess...

@codecov
Copy link

codecov bot commented Oct 19, 2021

Codecov Report

Merging #1420 (0cba114) into master (789a739) will increase coverage by 0.02%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1420      +/-   ##
==========================================
+ Coverage   68.33%   68.35%   +0.02%     
==========================================
  Files         366      366              
  Lines       28862    28862              
==========================================
+ Hits        19722    19728       +6     
+ Misses       7492     7489       -3     
+ Partials     1648     1645       -3     
Impacted Files Coverage Δ
cli/command_snapshot_migrate.go 52.70% <0.00%> (ø)
repo/grpc_repository_client.go 77.67% <0.00%> (-0.72%) ⬇️
internal/epoch/epoch_manager.go 84.09% <0.00%> (-0.57%) ⬇️
repo/blob/sharded/sharded.go 86.70% <0.00%> (+1.89%) ⬆️
repo/blob/filesystem/filesystem_storage.go 66.31% <0.00%> (+2.13%) ⬆️
internal/cache/persistent_lru_cache.go 82.27% <0.00%> (+3.79%) ⬆️

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 789a739...0cba114. Read the comment docs.

@jkowalski
Copy link
Contributor

jkowalski commented Oct 19, 2021

golang requires particular canonical file formatting, in particular len(s)-1 without spaces. I'm guessing you did not use gofmt to format the file after changing.

In any case I recommend using some proper code editor which formats automatically - Visual Studio Code is very good and magically does all of this.

@bob1de
Copy link
Contributor Author

bob1de commented Oct 19, 2021

Alright, using gofmt now.

@jkowalski
Copy link
Contributor

We should also add a test, but if you're not up for it (which I totally understand), I'll just add it myself.

@bob1de
Copy link
Contributor Author

bob1de commented Oct 19, 2021

Yes, would be great if you did it. Thanks very much.

@jkowalski jkowalski merged commit 3e43f8e into kopia:master Oct 19, 2021
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.

Snapshot migrate --latest-only migrates oldest instead of latest snapshot
2 participants