flyrain commented on code in PR #4393:
URL: https://github.com/apache/polaris/pull/4393#discussion_r3221102465
##########
regtests/t_pyspark/src/test_spark_sql_s3_with_privileges.py:
##########
@@ -256,9 +256,9 @@ def reader_catalog_client(polaris_catalog_url, reader):
host=polaris_catalog_url)))
[email protected](os.environ.get('AWS_TEST_ENABLED', 'False').lower() !=
'true' and
- os.environ.get('MINIO_TEST_ENABLED', 'false').lower() !=
'true',
- reason='AWS_TEST_ENABLED or MINIO_TEST_ENABLED is not set
or is false')
[email protected](os.environ.get('AWS_TEST_ENABLED', 'False').lower() !=
'true' and not
+ os.environ.get('S3_TEST_BACKEND') in ['minio', 'rustfs'],
+ reason='AWS_TEST_ENABLED or S3_TEST_BACKEND is not set
minio or rustfs')
Review Comment:
Minor: Reason string reads awkwardly: `'... is not set minio or rustfs'` is
missing a word. Suggest `'AWS_TEST_ENABLED is not true and S3_TEST_BACKEND is
not minio or rustfs'`. Same fix applies to all six copies (lines 261, 325, 357,
397, 428, 463). Also worth extracting to a module-level decorator/marker so
future backend additions only edit one place.
##########
regtests/run.sh:
##########
@@ -65,27 +65,30 @@ export PYTHONDONTWRITEBYTECODE=1
NUM_FAILURES=0
NUM_SUCCESSES=0
-# Detect test mode: AWS or MinIO
-if [ -z "${MINIO_TEST_ENABLED}" ]; then
- # Auto-detect: use MinIO if AWS tests not enabled
+# Determine test mode (default to MinIO for local S3)
+if [ -z "${S3_TEST_BACKEND}" ]; then
+ # Use MinIO as the default local backend if AWS tests are not enabled
if [ "${AWS_TEST_ENABLED}" == "true" ]; then
- export MINIO_TEST_ENABLED=false
+ export S3_TEST_BACKEND=aws
loginfo "AWS tests enabled, using AWS mode"
else
- export MINIO_TEST_ENABLED=true
+ export S3_TEST_BACKEND=minio
export AWS_TEST_ENABLED=false
- loginfo "AWS tests not enabled, enabling MinIO mode"
+ loginfo "AWS tests not enabled, defaulting to MinIO mode"
Review Comment:
It seems a unnecessarily complexity to use two nobs (S3_TEST_BACKEND,
AWS_TEST_ENABLED) to control the behavior. Keeping `S3_TEST_BACKEND` only will
make it simpler for the selection logic and users' configuration.
--
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]