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

Upgrade Azure Blobstore from legacy azure-sdk (11.0) to latest (12.27.1) #1316

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

groldan
Copy link
Member

@groldan groldan commented Aug 29, 2024

Upgrade com.microsoft.azure:azure-storage-blob to com.azure:azure-storage-blob.

Add azure storage blob 12.27.1 dependencies and upgrade the azure blobstore.

Run Azurite-based integration tests against the latest Docker image version, remove legacy.

Migrate to com.azure:blobstorage:12.x. The upgrade tries to do a 1:1 migration to the new azure-sdk API (in its blocking falvour) as much as possible, so that the integration tests serve to avoid regressions.

A couple remarks:

  • There's no way to close the HTTPClient so AzureClient does not
    implement Closeable anymore.
  • Fix a bug in DeleteManager that always reported 0 objects deleted

This pull request complements geosolutions-it/imageio-ext#312 in the context of GeoServer having compatible transitive dependencies on azure-sdk and their netty dependencies.

@groldan groldan added the dependencies Pull requests that update a dependency file label Aug 29, 2024
@groldan groldan force-pushed the azureblob_upgrade_12.x branch from 2e8631f to 8e4059d Compare August 29, 2024 12:45
@groldan groldan changed the title Upgrade Azure Blobstore fromi legacy azure-sdk (11.0) to latest (12.27.0) Upgrade Azure Blobstore from legacy azure-sdk (11.0) to latest (12.27.0) Aug 29, 2024
@groldan groldan force-pushed the azureblob_upgrade_12.x branch from 8e4059d to 92808d5 Compare September 10, 2024 22:08
@groldan groldan marked this pull request as ready for review September 12, 2024 15:13
@groldan
Copy link
Member Author

groldan commented Sep 12, 2024

Please not the "Azure BlobStore Integration / Azure online" is failing cause my free account expired. I'm waiting for camptocamp to provision an account we can use. Meanwhile, feel free to run mvn verify -Ponline against your own account.

@groldan groldan requested a review from aaime September 12, 2024 15:15
@groldan groldan force-pushed the azureblob_upgrade_12.x branch from 92808d5 to 4de5a3d Compare September 12, 2024 15:30
@groldan groldan changed the title Upgrade Azure Blobstore from legacy azure-sdk (11.0) to latest (12.27.0) Upgrade Azure Blobstore from legacy azure-sdk (11.0) to latest (12.27.1) Sep 12, 2024
@petersmythe
Copy link
Contributor

@aaime I understand that you might not be in a position to review this PR. Is there someone else that you could ask, so that we can get it into GeoServer 2.26.0 by Wednesday (2 days time)?

@aaime
Copy link
Member

aaime commented Sep 16, 2024

I don't think there is anyone else with familiarity with this module. I'll try to review today.

…7.0)

Add azure storage blob 12.27.1 dependencies and upgrade the
azure blobstore.

Run Azurite-based integration tests against the latest Docker image
version, remove legacy.

Migrate to `com.azure:blobstorage:12.x`. The upgrade
tries to do a 1:1 migration to the new azure-sdk API (in its blocking
falvor) as much as possible, so that the integration tests serve to
avoid regressions.

A couple remarks:

* There's no way to close the HTTPClient so AzureClient does not
  implement Closeable anymore.
* Fix a bug in DeleteManager that always reported 0 objects deleted

Upgrade `com.microsoft.azure:azure-storage-blob` to
`com.azure:azure-storage-blob`.
@petersmythe
Copy link
Contributor

I don't think there is anyone else with familiarity with this module. I'll try to review today.

Thank you, could you let me know if it is approved, please @aaime so that I can continue with GeoTools 32.0 release.

@aaime
Copy link
Member

aaime commented Sep 17, 2024

I did not manage to review yesterday, too many PRs and I had to do two releases for imageio-ext and jai-ext. Too much ongoing stuff today too... hopefully I'll get to it tomorrow

Copy link
Member

@aaime aaime left a comment

Choose a reason for hiding this comment

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

It's basically ok, there are 3 comments that seem out of place, see below:

} catch (StorageException e) {
throw new RuntimeException("Failed to retrieve properties mappings", e);
}
// going big, retrieve all items, since at the end everything must be held in memory anyways
Copy link
Member

Choose a reason for hiding this comment

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

Looks like the new API does not have a limit to the number of blobs that are going to b retrieved, possibly because it's using streams. So the comment there does not make sense anymore, or does it?

@@ -137,6 +137,7 @@ public void setProxyPort(Integer proxyPort) {
this.proxyPort = proxyPort;
}

/** unused */
public String getProxyUsername() {
Copy link
Member

Choose a reason for hiding this comment

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

Actually used by AzureClient.getProxyOptions

@@ -145,6 +146,7 @@ public void setProxyUsername(String proxyUsername) {
this.proxyUsername = proxyUsername;
}

/** unused */
public String getProxyPassword() {
Copy link
Member

Choose a reason for hiding this comment

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

Actually used by AzureClient.getProxyOptions

@petersmythe
Copy link
Contributor

@groldan could you please address these 3 comment issues in another PR into main, as I am about to merge this one.

@aaime thank you very much for your time and input.

@petersmythe petersmythe merged commit ea0fd79 into main Sep 18, 2024
11 checks passed
@groldan groldan deleted the azureblob_upgrade_12.x branch September 18, 2024 13:14
petersmythe added a commit that referenced this pull request Sep 18, 2024
Upgrade Azure Blobstore from legacy azure-sdk (11.0) to latest (12.27.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants