Skip to content

[DO-NOT-MERGE] Change MinIO to RustFS for integration testing#3663

Closed
MonkeyCanCode wants to merge 3 commits intoapache:mainfrom
MonkeyCanCode:rustfs_it
Closed

[DO-NOT-MERGE] Change MinIO to RustFS for integration testing#3663
MonkeyCanCode wants to merge 3 commits intoapache:mainfrom
MonkeyCanCode:rustfs_it

Conversation

@MonkeyCanCode
Copy link
Contributor

I am not sure if we want to take this PR as it is changing existed integration testing on S3-compatible storage from MinIO to RustFS instead of creating a new test-containers. But here are the high level changes from this PR:

  1. Refactored MinIO test-containers to RustFS test-containers
  2. Use fixed port for RustFS test-containers due to it needs :<service_port> when using virtual host style access instead of only domain (details in virtual host mode caused rustfs mistakenly consider other instance's domain in cluster as bucket name rustfs/rustfs#1593)
  3. Changed S3 exception message as RustFS returns it without period at the end (change in integration-tests/src/main/java/org/apache/polaris/service/it/test/CatalogFederationIntegrationTest.java)
  4. Removed custom cmd used by MinIO as RustFS image has those configured already
  5. Changed healthcheck port from 9000 (used by MinIO) to 9001 (used by RustFS)

ML: https://lists.apache.org/thread/8o31ly7cd8ov70opjbtg630qlhrfl5yh

Checklist

  • 🛡️ Don't disclose security issues! (contact security@apache.org)
  • 🔗 Clearly explained why the changes are needed, or linked related issues: Fixes #
  • 🧪 Added/updated tests with good coverage, or manually tested (and explained how)
  • 💡 Added comments for complex logic
  • 🧾 Updated CHANGELOG.md (if needed)
  • 📚 Updated documentation in site/content/in-dev/unreleased (if needed)

@github-project-automation github-project-automation bot moved this to PRs In Progress in Basic Kanban Board Feb 4, 2026
@MonkeyCanCode MonkeyCanCode requested review from dimas-b, flyrain and snazy and removed request for dimas-b February 4, 2026 04:48
Copy link
Contributor

@adutra adutra left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @MonkeyCanCode , it's really interesting that you were able to migrate so smoothly!

Indeed, I wonder if it wouldn't be better to have both MinIO and RustFS tests, at least for some time.

Also, the need for a fixed port is a minor annoyance, but we can live with that I guess.

addExposedPort(DEFAULT_PORT);
withNetworkAliases(randomString("rustfs"));
withLogConsumer(new Slf4jLogConsumer(LoggerFactory.getLogger(RustfsContainer.class)));
addFixedExposedPort(S3_API_PORT, S3_API_PORT);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need fixed ports?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm I see, it's explained here:

https://lists.apache.org/thread/5cvgk6m83hnsoly9gq4bxdchcc69f3l0

That's unfortunate, because it could cause test failures especially for devs (not so much for CI imho).

Copy link
Contributor

Choose a reason for hiding this comment

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

Could we have a code comment for this too (for ease of recollection later :) )?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

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";
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: why "DOMAINS" in the plural?

Copy link
Contributor Author

@MonkeyCanCode MonkeyCanCode Feb 5, 2026

Choose a reason for hiding this comment

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

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). But I think you are ref to the variable name. I am changing this to RUSTFS_DOMAIN in the new PR as we are using one domain only.

@adutra
Copy link
Contributor

adutra commented Feb 4, 2026

Heads up: you need to rebase this PR for it to pass CI.

@dimas-b
Copy link
Contributor

dimas-b commented Feb 4, 2026

Indeed, I wonder if it wouldn't be better to have both MinIO and RustFS tests, at least for some time.

+1 to running MinIO tests and RustFS tests in parallel for a while. If all is well in CI we can reduce load by removing MinIO tests later.

@dimas-b
Copy link
Contributor

dimas-b commented Feb 4, 2026

We could probably start with adapting these tests to RustFS (by copy initially): RestCatalogMinIOSpecialIT, PolarisRestCatalogMinIOIT and keep Federation tests on MinIO initially... just for the same of simplicity... WDYT?

- 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: TBH, I doubt users are interested in this and developers can view GH PRs 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack.

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,");
Copy link
Contributor

@dimas-b dimas-b Feb 4, 2026

Choose a reason for hiding this comment

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

Suggestion: use RegEx for account for both cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure thing. let me update it in a diff PR.

@dimas-b
Copy link
Contributor

dimas-b commented Feb 4, 2026

Actually, this PR looks good to me as it is. Perhaps, as discussed above, we could keep RestCatalogMinIOSpecialIT, PolarisRestCatalogMinIOIT on MinIO for a while. Migrating NoSQL and Federation tests to RustFS is fine.

@MonkeyCanCode
Copy link
Contributor Author

Thanks so much for the quick review @dimas-b and @adutra . I think we all think it is better to have both minio and rustfs test-containers co-existed and copied over the existed s3-compatible storage IT over with the needed changes in this PR. I will keep this one and mark it as DO-NOT-MERGE in case if we have more people who would like to review. In the mean time, I will create a different PR for the new test-containers.

@MonkeyCanCode MonkeyCanCode changed the title Change MinIO to RustFS for integration testing [DO-NOT-MERGE] Change MinIO to RustFS for integration testing Feb 5, 2026
@MonkeyCanCode
Copy link
Contributor Author

@adutra @dimas-b I have created #3679 to address the feedback and have both test-containers co-existed as well as migrated certain ITs to RustFS. Please let me know if anything should be change. I will close this one for now.

@github-project-automation github-project-automation bot moved this from PRs In Progress to Done in Basic Kanban Board Feb 5, 2026
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