venkateshwaracholan commented on code in PR #4393:
URL: https://github.com/apache/polaris/pull/4393#discussion_r3214370448
##########
regtests/docker-compose.yml:
##########
@@ -71,9 +97,8 @@ services:
depends_on:
polaris:
condition: service_healthy
- minio:
- condition: service_healthy
Review Comment:
regtest has no depends_on for the S3 backend
The explicit dependency on `minio` was removed, but no equivalent was added
for `rustfs`. Relying solely on the poll loop in `s3-setup.sh` makes the
orchestration "loose."
By adding both back with `required: false`, Docker will wait for whichever
backend is active in the current profile without failing if the other one is
missing.
```suggestion
minio:
condition: service_healthy
required: false
rustfs:
condition: service_healthy
required: false
##########
Makefile:
##########
@@ -385,6 +385,28 @@ minikube-stop-cluster: check-dependencies ## Stop the
Minikube cluster
echo "--- Minikube cluster is already stopped or does not
exist. Skipping stop ---"; \
fi
+##@ Regression Tests
+
+regtest-minio: DEPENDENCIES := $(DOCKER)
+.PHONY: regtest-minio
+regtest-minio: check-dependencies ## Run regression tests with MinIO
+ @echo "--- Running regression tests with MinIO ---"
+ @S3_TEST_BACKEND=minio $(DOCKER) compose --profile minio -f
./regtests/docker-compose.yml up --build --exit-code-from regtest
+ @echo "--- Regression tests with MinIO completed ---"
+
+regtest-rustfs: DEPENDENCIES := $(DOCKER)
+.PHONY: regtest-rustfs
+regtest-rustfs: check-dependencies ## Run regression tests with RustFS
+ @echo "--- Running regression tests with RustFS ---"
+ @S3_TEST_BACKEND=rustfs $(DOCKER) compose --profile rustfs -f
./regtests/docker-compose.yml up --build --exit-code-from regtest
+ @echo "--- Regression tests with RustFS completed ---"
+
+regtest-cleanup: DEPENDENCIES := $(DOCKER)
+.PHONY: regtest-cleanup
+regtest-cleanup: check-dependencies ## Stop and remove regression test
containers, networks, and volumes
+ @echo "--- Cleaning up regression tests with MinIO ---"
Review Comment:
**Nit: Generalize cleanup message**
Since this target now handles both the `minio` and `rustfs` profiles, the
`echo` should be generalized to avoid confusion when cleaning up a RustFS
environment.
```suggestion
@echo "--- Cleaning up all regression test resources ---"
##########
regtests/docker-compose.yml:
##########
@@ -17,18 +17,46 @@
# under the License.
#
+x-aws-client-creds: &aws-client-creds
+ AWS_ACCESS_KEY_ID: ${S3_ACCESS_KEY:-polarisadmin}
+ AWS_SECRET_ACCESS_KEY: ${S3_SECRET_KEY:-polarisadmin}
+ AWS_REGION: us-west-2
+
services:
minio:
image: minio/minio:latest
+ profiles: ["minio"]
ports:
- "9000:9000"
- "9001:9001"
+ networks:
+ default:
+ aliases:
+ - s3.local
environment:
- MINIO_ROOT_USER: minioadmin
- MINIO_ROOT_PASSWORD: minioadmin
+ MINIO_ROOT_USER: ${S3_ACCESS_KEY:-polarisadmin}
+ MINIO_ROOT_PASSWORD: ${S3_SECRET_KEY:-polarisadmin}
command: server /data --console-address ":9001"
healthcheck:
- test: ["CMD", "mc", "ready", "local"]
+ test: ["CMD-SHELL", "mc ready local"]
+ interval: 5s
+ timeout: 5s
+ retries: 5
+ rustfs:
+ image: rustfs/rustfs:1.0.0-beta.2
+ profiles: ["rustfs"]
+ ports:
+ - "9000:9000"
+ - "9001:9001"
+ networks:
+ default:
+ aliases:
+ - s3.local
+ environment:
+ RUSTFS_ACCESS_KEY: ${S3_ACCESS_KEY:-polarisadmin}
+ RUSTFS_SECRET_KEY: ${S3_SECRET_KEY:-polarisadmin}
+ healthcheck:
+ test: ["CMD-SHELL", "curl --fail http://localhost:9000/health"]
Review Comment:
Nice addition here, I’ve quickly verified the rustfs/rustfs:1.0.0-beta.2
image contains /usr/bin/curl. This confirms the healthcheck is compatible and
won't deadlock the startup when using service_healthy.
```
$ docker run --rm --entrypoint /bin/sh rustfs/rustfs:1.0.0-beta.2 -c "which
curl"
/usr/bin/curl
```
--
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]