From 1349e6b7d1fdf698cea4228716a54a9b7e75b85f Mon Sep 17 00:00:00 2001 From: Magicbook1108 Date: Thu, 5 Feb 2026 13:52:23 +0800 Subject: [PATCH] Fix: adressing style without a default value (#13009) ### What problem does this PR solve? Fix: adressing style without a default value #12396 #11510 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- .github/workflows/tests.yml | 1 + common/data_source/utils.py | 3 +-- .../pages/user-setting/data-source/constant/s3-constant.tsx | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fa33c0b01..934005ede 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -187,6 +187,7 @@ jobs: echo -e "EXPOSE_MYSQL_PORT=${EXPOSE_MYSQL_PORT}" >> docker/.env echo -e "MINIO_PORT=${MINIO_PORT}" >> docker/.env echo -e "MINIO_CONSOLE_PORT=${MINIO_CONSOLE_PORT}" >> docker/.env + echo -e "REDIS_PORT=${REDIS_PORT}" >> docker/.env echo -e "TEI_PORT=${TEI_PORT}" >> docker/.env echo -e "KIBANA_PORT=${KIBANA_PORT}" >> docker/.env echo -e "SVR_HTTP_PORT=${SVR_HTTP_PORT}" >> docker/.env diff --git a/common/data_source/utils.py b/common/data_source/utils.py index 1866f9497..4cc3cce43 100644 --- a/common/data_source/utils.py +++ b/common/data_source/utils.py @@ -315,14 +315,13 @@ def create_s3_client(bucket_type: BlobType, credentials: dict[str, Any], europea region_name=credentials["region"], ) elif bucket_type == BlobType.S3_COMPATIBLE: - addressing_style = credentials.get("addressing_style", "virtual") return boto3.client( "s3", endpoint_url=credentials["endpoint_url"], aws_access_key_id=credentials["aws_access_key_id"], aws_secret_access_key=credentials["aws_secret_access_key"], - config=Config(s3={'addressing_style': addressing_style}), + config=Config(s3={'addressing_style': credentials["addressing_style"]}), ) else: diff --git a/web/src/pages/user-setting/data-source/constant/s3-constant.tsx b/web/src/pages/user-setting/data-source/constant/s3-constant.tsx index 597e76644..96bcb3ea8 100644 --- a/web/src/pages/user-setting/data-source/constant/s3-constant.tsx +++ b/web/src/pages/user-setting/data-source/constant/s3-constant.tsx @@ -143,6 +143,7 @@ export const S3Constant = (t: TFunction) => [ tooltip: t('setting.S3CompatibleAddressingStyleTip'), required: false, type: FormFieldType.Select, + defaultValue: 'virtual', options: [ { label: 'Virtual Hosted Style', value: 'virtual' }, { label: 'Path Style', value: 'path' },