MonkeyCanCode commented on code in PR #3663:
URL: https://github.com/apache/polaris/pull/3663#discussion_r2766773048


##########
tools/rustfs-testcontainer/src/main/java/org/apache/polaris/test/rustfs/RustfsContainer.java:
##########
@@ -126,39 +126,39 @@ private static String validateBucketHost(String 
bucketName) {
   private Optional<String> region;
 
   @SuppressWarnings("unused")
-  public MinioContainer() {
+  public RustfsContainer() {
     this(null, null, null, null, null);
   }
 
   @SuppressWarnings("resource")
-  public MinioContainer(
+  public RustfsContainer(
       String image, String accessKey, String secretKey, String bucket, String 
region) {
     super(
-        ContainerSpecHelper.containerSpecHelper("minio", MinioContainer.class)
+        ContainerSpecHelper.containerSpecHelper("rustfs", 
RustfsContainer.class)
             .dockerImageName(image));
-    withNetworkAliases(randomString("minio"));
-    withLogConsumer(new 
Slf4jLogConsumer(LoggerFactory.getLogger(MinioContainer.class)));
-    addExposedPort(DEFAULT_PORT);
+    withNetworkAliases(randomString("rustfs"));
+    withLogConsumer(new 
Slf4jLogConsumer(LoggerFactory.getLogger(RustfsContainer.class)));
+    addFixedExposedPort(S3_API_PORT, S3_API_PORT);

Review Comment:
   Yeah. that is the unfortunate pieces I found so far. I will add a comment 
for this.



##########
tools/rustfs-testcontainer/src/main/java/org/apache/polaris/test/rustfs/RustfsContainer.java:
##########
@@ -43,27 +43,27 @@
 import software.amazon.awssdk.services.s3.model.CreateBucketRequest;
 
 // CODE_COPIED_TO_POLARIS from Project Nessie 0.104.2
-public final class MinioContainer extends GenericContainer<MinioContainer>
-    implements MinioAccess, AutoCloseable {
+public final class RustfsContainer extends GenericContainer<RustfsContainer>
+    implements RustfsAccess, AutoCloseable {
 
-  private static final Logger LOGGER = 
LoggerFactory.getLogger(MinioContainer.class);
+  private static final Logger LOGGER = 
LoggerFactory.getLogger(RustfsContainer.class);
 
-  private static final int DEFAULT_PORT = 9000;
+  private static final int S3_API_PORT = 9000;
+  private static final int CONSOLE_PORT = 9001;
 
-  private static final String MINIO_ACCESS_KEY = "MINIO_ROOT_USER";
-  private static final String MINIO_SECRET_KEY = "MINIO_ROOT_PASSWORD";
-  private static final String MINIO_DOMAIN = "MINIO_DOMAIN";
+  private static final String RUSTFS_ACCESS_KEY = "RUSTFS_ACCESS_KEY";
+  private static final String RUSTFS_SECRET_KEY = "RUSTFS_SECRET_KEY";
+  private static final String RUSTFS_SERVER_DOMAINS = "RUSTFS_SERVER_DOMAINS";

Review Comment:
   This is because `RUSTFS_SERVER_DOMAIN` is not valid but 
`RUSTFS_SERVER_DOMAINS` instead 
(https://github.com/rustfs/rustfs/blob/e30781654d26006cda575fa0746775eb3d29b8d3/rustfs/src/config/mod.rs#L73)



##########
integration-tests/src/main/java/org/apache/polaris/service/it/test/CatalogFederationIntegrationTest.java:
##########
@@ -423,7 +424,7 @@ void testFederatedCatalogWithCredentialVending() {
     // Verify that write is blocked since the vended credential should only 
have read permission
     assertThatThrownBy(() -> spark.sql("INSERT INTO ns1.test_table VALUES (3, 
'Charlie')"))
         .hasMessageContaining(
-            "software.amazon.awssdk.services.s3.model.S3Exception: Access 
Denied. (Service: S3, Status Code: 403,");
+            "software.amazon.awssdk.services.s3.model.S3Exception: Access 
Denied (Service: S3, Status Code: 403,");

Review Comment:
   Sure thing. let me update it in a diff PR.



##########
CHANGELOG.md:
##########
@@ -61,6 +61,7 @@ request adding CHANGELOG notes for breaking (!) changes and 
possibly other secti
 - Changed from Poetry to UV for Python package management.
 - Exclude KMS policies when KMS is not being used for S3.
 - Improved default KMS permission handling to better distinguish read-only and 
read-write access.
+- Replaced MinIO with RustFS for integration testing.

Review Comment:
   ack.



-- 
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]

Reply via email to