Revert "[Misc] Add S3 environment variables for better support of MinIO." (#17021)

This commit is contained in:
Chauncey 2025-04-23 10:22:29 +08:00 committed by GitHub
parent 7e081ba7ca
commit 6bc1e30ef9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,12 +45,7 @@ def glob(s3=None,
list[str]: List of full S3 paths allowed by the pattern
"""
if s3 is None:
s3 = boto3.client(
's3',
aws_access_key_id=os.getenv("AWS_ACCESS_KEY_ID"),
aws_secret_access_key=os.getenv("AWS_SECRET_ACCESS_KEY"),
endpoint_url=os.getenv("AWS_ENDPOINT_URL"),
region_name=os.getenv("AWS_REGION_NAME"))
s3 = boto3.client("s3")
if not path.endswith("/"):
path = path + "/"
bucket_name, _, paths = list_files(s3,
@ -112,12 +107,7 @@ class S3Model:
"""
def __init__(self) -> None:
self.s3 = boto3.client(
's3',
aws_access_key_id=os.getenv("AWS_ACCESS_KEY_ID"),
aws_secret_access_key=os.getenv("AWS_SECRET_ACCESS_KEY"),
endpoint_url=os.getenv("AWS_ENDPOINT_URL"),
region_name=os.getenv("AWS_REGION_NAME"))
self.s3 = boto3.client('s3')
for sig in (signal.SIGINT, signal.SIGTERM):
existing_handler = signal.getsignal(sig)
signal.signal(sig, self._close_by_signal(existing_handler))