Re: [PR] add service principal support while deleting container in oak-run-commons [jackrabbit-oak]

2024-06-24 Thread via GitHub


t-rana commented on code in PR #1542:
URL: https://github.com/apache/jackrabbit-oak/pull/1542#discussion_r1650371659


##
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/fixture/DataStoreUtils.java:
##
@@ -146,26 +150,52 @@ public static void deleteBucket(String bucket, 
Map map, Date date) th
 }
 
 public static void deleteAzureContainer(Map config, String 
containerName) throws Exception {
+if (config == null) {
+return;

Review Comment:
   thanks for pointing this out, changes done!



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] add service principal support while deleting container in oak-run-commons [jackrabbit-oak]

2024-06-23 Thread via GitHub


t-rana commented on code in PR #1542:
URL: https://github.com/apache/jackrabbit-oak/pull/1542#discussion_r1650374514


##
oak-run-commons/src/test/java/org/apache/jackrabbit/oak/fixture/DataStoreUtilsTest.java:
##
@@ -0,0 +1,259 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.oak.fixture;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.core.Appender;
+import ch.qos.logback.core.read.ListAppender;
+import com.microsoft.azure.storage.StorageException;
+import com.microsoft.azure.storage.blob.CloudBlobContainer;
+import com.microsoft.azure.storage.blob.SharedAccessBlobPermissions;
+import com.microsoft.azure.storage.blob.SharedAccessBlobPolicy;
+import org.apache.commons.lang3.StringUtils;
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzureBlobContainerProvider;
+import org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzureConstants;
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzuriteDockerRule;
+import org.jetbrains.annotations.NotNull;
+import org.junit.After;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.slf4j.LoggerFactory;
+
+import java.net.URISyntaxException;
+import java.security.InvalidKeyException;
+import java.time.Instant;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class DataStoreUtilsTest {
+@ClassRule
+public static AzuriteDockerRule azuriteDockerRule = new 
AzuriteDockerRule();
+
+private static final String AZURE_ACCOUNT_NAME = "AZURE_ACCOUNT_NAME";
+private static final String AZURE_TENANT_ID = "AZURE_TENANT_ID";
+private static final String AZURE_CLIENT_ID = "AZURE_CLIENT_ID";
+private static final String AZURE_CLIENT_SECRET = "AZURE_CLIENT_SECRET";
+private static final String AZURE_CONNECTION_STRING = 
"DefaultEndpointsProtocol=http;AccountName=%s;AccountKey=%s;BlobEndpoint=%s";
+private static final String CONTAINER_NAME = "oak-blob-test";
+private static final String AUTHENTICATE_VIA_AZURE_CONNECTION_STRING_LOG = 
"connecting to azure blob storage via azureConnectionString";
+private static final String AUTHENTICATE_VIA_ACCESS_KEY_LOG = "connecting 
to azure blob storage via access key";
+private static final String AUTHENTICATE_VIA_SERVICE_PRINCIPALS_LOG = 
"connecting to azure blob storage via service principal credentials";
+private static final String AUTHENTICATE_VIA_SAS_TOKEN_LOG = "connecting 
to azure blob storage via sas token";
+private static final String REFRESH_TOKEN_EXECUTOR_SHUTDOWN_LOG = "Refresh 
token executor service shutdown completed";
+private static final String CONTAINER_DOES_NOT_EXIST_MESSAGE = "container 
[%s] doesn't exists";
+private static final String CONTAINER_DELETED_MESSAGE = "container [%s] 
deleted";
+
+private CloudBlobContainer container;
+
+@Before
+public void init() throws URISyntaxException, InvalidKeyException, 
StorageException {
+container = azuriteDockerRule.getContainer(CONTAINER_NAME);
+}
+
+@After
+public void cleanup() throws StorageException {
+if (container != null) {
+container.deleteIfExists();
+}
+}
+
+@Test
+public void delete_non_existing_container_azure_connection_string() throws 
Exception {
+container.deleteIfExists();
+ListAppender logAppender = subscribeAppender();
+final String azureConnectionString = 
String.format(AZURE_CONNECTION_STRING, AzuriteDockerRule.ACCOUNT_NAME, 
AzuriteDockerRule.ACCOUNT_KEY, azuriteDockerRule.getBlobEndpoint());
+
+
DataStoreUtils.deleteAzureContainer(getConfigMap(azureConnectionString, null, 
null, null, null, null, null, null), CONTAINER_NAME);
+

Re: [PR] add service principal support while deleting container in oak-run-commons [jackrabbit-oak]

2024-06-23 Thread via GitHub


t-rana commented on code in PR #1542:
URL: https://github.com/apache/jackrabbit-oak/pull/1542#discussion_r1650374514


##
oak-run-commons/src/test/java/org/apache/jackrabbit/oak/fixture/DataStoreUtilsTest.java:
##
@@ -0,0 +1,259 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.oak.fixture;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.core.Appender;
+import ch.qos.logback.core.read.ListAppender;
+import com.microsoft.azure.storage.StorageException;
+import com.microsoft.azure.storage.blob.CloudBlobContainer;
+import com.microsoft.azure.storage.blob.SharedAccessBlobPermissions;
+import com.microsoft.azure.storage.blob.SharedAccessBlobPolicy;
+import org.apache.commons.lang3.StringUtils;
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzureBlobContainerProvider;
+import org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzureConstants;
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzuriteDockerRule;
+import org.jetbrains.annotations.NotNull;
+import org.junit.After;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.slf4j.LoggerFactory;
+
+import java.net.URISyntaxException;
+import java.security.InvalidKeyException;
+import java.time.Instant;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class DataStoreUtilsTest {
+@ClassRule
+public static AzuriteDockerRule azuriteDockerRule = new 
AzuriteDockerRule();
+
+private static final String AZURE_ACCOUNT_NAME = "AZURE_ACCOUNT_NAME";
+private static final String AZURE_TENANT_ID = "AZURE_TENANT_ID";
+private static final String AZURE_CLIENT_ID = "AZURE_CLIENT_ID";
+private static final String AZURE_CLIENT_SECRET = "AZURE_CLIENT_SECRET";
+private static final String AZURE_CONNECTION_STRING = 
"DefaultEndpointsProtocol=http;AccountName=%s;AccountKey=%s;BlobEndpoint=%s";
+private static final String CONTAINER_NAME = "oak-blob-test";
+private static final String AUTHENTICATE_VIA_AZURE_CONNECTION_STRING_LOG = 
"connecting to azure blob storage via azureConnectionString";
+private static final String AUTHENTICATE_VIA_ACCESS_KEY_LOG = "connecting 
to azure blob storage via access key";
+private static final String AUTHENTICATE_VIA_SERVICE_PRINCIPALS_LOG = 
"connecting to azure blob storage via service principal credentials";
+private static final String AUTHENTICATE_VIA_SAS_TOKEN_LOG = "connecting 
to azure blob storage via sas token";
+private static final String REFRESH_TOKEN_EXECUTOR_SHUTDOWN_LOG = "Refresh 
token executor service shutdown completed";
+private static final String CONTAINER_DOES_NOT_EXIST_MESSAGE = "container 
[%s] doesn't exists";
+private static final String CONTAINER_DELETED_MESSAGE = "container [%s] 
deleted";
+
+private CloudBlobContainer container;
+
+@Before
+public void init() throws URISyntaxException, InvalidKeyException, 
StorageException {
+container = azuriteDockerRule.getContainer(CONTAINER_NAME);
+}
+
+@After
+public void cleanup() throws StorageException {
+if (container != null) {
+container.deleteIfExists();
+}
+}
+
+@Test
+public void delete_non_existing_container_azure_connection_string() throws 
Exception {
+container.deleteIfExists();
+ListAppender logAppender = subscribeAppender();
+final String azureConnectionString = 
String.format(AZURE_CONNECTION_STRING, AzuriteDockerRule.ACCOUNT_NAME, 
AzuriteDockerRule.ACCOUNT_KEY, azuriteDockerRule.getBlobEndpoint());
+
+
DataStoreUtils.deleteAzureContainer(getConfigMap(azureConnectionString, null, 
null, null, null, null, null, null), CONTAINER_NAME);
+

Re: [PR] add service principal support while deleting container in oak-run-commons [jackrabbit-oak]

2024-06-23 Thread via GitHub


t-rana commented on code in PR #1542:
URL: https://github.com/apache/jackrabbit-oak/pull/1542#discussion_r1650372569


##
oak-run-commons/src/test/java/org/apache/jackrabbit/oak/fixture/DataStoreUtilsTest.java:
##
@@ -0,0 +1,259 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.oak.fixture;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.core.Appender;
+import ch.qos.logback.core.read.ListAppender;
+import com.microsoft.azure.storage.StorageException;
+import com.microsoft.azure.storage.blob.CloudBlobContainer;
+import com.microsoft.azure.storage.blob.SharedAccessBlobPermissions;
+import com.microsoft.azure.storage.blob.SharedAccessBlobPolicy;
+import org.apache.commons.lang3.StringUtils;
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzureBlobContainerProvider;
+import org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzureConstants;
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzuriteDockerRule;
+import org.jetbrains.annotations.NotNull;
+import org.junit.After;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.slf4j.LoggerFactory;
+
+import java.net.URISyntaxException;
+import java.security.InvalidKeyException;
+import java.time.Instant;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class DataStoreUtilsTest {
+@ClassRule
+public static AzuriteDockerRule azuriteDockerRule = new 
AzuriteDockerRule();
+
+private static final String AZURE_ACCOUNT_NAME = "AZURE_ACCOUNT_NAME";
+private static final String AZURE_TENANT_ID = "AZURE_TENANT_ID";
+private static final String AZURE_CLIENT_ID = "AZURE_CLIENT_ID";
+private static final String AZURE_CLIENT_SECRET = "AZURE_CLIENT_SECRET";
+private static final String AZURE_CONNECTION_STRING = 
"DefaultEndpointsProtocol=http;AccountName=%s;AccountKey=%s;BlobEndpoint=%s";
+private static final String CONTAINER_NAME = "oak-blob-test";
+private static final String AUTHENTICATE_VIA_AZURE_CONNECTION_STRING_LOG = 
"connecting to azure blob storage via azureConnectionString";
+private static final String AUTHENTICATE_VIA_ACCESS_KEY_LOG = "connecting 
to azure blob storage via access key";
+private static final String AUTHENTICATE_VIA_SERVICE_PRINCIPALS_LOG = 
"connecting to azure blob storage via service principal credentials";
+private static final String AUTHENTICATE_VIA_SAS_TOKEN_LOG = "connecting 
to azure blob storage via sas token";
+private static final String REFRESH_TOKEN_EXECUTOR_SHUTDOWN_LOG = "Refresh 
token executor service shutdown completed";
+private static final String CONTAINER_DOES_NOT_EXIST_MESSAGE = "container 
[%s] doesn't exists";
+private static final String CONTAINER_DELETED_MESSAGE = "container [%s] 
deleted";
+
+private CloudBlobContainer container;
+
+@Before
+public void init() throws URISyntaxException, InvalidKeyException, 
StorageException {
+container = azuriteDockerRule.getContainer(CONTAINER_NAME);
+}
+
+@After
+public void cleanup() throws StorageException {
+if (container != null) {
+container.deleteIfExists();
+}
+}
+
+@Test
+public void delete_non_existing_container_azure_connection_string() throws 
Exception {
+container.deleteIfExists();
+ListAppender logAppender = subscribeAppender();
+final String azureConnectionString = 
String.format(AZURE_CONNECTION_STRING, AzuriteDockerRule.ACCOUNT_NAME, 
AzuriteDockerRule.ACCOUNT_KEY, azuriteDockerRule.getBlobEndpoint());
+
+
DataStoreUtils.deleteAzureContainer(getConfigMap(azureConnectionString, null, 
null, null, null, null, null, null), CONTAINER_NAME);
+

Re: [PR] add service principal support while deleting container in oak-run-commons [jackrabbit-oak]

2024-06-23 Thread via GitHub


t-rana commented on code in PR #1542:
URL: https://github.com/apache/jackrabbit-oak/pull/1542#discussion_r1650372442


##
oak-run-commons/src/test/java/org/apache/jackrabbit/oak/fixture/DataStoreUtilsTest.java:
##
@@ -0,0 +1,259 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.oak.fixture;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.core.Appender;
+import ch.qos.logback.core.read.ListAppender;
+import com.microsoft.azure.storage.StorageException;
+import com.microsoft.azure.storage.blob.CloudBlobContainer;
+import com.microsoft.azure.storage.blob.SharedAccessBlobPermissions;
+import com.microsoft.azure.storage.blob.SharedAccessBlobPolicy;
+import org.apache.commons.lang3.StringUtils;
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzureBlobContainerProvider;
+import org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzureConstants;
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzuriteDockerRule;
+import org.jetbrains.annotations.NotNull;
+import org.junit.After;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.slf4j.LoggerFactory;
+
+import java.net.URISyntaxException;
+import java.security.InvalidKeyException;
+import java.time.Instant;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class DataStoreUtilsTest {
+@ClassRule
+public static AzuriteDockerRule azuriteDockerRule = new 
AzuriteDockerRule();
+
+private static final String AZURE_ACCOUNT_NAME = "AZURE_ACCOUNT_NAME";
+private static final String AZURE_TENANT_ID = "AZURE_TENANT_ID";
+private static final String AZURE_CLIENT_ID = "AZURE_CLIENT_ID";
+private static final String AZURE_CLIENT_SECRET = "AZURE_CLIENT_SECRET";
+private static final String AZURE_CONNECTION_STRING = 
"DefaultEndpointsProtocol=http;AccountName=%s;AccountKey=%s;BlobEndpoint=%s";
+private static final String CONTAINER_NAME = "oak-blob-test";
+private static final String AUTHENTICATE_VIA_AZURE_CONNECTION_STRING_LOG = 
"connecting to azure blob storage via azureConnectionString";
+private static final String AUTHENTICATE_VIA_ACCESS_KEY_LOG = "connecting 
to azure blob storage via access key";
+private static final String AUTHENTICATE_VIA_SERVICE_PRINCIPALS_LOG = 
"connecting to azure blob storage via service principal credentials";
+private static final String AUTHENTICATE_VIA_SAS_TOKEN_LOG = "connecting 
to azure blob storage via sas token";
+private static final String REFRESH_TOKEN_EXECUTOR_SHUTDOWN_LOG = "Refresh 
token executor service shutdown completed";
+private static final String CONTAINER_DOES_NOT_EXIST_MESSAGE = "container 
[%s] doesn't exists";
+private static final String CONTAINER_DELETED_MESSAGE = "container [%s] 
deleted";
+
+private CloudBlobContainer container;
+
+@Before
+public void init() throws URISyntaxException, InvalidKeyException, 
StorageException {
+container = azuriteDockerRule.getContainer(CONTAINER_NAME);
+}
+
+@After
+public void cleanup() throws StorageException {
+if (container != null) {
+container.deleteIfExists();
+}
+}
+
+@Test
+public void delete_non_existing_container_azure_connection_string() throws 
Exception {
+container.deleteIfExists();

Review Comment:
   now using a random container name while trying to delete container that are 
never created.



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:

Re: [PR] add service principal support while deleting container in oak-run-commons [jackrabbit-oak]

2024-06-23 Thread via GitHub


t-rana commented on code in PR #1542:
URL: https://github.com/apache/jackrabbit-oak/pull/1542#discussion_r1650372015


##
oak-run-commons/src/test/java/org/apache/jackrabbit/oak/fixture/DataStoreUtilsTest.java:
##
@@ -0,0 +1,259 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.oak.fixture;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.core.Appender;
+import ch.qos.logback.core.read.ListAppender;
+import com.microsoft.azure.storage.StorageException;
+import com.microsoft.azure.storage.blob.CloudBlobContainer;
+import com.microsoft.azure.storage.blob.SharedAccessBlobPermissions;
+import com.microsoft.azure.storage.blob.SharedAccessBlobPolicy;
+import org.apache.commons.lang3.StringUtils;
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzureBlobContainerProvider;
+import org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzureConstants;
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzuriteDockerRule;
+import org.jetbrains.annotations.NotNull;
+import org.junit.After;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.slf4j.LoggerFactory;
+
+import java.net.URISyntaxException;
+import java.security.InvalidKeyException;
+import java.time.Instant;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class DataStoreUtilsTest {
+@ClassRule
+public static AzuriteDockerRule azuriteDockerRule = new 
AzuriteDockerRule();
+
+private static final String AZURE_ACCOUNT_NAME = "AZURE_ACCOUNT_NAME";
+private static final String AZURE_TENANT_ID = "AZURE_TENANT_ID";
+private static final String AZURE_CLIENT_ID = "AZURE_CLIENT_ID";
+private static final String AZURE_CLIENT_SECRET = "AZURE_CLIENT_SECRET";
+private static final String AZURE_CONNECTION_STRING = 
"DefaultEndpointsProtocol=http;AccountName=%s;AccountKey=%s;BlobEndpoint=%s";
+private static final String CONTAINER_NAME = "oak-blob-test";
+private static final String AUTHENTICATE_VIA_AZURE_CONNECTION_STRING_LOG = 
"connecting to azure blob storage via azureConnectionString";
+private static final String AUTHENTICATE_VIA_ACCESS_KEY_LOG = "connecting 
to azure blob storage via access key";
+private static final String AUTHENTICATE_VIA_SERVICE_PRINCIPALS_LOG = 
"connecting to azure blob storage via service principal credentials";
+private static final String AUTHENTICATE_VIA_SAS_TOKEN_LOG = "connecting 
to azure blob storage via sas token";
+private static final String REFRESH_TOKEN_EXECUTOR_SHUTDOWN_LOG = "Refresh 
token executor service shutdown completed";
+private static final String CONTAINER_DOES_NOT_EXIST_MESSAGE = "container 
[%s] doesn't exists";
+private static final String CONTAINER_DELETED_MESSAGE = "container [%s] 
deleted";
+
+private CloudBlobContainer container;
+
+@Before
+public void init() throws URISyntaxException, InvalidKeyException, 
StorageException {
+container = azuriteDockerRule.getContainer(CONTAINER_NAME);

Review Comment:
   added a assert for container existence



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] add service principal support while deleting container in oak-run-commons [jackrabbit-oak]

2024-06-23 Thread via GitHub


t-rana commented on code in PR #1542:
URL: https://github.com/apache/jackrabbit-oak/pull/1542#discussion_r1650371659


##
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/fixture/DataStoreUtils.java:
##
@@ -146,26 +150,52 @@ public static void deleteBucket(String bucket, 
Map map, Date date) th
 }
 
 public static void deleteAzureContainer(Map config, String 
containerName) throws Exception {
+if (config == null) {
+return;

Review Comment:
   thanks for pointing this our, changes done!



##
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/fixture/DataStoreUtils.java:
##
@@ -146,26 +150,52 @@ public static void deleteBucket(String bucket, 
Map map, Date date) th
 }
 
 public static void deleteAzureContainer(Map config, String 
containerName) throws Exception {
+if (config == null) {
+return;
+}
 if (Strings.isNullOrEmpty(containerName)) {
 return;

Review Comment:
   thanks, changes done!



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] add service principal support while deleting container in oak-run-commons [jackrabbit-oak]

2024-06-23 Thread via GitHub


t-rana commented on code in PR #1542:
URL: https://github.com/apache/jackrabbit-oak/pull/1542#discussion_r1650371492


##
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/fixture/DataStoreUtils.java:
##
@@ -146,26 +150,52 @@ public static void deleteBucket(String bucket, 
Map map, Date date) th
 }
 
 public static void deleteAzureContainer(Map config, String 
containerName) throws Exception {
+if (config == null) {
+return;
+}
 if (Strings.isNullOrEmpty(containerName)) {
 return;
 }
-String connectionString = (String) 
config.get(AzureConstants.AZURE_CONNECTION_STRING);
-if (Strings.isNullOrEmpty(connectionString)) {
-String accountName = (String) 
config.get(AzureConstants.AZURE_STORAGE_ACCOUNT_NAME);
-String accountKey = (String) 
config.get(AzureConstants.AZURE_STORAGE_ACCOUNT_KEY);
-if (Strings.isNullOrEmpty(accountName) ||
-Strings.isNullOrEmpty(accountKey)) {
-return;
-}
-connectionString = 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.Utils.getConnectionString(accountName,
 accountKey);
+CloudBlobContainer container = getCloudBlobContainer(config, 
containerName);
+if (container == null) {
+log.info("container is not initialized");

Review Comment:
   done



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] add service principal support while deleting container in oak-run-commons [jackrabbit-oak]

2024-06-23 Thread via GitHub


nit0906 commented on code in PR #1542:
URL: https://github.com/apache/jackrabbit-oak/pull/1542#discussion_r1650350025


##
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/fixture/DataStoreUtils.java:
##
@@ -146,26 +150,52 @@ public static void deleteBucket(String bucket, 
Map map, Date date) th
 }
 
 public static void deleteAzureContainer(Map config, String 
containerName) throws Exception {
+if (config == null) {
+return;
+}
 if (Strings.isNullOrEmpty(containerName)) {
 return;
 }
-String connectionString = (String) 
config.get(AzureConstants.AZURE_CONNECTION_STRING);
-if (Strings.isNullOrEmpty(connectionString)) {
-String accountName = (String) 
config.get(AzureConstants.AZURE_STORAGE_ACCOUNT_NAME);
-String accountKey = (String) 
config.get(AzureConstants.AZURE_STORAGE_ACCOUNT_KEY);
-if (Strings.isNullOrEmpty(accountName) ||
-Strings.isNullOrEmpty(accountKey)) {
-return;
-}
-connectionString = 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.Utils.getConnectionString(accountName,
 accountKey);
+CloudBlobContainer container = getCloudBlobContainer(config, 
containerName);
+if (container == null) {
+log.info("container is not initialized");

Review Comment:
   This should be changed to warn. 



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] add service principal support while deleting container in oak-run-commons [jackrabbit-oak]

2024-06-23 Thread via GitHub


nit0906 commented on code in PR #1542:
URL: https://github.com/apache/jackrabbit-oak/pull/1542#discussion_r1650348764


##
oak-run-commons/src/test/java/org/apache/jackrabbit/oak/fixture/DataStoreUtilsTest.java:
##
@@ -0,0 +1,259 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.oak.fixture;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.core.Appender;
+import ch.qos.logback.core.read.ListAppender;
+import com.microsoft.azure.storage.StorageException;
+import com.microsoft.azure.storage.blob.CloudBlobContainer;
+import com.microsoft.azure.storage.blob.SharedAccessBlobPermissions;
+import com.microsoft.azure.storage.blob.SharedAccessBlobPolicy;
+import org.apache.commons.lang3.StringUtils;
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzureBlobContainerProvider;
+import org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzureConstants;
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzuriteDockerRule;
+import org.jetbrains.annotations.NotNull;
+import org.junit.After;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.slf4j.LoggerFactory;
+
+import java.net.URISyntaxException;
+import java.security.InvalidKeyException;
+import java.time.Instant;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class DataStoreUtilsTest {
+@ClassRule
+public static AzuriteDockerRule azuriteDockerRule = new 
AzuriteDockerRule();
+
+private static final String AZURE_ACCOUNT_NAME = "AZURE_ACCOUNT_NAME";
+private static final String AZURE_TENANT_ID = "AZURE_TENANT_ID";
+private static final String AZURE_CLIENT_ID = "AZURE_CLIENT_ID";
+private static final String AZURE_CLIENT_SECRET = "AZURE_CLIENT_SECRET";
+private static final String AZURE_CONNECTION_STRING = 
"DefaultEndpointsProtocol=http;AccountName=%s;AccountKey=%s;BlobEndpoint=%s";
+private static final String CONTAINER_NAME = "oak-blob-test";
+private static final String AUTHENTICATE_VIA_AZURE_CONNECTION_STRING_LOG = 
"connecting to azure blob storage via azureConnectionString";
+private static final String AUTHENTICATE_VIA_ACCESS_KEY_LOG = "connecting 
to azure blob storage via access key";
+private static final String AUTHENTICATE_VIA_SERVICE_PRINCIPALS_LOG = 
"connecting to azure blob storage via service principal credentials";
+private static final String AUTHENTICATE_VIA_SAS_TOKEN_LOG = "connecting 
to azure blob storage via sas token";
+private static final String REFRESH_TOKEN_EXECUTOR_SHUTDOWN_LOG = "Refresh 
token executor service shutdown completed";
+private static final String CONTAINER_DOES_NOT_EXIST_MESSAGE = "container 
[%s] doesn't exists";
+private static final String CONTAINER_DELETED_MESSAGE = "container [%s] 
deleted";
+
+private CloudBlobContainer container;
+
+@Before
+public void init() throws URISyntaxException, InvalidKeyException, 
StorageException {
+container = azuriteDockerRule.getContainer(CONTAINER_NAME);
+}
+
+@After
+public void cleanup() throws StorageException {
+if (container != null) {
+container.deleteIfExists();
+}
+}
+
+@Test
+public void delete_non_existing_container_azure_connection_string() throws 
Exception {
+container.deleteIfExists();
+ListAppender logAppender = subscribeAppender();
+final String azureConnectionString = 
String.format(AZURE_CONNECTION_STRING, AzuriteDockerRule.ACCOUNT_NAME, 
AzuriteDockerRule.ACCOUNT_KEY, azuriteDockerRule.getBlobEndpoint());
+
+
DataStoreUtils.deleteAzureContainer(getConfigMap(azureConnectionString, null, 
null, null, null, null, null, null), CONTAINER_NAME);
+

Re: [PR] add service principal support while deleting container in oak-run-commons [jackrabbit-oak]

2024-06-23 Thread via GitHub


nit0906 commented on code in PR #1542:
URL: https://github.com/apache/jackrabbit-oak/pull/1542#discussion_r1650348034


##
oak-run-commons/src/test/java/org/apache/jackrabbit/oak/fixture/DataStoreUtilsTest.java:
##
@@ -0,0 +1,259 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.oak.fixture;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.core.Appender;
+import ch.qos.logback.core.read.ListAppender;
+import com.microsoft.azure.storage.StorageException;
+import com.microsoft.azure.storage.blob.CloudBlobContainer;
+import com.microsoft.azure.storage.blob.SharedAccessBlobPermissions;
+import com.microsoft.azure.storage.blob.SharedAccessBlobPolicy;
+import org.apache.commons.lang3.StringUtils;
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzureBlobContainerProvider;
+import org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzureConstants;
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzuriteDockerRule;
+import org.jetbrains.annotations.NotNull;
+import org.junit.After;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.slf4j.LoggerFactory;
+
+import java.net.URISyntaxException;
+import java.security.InvalidKeyException;
+import java.time.Instant;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class DataStoreUtilsTest {
+@ClassRule
+public static AzuriteDockerRule azuriteDockerRule = new 
AzuriteDockerRule();
+
+private static final String AZURE_ACCOUNT_NAME = "AZURE_ACCOUNT_NAME";
+private static final String AZURE_TENANT_ID = "AZURE_TENANT_ID";
+private static final String AZURE_CLIENT_ID = "AZURE_CLIENT_ID";
+private static final String AZURE_CLIENT_SECRET = "AZURE_CLIENT_SECRET";
+private static final String AZURE_CONNECTION_STRING = 
"DefaultEndpointsProtocol=http;AccountName=%s;AccountKey=%s;BlobEndpoint=%s";
+private static final String CONTAINER_NAME = "oak-blob-test";
+private static final String AUTHENTICATE_VIA_AZURE_CONNECTION_STRING_LOG = 
"connecting to azure blob storage via azureConnectionString";
+private static final String AUTHENTICATE_VIA_ACCESS_KEY_LOG = "connecting 
to azure blob storage via access key";
+private static final String AUTHENTICATE_VIA_SERVICE_PRINCIPALS_LOG = 
"connecting to azure blob storage via service principal credentials";
+private static final String AUTHENTICATE_VIA_SAS_TOKEN_LOG = "connecting 
to azure blob storage via sas token";
+private static final String REFRESH_TOKEN_EXECUTOR_SHUTDOWN_LOG = "Refresh 
token executor service shutdown completed";
+private static final String CONTAINER_DOES_NOT_EXIST_MESSAGE = "container 
[%s] doesn't exists";
+private static final String CONTAINER_DELETED_MESSAGE = "container [%s] 
deleted";
+
+private CloudBlobContainer container;
+
+@Before
+public void init() throws URISyntaxException, InvalidKeyException, 
StorageException {
+container = azuriteDockerRule.getContainer(CONTAINER_NAME);
+}
+
+@After
+public void cleanup() throws StorageException {
+if (container != null) {
+container.deleteIfExists();
+}
+}
+
+@Test
+public void delete_non_existing_container_azure_connection_string() throws 
Exception {
+container.deleteIfExists();

Review Comment:
   instead of deleting the container here - couldn't we simply use a random 
container name that we never created ? 



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact 

Re: [PR] add service principal support while deleting container in oak-run-commons [jackrabbit-oak]

2024-06-23 Thread via GitHub


nit0906 commented on code in PR #1542:
URL: https://github.com/apache/jackrabbit-oak/pull/1542#discussion_r1650346400


##
oak-run-commons/src/test/java/org/apache/jackrabbit/oak/fixture/DataStoreUtilsTest.java:
##
@@ -0,0 +1,259 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.oak.fixture;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.LoggerContext;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.core.Appender;
+import ch.qos.logback.core.read.ListAppender;
+import com.microsoft.azure.storage.StorageException;
+import com.microsoft.azure.storage.blob.CloudBlobContainer;
+import com.microsoft.azure.storage.blob.SharedAccessBlobPermissions;
+import com.microsoft.azure.storage.blob.SharedAccessBlobPolicy;
+import org.apache.commons.lang3.StringUtils;
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzureBlobContainerProvider;
+import org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzureConstants;
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.AzuriteDockerRule;
+import org.jetbrains.annotations.NotNull;
+import org.junit.After;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.slf4j.LoggerFactory;
+
+import java.net.URISyntaxException;
+import java.security.InvalidKeyException;
+import java.time.Instant;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Date;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+public class DataStoreUtilsTest {
+@ClassRule
+public static AzuriteDockerRule azuriteDockerRule = new 
AzuriteDockerRule();
+
+private static final String AZURE_ACCOUNT_NAME = "AZURE_ACCOUNT_NAME";
+private static final String AZURE_TENANT_ID = "AZURE_TENANT_ID";
+private static final String AZURE_CLIENT_ID = "AZURE_CLIENT_ID";
+private static final String AZURE_CLIENT_SECRET = "AZURE_CLIENT_SECRET";
+private static final String AZURE_CONNECTION_STRING = 
"DefaultEndpointsProtocol=http;AccountName=%s;AccountKey=%s;BlobEndpoint=%s";
+private static final String CONTAINER_NAME = "oak-blob-test";
+private static final String AUTHENTICATE_VIA_AZURE_CONNECTION_STRING_LOG = 
"connecting to azure blob storage via azureConnectionString";
+private static final String AUTHENTICATE_VIA_ACCESS_KEY_LOG = "connecting 
to azure blob storage via access key";
+private static final String AUTHENTICATE_VIA_SERVICE_PRINCIPALS_LOG = 
"connecting to azure blob storage via service principal credentials";
+private static final String AUTHENTICATE_VIA_SAS_TOKEN_LOG = "connecting 
to azure blob storage via sas token";
+private static final String REFRESH_TOKEN_EXECUTOR_SHUTDOWN_LOG = "Refresh 
token executor service shutdown completed";
+private static final String CONTAINER_DOES_NOT_EXIST_MESSAGE = "container 
[%s] doesn't exists";
+private static final String CONTAINER_DELETED_MESSAGE = "container [%s] 
deleted";
+
+private CloudBlobContainer container;
+
+@Before
+public void init() throws URISyntaxException, InvalidKeyException, 
StorageException {
+container = azuriteDockerRule.getContainer(CONTAINER_NAME);

Review Comment:
   Does this init method assures that the container will always be present 
before any test executes ? 



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] add service principal support while deleting container in oak-run-commons [jackrabbit-oak]

2024-06-23 Thread via GitHub


nit0906 commented on code in PR #1542:
URL: https://github.com/apache/jackrabbit-oak/pull/1542#discussion_r1650340220


##
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/fixture/DataStoreUtils.java:
##
@@ -146,26 +150,52 @@ public static void deleteBucket(String bucket, 
Map map, Date date) th
 }
 
 public static void deleteAzureContainer(Map config, String 
containerName) throws Exception {
+if (config == null) {
+return;

Review Comment:
   cannot initialize*



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] add service principal support while deleting container in oak-run-commons [jackrabbit-oak]

2024-06-23 Thread via GitHub


nit0906 commented on code in PR #1542:
URL: https://github.com/apache/jackrabbit-oak/pull/1542#discussion_r1650340383


##
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/fixture/DataStoreUtils.java:
##
@@ -146,26 +150,52 @@ public static void deleteBucket(String bucket, 
Map map, Date date) th
 }
 
 public static void deleteAzureContainer(Map config, String 
containerName) throws Exception {
+if (config == null) {
+return;
+}
 if (Strings.isNullOrEmpty(containerName)) {
 return;

Review Comment:
   cannot initialize*



-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[PR] add service principal support while deleting container in oak-run-commons [jackrabbit-oak]

2024-06-18 Thread via GitHub


t-rana opened a new pull request, #1542:
URL: https://github.com/apache/jackrabbit-oak/pull/1542

   …mons


-- 
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: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org