Skip to content

OAK-12219-Upgrade Azure SDK V8 to V12 for oak-blob-azure - rework (#2…#2982

Open
reschke wants to merge 1 commit into
trunkfrom
OAK-12219-test
Open

OAK-12219-Upgrade Azure SDK V8 to V12 for oak-blob-azure - rework (#2…#2982
reschke wants to merge 1 commit into
trunkfrom
OAK-12219-test

Conversation

@reschke

@reschke reschke commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

…941)

Ai-Assisted-By: claude

EDIT: please ignore the osgi-it changes, I started with the wrong commit.

EDIT2: who can review this from an OSGi point of view?

@github-actions

Copy link
Copy Markdown

Commit-Check ❌

Commit rejected by Commit-Check.                                  
                                                                  
  (c).-.(c)    (c).-.(c)    (c).-.(c)    (c).-.(c)    (c).-.(c)  
   / ._. \      / ._. \      / ._. \      / ._. \      / ._. \   
 __\( C )/__  __\( H )/__  __\( E )/__  __\( C )/__  __\( K )/__ 
(_.-/'-'\-._)(_.-/'-'\-._)(_.-/'-'\-._)(_.-/'-'\-._)(_.-/'-'\-._)
   || E ||      || R ||      || R ||      || O ||      || R ||   
 _.' '-' '._  _.' '-' '._  _.' '-' '._  _.' '-' '._  _.' '-' '._ 
(.-./`-´\.-.)(.-./`-´\.-.)(.-./`-´\.-.)(.-./`-´\.-.)(.-./`-´\.-.)
 `-´     `-´  `-´     `-´  `-´     `-´  `-´     `-´  `-´     `-´ 
                                                                  
Commit rejected.                                                  
                                                                  
Type message check failed ==> OAK-12219-Upgrade Azure SDK V8 to V12 for oak-blob-azure - rework (#2941)

Ai-Assisted-By: claude 
The commit message should follow Conventional Commits. See https://www.conventionalcommits.org
Suggest: Commit message does not match the required pattern

*/
static boolean getUseV12Value(Map<String, Object> config) {
if (System.getProperty(JVM_PROPERTY_V12_ENABLED) != null) {
boolean useV12 = Boolean.getBoolean(JVM_PROPERTY_V12_ENABLED);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

use SystemPropertyProvider

@reschke

reschke commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Q: the default is still V8?

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
66.6% Coverage on New Code (required ≥ 80%)
3.7% Duplication on New Code (required ≤ 3%)
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@joerghoh joerghoh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

a series of questions and suggestions. Nothing really critical, but worth to review.

if (StringUtils.isNotBlank(customBlobEndpoint)) {
// Use custom endpoint (e.g., for private endpoints)
// Ensure it starts with https:// if not already present
if (!customBlobEndpoint.startsWith("http://") && !customBlobEndpoint.startsWith("https://")) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wouldn't this allow also a http (non-encypted) url to be created?

.retryOptions(retryOptions)
.addPolicy(loggingPolicy);

HttpClient httpClient = new NettyAsyncHttpClientBuilder()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is the overhead of creating this httpClient? Is this httpClient designed to be reused (like the Apache HttpClient?)

String proxyHost = properties.getProperty(AzureConstantsV12.PROXY_HOST);
String proxyPort = properties.getProperty(AzureConstantsV12.PROXY_PORT);

if (!(Objects.toString(proxyHost, "").isEmpty() || Objects.toString(proxyPort, "").isEmpty())) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that the logic is wrong; it should be AND instead of OR.


private static final Logger log = LoggerFactory.getLogger(AzureDataStoreWrapper.class);

public static final String NAME = "org.apache.jackrabbit.oak.plugins.blob.datastore.AzureDataStore";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there any special reason not to use the full qualified class name?

(just found the answer to this in a comment below; you should move that comment here.)

private StatisticsProvider statisticsProvider;
private ServiceRegistration<?> delegateReg;

static ServiceRegistration<?> registerService(ComponentContext context, AbstractSharedCachingDataStore service) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The method name is a bit too generic.

Suggested change
static ServiceRegistration<?> registerService(ComponentContext context, AbstractSharedCachingDataStore service) {
static ServiceRegistration<?> registerDataStoreService(ComponentContext context, AbstractSharedCachingDataStore service) {

log.info("Azure SDK v12 flag: OSGi config {}={}", OSGI_CONFIG_V12_ENABLED, useV12);
return useV12;
}
log.info("Azure SDK v12 flag: not configured, using default (false)");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
log.info("Azure SDK v12 flag: not configured, using default (false)");
log.info("Azure SDK v12 flag: not configured, falling back to v8 ");


@Override
protected String[] getDescription() {
return new String[]{"type=AzureBlob"};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is used in the context of the mbeans, is it visible there as well, what SDK version is active?

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

Successfully merging this pull request may close these issues.

3 participants