-
Notifications
You must be signed in to change notification settings - Fork 101
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
Upgrade ABS client Go module to azure-sdk-for-go/sdk/storage/azblob
#751
Conversation
/assign |
/assign |
Thanks for your review @ishan16696! Will let you know once the other PRs get merged and I resolve the conflicts. |
…or-go` * Elimiated usage of the old `Azure/azure-storage-blob-go` in `pkg/snapstore/abs_snapstore.go`. * Used functionality provided by `Azure/azure-sdk-for-go` in `pkg/snapstore/abs_snapstore.go`. * Methods on `ABSSnapStore` work as intended after the change. Unit tests refactored for the new SDK. `abs_snapstore_test.go` cleanup. Ran `go mod tidy`, `go mod vendor` Address review comments from @anveshreddy18. Address review comments from @ishan16696 1. * Remove variable names from interface type definitions * Make use of `streaming.NopCloser()` to create a no-op `Close()` for a `ReadSeekCloser`, instead of redefining the type. * Fix typo pointed out by @anveshreddy18 Address review comments from @ishan16696 2. * Nit change: change `context.TODO()` to `context.Background()`. Rebased on PR 759.
type fakeABSContainerClient struct { | ||
objects map[string]*[]byte | ||
prefix string | ||
mutex sync.Mutex | ||
// a map of blobClients so new clients created to a particular blob refer to the same blob | ||
blobClients map[string]*fakeBlockBlobClient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want to mock the AzureBlockBlob Client ?
//go:generate mockgen -package <name> -destination=mocks.go github.com/gardener/etcd-backup-restore/pkg/snapstore/ AzureBlockBlobClientI
you can take a look at this package:
//go:generate mockgen -package client -destination=mocks.go github.com/gardener/etcd-backup-restore/pkg/etcdutil/client Factory,ClusterCloser,KVCloser,MaintenanceCloser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will leave this to another PR. Will create an issue to track this later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you create an issue for it and mentioned it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've created an issue to track this. #772.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all changes. LGTM!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What this PR does / why we need it:
Upgrades the client Go modules for ABS to
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob
from the deprecatedgithub.com/Azure/azure-storage-blob-go
Which issue(s) this PR fixes:
Fixes #745
Release note: