Conversation
manishrjain
left a comment
There was a problem hiding this comment.
LGTM. Get someone from the team to approve.
Reviewed 2 of 7 files at r1, 4 of 5 files at r2, 1 of 1 files at r3.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @martinmr)
ee/backup/s3_handler.go, line 297 at r1 (raw file):
} } if len(manifests) == 0 {
The code from here onwards, looks the same as the code in files. You can refactor this common code out, so the main caller function would do this logic, and use the handlers just to retrieve the manifests.
martinmr
left a comment
There was a problem hiding this comment.
Reviewable status: 3 of 7 files reviewed, 2 unresolved discussions (waiting on @manishrjain and @martinmr)
ee/backup/s3_handler.go, line 297 at r1 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
The code from here onwards, looks the same as the code in files. You can refactor this common code out, so the main caller function would do this logic, and use the handlers just to retrieve the manifests.
Done.
codexnull
left a comment
There was a problem hiding this comment.
Reviewed 2 of 7 files at r1, 1 of 5 files at r2, 4 of 4 files at r4.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @manishrjain and @martinmr)
ee/backup/backup.go, line 94 at r4 (raw file):
FileName string }
Did you consider embedding the Manifest struct? I.e.
type ManifestFile struct {
Manifest
FileName string
}
Then you can do manifest.FileName and manifest.Version instead of manifest.Manifest.Version.
ee/backup/file_handler.go, line 180 at r4 (raw file):
func (h *fileHandler) ReadManifest(path string, m *Manifest) error { return h.readManifest(path, m)
Is there a reason for not exporting readManifest() instead?
ee/backup/run.go, line 126 at r4 (raw file):
Source URI formats: [scheme]://[host]/[path]?[args] [scheme]:///[path]?[args]
Can the scheme with a '///' URI be anything other than "file"?
martinmr
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @codexnull, @golangcibot, and @manishrjain)
ee/backup/backup.go, line 94 at r4 (raw file):
Previously, codexnull (Javier Alvarado) wrote…
Did you consider embedding the Manifest struct? I.e.
type ManifestFile struct { Manifest FileName string }Then you can do
manifest.FileNameandmanifest.Versioninstead ofmanifest.Manifest.Version.
Done. I didn't know you could do that.
ee/backup/file_handler.go, line 180 at r4 (raw file):
Previously, codexnull (Javier Alvarado) wrote…
Is there a reason for not exporting readManifest() instead?
readManifest takes different arguments in the s3 handler.
ee/backup/handler.go, line 172 at r2 (raw file):
Previously, golangcibot (Bot from GolangCI) wrote…
File is not
goimports-ed (fromgoimports)
Done.
ee/backup/run.go, line 126 at r4 (raw file):
Previously, codexnull (Javier Alvarado) wrote…
Can the scheme with a '///' URI be anything other than "file"?
Not so far but that might change in the future.
This change is