Skip to content

[refactor][backend] support configurable force_path_style for S3 client#429

Open
userwanyong wants to merge 1 commit intocoze-dev:mainfrom
userwanyong:feat/s3-force-path-style-config
Open

[refactor][backend] support configurable force_path_style for S3 client#429
userwanyong wants to merge 1 commit intocoze-dev:mainfrom
userwanyong:feat/s3-force-path-style-config

Conversation

@userwanyong
Copy link

@userwanyong userwanyong commented Feb 9, 2026

Previously, the ForcePathStyle setting was hardcoded based on domain name detection, making it difficult to adapt to different object storage services.

This commit refactors the getOssForcePathStyle function to read from the configuration file (infrastructure.yaml) with a fallback to domain-based detection for backward compatibility.

Changes:

  • Modify getOssForcePathStyle to accept componentConfig parameter
  • Prioritize reading force_path_style from s3_config in infrastructure.yaml
  • Fallback to domain-based detection when config is not set

Benefits:

  • Flexibility to configure force_path_style for any S3-compatible storage
  • Easier integration with different object storage backends (MinIO, RustFS, etc.)
  • Maintains backward compatibility with existing deployments

What type of PR is this?

Check the PR title

  • This PR title match the format: [<type>][<scope>] <description>. For example: [fix][backend] flaky fix
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Add documentation if the current PR requires user awareness at the usage level.
  • This PR is written in English. PRs not in English will not be reviewed.

(Optional) Translate the PR title into Chinese

(Optional) More detailed description for this PR(en: English/zh: Chinese)

en:
zh(optional):

(Optional) Which issue(s) this PR fixes

Previously, the ForcePathStyle setting was hardcoded based on domain name
detection, making it difficult to adapt to different object storage services.

This commit refactors the getOssForcePathStyle function to read from the
configuration file (infrastructure.yaml) with a fallback to domain-based
detection for backward compatibility.

Changes:
- Modify getOssForcePathStyle to accept componentConfig parameter
- Prioritize reading force_path_style from s3_config in infrastructure.yaml
- Fallback to domain-based detection when config is not set

Benefits:
- Flexibility to configure force_path_style for any S3-compatible storage
- Easier integration with different object storage backends (MinIO, RustFS, etc.)
- Maintains backward compatibility with existing deployments
@CLAassistant
Copy link

CLAassistant commented Feb 9, 2026

CLA assistant check
All committers have signed the CLA.

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.

2 participants