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

blob/azblob: Migrate to new SDK module #3141

Closed
marwan-at-work opened this issue Jul 1, 2022 · 10 comments
Closed

blob/azblob: Migrate to new SDK module #3141

marwan-at-work opened this issue Jul 1, 2022 · 10 comments

Comments

@marwan-at-work
Copy link

Is your feature request related to a problem? Please describe.

According to the README, the Azure Blob Storage SDK has moved to a new place here.

Describe the solution you'd like

It would be great if go-cloud migrated to the new SDK so that it's up to date.

The only thing that might be worth considering is that it's a bit of a breaking change for people who use bucket.As and pass in the old library's types.

@vangent
Copy link
Contributor

vangent commented Jul 1, 2022

I've been trying to upgrade to the new SDK for pubsub (#3084) but have been blocked on Azure/azure-sdk-for-go#17472 (comment). Basically, the new Azure packages only work with Go 1.18+, and go-cloud has committed to compatibility for the 2 latest Go versions (which includes Go 1.17 right now).

@vangent
Copy link
Contributor

vangent commented Jul 1, 2022

And yes, it will be a breaking change. Sadly there is no way to avoid that when the underlying provider makes breaking changes :-(.

@marwan-at-work
Copy link
Author

I think the good news is that Go 1.19 is already in beta so that should be okay when it GAs? I wonder whether it's worth getting the upgrade started in the master branch and not cut a release until 1.19.

And yes, it will be a breaking change. Sadly there is no way to avoid that when the underlying provider makes breaking changes :-(.

I'm curious whether Go Cloud should tag a non-major version and mention this change in the release notes or if it would warrant a major version upgrade on gocloud. I'd be happy either way.

Also, thank you for staying on top of those changes!

@vangent
Copy link
Contributor

vangent commented Jul 1, 2022

Yes, looks like 1.19 should be out in August.

I usually just note breaking changes in the release notes.

@vangent
Copy link
Contributor

vangent commented Aug 6, 2022

#3156 if you have any feedback.

@vangent
Copy link
Contributor

vangent commented Aug 6, 2022

@xaxa06
@toddself
@stanhu
@chrismellard
@Strife96

FYI previous contributors to this package. I'm planning to update it in a non-backwards-compatible way soon, to update to the new Azure Blob Storage SDK. Sadly given the underlying backwards-incompatible change, I don't think there's a way to avoid it. (I could add a second copy of the package, e.g., azureblob2, but I don't want to maintain two, and I think that "please use v0.26.0 if you want the old Azure library" is morally equivalent.

The proposed change is in #3156.

Obviously the underlying Azure clients etc. have changed, so the As functionality is not backwards compatible. As near as I can tell, once you have a blob.Bucket, other than As, the functionality is the same as before. This is all well-tested by the drivertest suite. The construction of a bucket has changed though (e.g., OpenBucket). I've tried to keep the same environment variables and URL parameters, and I think they should largely work as before, but this is harder for me to test so if any of you are still using this package I'd appreciate some verification.

Other feedback is also welcome.

@xaxa06
Copy link
Contributor

xaxa06 commented Aug 9, 2022

Thanks for the heads up and for that migration/upgrade that looks promising! I will try to test it on my end in the coming days when time permits and let you know how this goes. For the practicality of what's the best way to proceed to upgrade our gocloud to your branch from an existing project while this is still at pull request stage, would you have any particular advice? (I was reading at https://go.dev/ref/mod#pseudo-versions but haven't found any way so far to just "go get" the existing deps from a commit hash which isn't yet merged, so I'm suspecting there's probably a better way...)

@vangent
Copy link
Contributor

vangent commented Aug 9, 2022

@xaxa06 I'm waiting for feedback, but if I don't hear anything I'm likely going to submit it relatively soon, so it's probably easiest to just wait for that.

@toddself
Copy link
Contributor

toddself commented Aug 9, 2022

hi i no longer work at github, @marwan-at-work do you know if the packages team needs to do anything here?

@vangent
Copy link
Contributor

vangent commented Aug 10, 2022

Fixed by #3156.

@vangent vangent closed this as completed Aug 10, 2022
gitlab-runner-bot pushed a commit to gitlabhq/gitlab-runner that referenced this issue Nov 9, 2022
This upgrade will require Go 1.18+: google/go-cloud#3141.

Per https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/storage/azblob#readme,
the new Azure SDK is now `github.com/Azure/azure-sdk-for-go/sdk/storage/azblob`.
The migration in google/go-cloud#3156 also had
a number of breaking API changes.

This commit has been validated to work with Azure Blob Storage.
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

No branches or pull requests

4 participants