jelmini commented on code in PR #510:
URL: https://github.com/apache/jackrabbit-oak/pull/510#discussion_r841846442
##########
oak-upgrade/src/main/java/org/apache/jackrabbit/oak/upgrade/cli/node/SegmentAzureFactory.java:
##########
@@ -143,11 +159,16 @@ private AzurePersistence createAzurePersistence() throws
StorageException, URISy
CloudBlobDirectory cloudBlobDirectory = null;
if (accountName != null && uri != null) {
- String key = System.getenv("AZURE_SECRET_KEY");
- StorageCredentials credentials = new
StorageCredentialsAccountAndKey(accountName, key);
+ StorageCredentials credentials;
+ if (!StringUtils.isBlank(sasToken)) {
+ credentials = new
StorageCredentialsSharedAccessSignature(sasToken);
+ } else {
+ String key = System.getenv("AZURE_SECRET_KEY");
+ credentials = new StorageCredentialsAccountAndKey(accountName,
key);
+ }
cloudBlobDirectory =
AzureUtilities.cloudBlobDirectoryFrom(credentials, uri, dir);
Review Comment:
Shouldn't we call `AzureUtilities.cloudBlobDirectoryFrom(credentials, uri,
dir, skipCreateContainer)` here as well? If credentials of type
`StorageCredentialsSharedAccessSignature` are used, then the container creation
may need to be skipped.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]