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

Helpers for supporting kando location push and pull using Kopia #944

Merged
merged 12 commits into from
Apr 7, 2021

Conversation

pavannd1
Copy link
Contributor

@pavannd1 pavannd1 commented Apr 2, 2021

Change Overview

  • Utility function to find the kopia repo object ID of the backed up stream
  • Helpers to create kopia snapshot and read a snapshot
  • Kando location push and pull functions with kopia

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Issues

  • #XXX

Test Plan

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

@pavannd1 pavannd1 requested a review from PrasadG193 April 2, 2021 03:29
pkg/kando/location_push.go Outdated Show resolved Hide resolved
@pavannd1 pavannd1 changed the base branch from refactor1 to master April 4, 2021 20:49
@@ -44,6 +50,9 @@ const (
// tlsCertificateKey represents the key used to fetch the certificate
// from the secret.
tlsCertificateKey = "tls.crt"

// BackupIdentifierKey is the artifact key used for kopia snapshot ID
BackupIdentifierKey = "backupID"
Copy link
Contributor

Choose a reason for hiding this comment

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

probably should use --backup-id flag

@PrasadG193
Copy link
Contributor

I've also observed that kando location pull with kopia doesn't work if we pass absolute path as a target. We can fix that in the followups

@PrasadG193
Copy link
Contributor

Failing due to lint checks

Status: Downloaded newer image for ghcr.io/kanisterio/build:v0.0.12
Running golangci-lint...
pkg/kando/location_pull.go:47:6: `backupIDFlag` is unused (deadcode)
func backupIDFlag(cmd *cobra.Command) string {
     ^
pkg/kando/location_pull.go:77:6: `kopiaLocationPull` is unused (deadcode)
func kopiaLocationPull(ctx context.Context, backupID, path string, target io.Writer) error {
     ^
pkg/kando/location_push.go:79:6: `kopiaLocationPush` is unused (deadcode)
func kopiaLocationPush(ctx context.Context, path string, source io.Reader) error {
     ^

We can add exceptions for now

pkg/kando/location_pull.go Show resolved Hide resolved
pkg/kando/location_pull.go Show resolved Hide resolved
pkg/kando/location_push.go Show resolved Hide resolved
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
pkg/kando/location_pull.go Outdated Show resolved Hide resolved
pkg/kando/location_pull.go Outdated Show resolved Hide resolved
pkg/kando/location_push.go Outdated Show resolved Hide resolved
@pavannd1 pavannd1 added the kueue label Apr 7, 2021
@mergify mergify bot merged commit 3a653ff into master Apr 7, 2021
@mergify mergify bot deleted the kopia_stdin_helpers branch April 7, 2021 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants