Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/deployment/presto-clp/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
retries: 30

presto-worker:
image: "ghcr.io/y-scope/presto/prestissimo-worker:${CLP_PRESTO_WORKER_IMAGE_TAG:-clp-v0.10.0}"
image: "ghcr.io/y-scope/presto/prestissimo-worker:${CLP_PRESTO_WORKER_IMAGE_TAG:-clp-v0.10.0-fix.1}"

Check failure on line 27 in tools/deployment/presto-clp/docker-compose.yaml

View workflow job for this annotation

GitHub Actions / lint-check (ubuntu-24.04)

27:101 [line-length] line too long (104 > 100 characters)
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
depends_on:
presto-coordinator:
condition: "service_healthy"
Expand Down
11 changes: 4 additions & 7 deletions tools/deployment/presto-clp/scripts/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def _add_clp_s3_env_vars(

s3_endpoint_url = _get_config_value(clp_config, f"{s3_config_key}.endpoint_url")
s3_region_code = _get_config_value(clp_config, f"{s3_config_key}.region_code")
s3_end_point = _resolve_s3_endpoint_url(s3_endpoint_url, s3_region_code, s3_bucket)
s3_end_point = _resolve_s3_endpoint_url(s3_endpoint_url, s3_region_code)

env_vars["PRESTO_WORKER_CLPPROPERTIES_S3_AUTH_PROVIDER"] = "clp_package"
env_vars["PRESTO_WORKER_CLPPROPERTIES_S3_ACCESS_KEY_ID"] = s3_access_key_id
Expand All @@ -297,23 +297,20 @@ def _add_clp_s3_env_vars(
return True


def _resolve_s3_endpoint_url(
endpoint_url: str | None, region_code: str | None, bucket_name: str
) -> str:
def _resolve_s3_endpoint_url(endpoint_url: str | None, region_code: str | None) -> str:
"""
Returns the resolved S3 endpoint URL, or constructs an AWS S3 URL if not provided.

:param endpoint_url: Custom S3 endpoint URL.
:param region_code: AWS region code.
:param bucket_name:
:return: The S3 endpoint URL.
"""
if endpoint_url is not None:
return endpoint_url.rstrip("/")

if region_code is None:
return f"https://{bucket_name}.s3.{AWS_S3_DOMAIN}"
return f"https://{bucket_name}.s3.{region_code}.{AWS_S3_DOMAIN}"
return f"https://s3.{AWS_S3_DOMAIN}"
return f"https://s3.{region_code}.{AWS_S3_DOMAIN}"


def _add_memory_env_vars(env_vars: dict[str, str]) -> bool:
Expand Down
Loading