Skip to content

feat(deployment): Deploy Presto with stock images and install the CLP connector as a plugin. - #2439

Draft
jackluo923 wants to merge 18 commits into
y-scope:mainfrom
jackluo923:feat/clp-presto-connector-integration
Draft

feat(deployment): Deploy Presto with stock images and install the CLP connector as a plugin.#2439
jackluo923 wants to merge 18 commits into
y-scope:mainfrom
jackluo923:feat/clp-presto-connector-integration

Conversation

@jackluo923

@jackluo923 jackluo923 commented Jul 30, 2026

Copy link
Copy Markdown
Member

Description

Deploys Presto from the stock ghcr.io/y-scope/presto / presto-native images and installs the CLP connector into them at startup, so only the connector artifact needs to be published (no more CLP-specific Presto image builds).

  • Plugin install at startup: Compose gains a one-shot clp-plugin-presto-connector-init service, Helm an install-clp-plugin init container (new image.clpConnector values block); coordinator and worker wait on it before starting. The coordinator sets use-connector-provided-serialization-codecs, required for the worker to deserialize the connector's handles.
  • Image selection: each image is chosen with a single environment variable holding a complete reference, used as-is, so repository:tag, repository@digest, and repository:tag@digest all work: CLP_PRESTO_CONNECTOR_REF, CLP_PRESTO_COORDINATOR_REF, and CLP_PRESTO_WORKER_REF. For the connector, init.py verifies the image exists (local Docker daemon or registry) and writes the resolved reference into .env. Details in docs/src/dev-docs/testing-presto-connector.md.
  • Images pinned by digest: all three default to tag@digest, so the digest fixes what's pulled while the tag stays a human-readable label. The digests are those of the multi-arch manifest lists, so linux/amd64 and linux/arm64 still resolve per-platform. On the Helm side, clp.imageRef previously discarded the tag whenever a digest was set; it now renders all three forms and fails if neither is given. The Presto coordinator and worker templates were building references by hand rather than calling it, so image.presto{Coordinator,Worker}.digest was silently ignored — both now go through the helper.
  • Helm set-up scripts: --clp-connector-image mirrors --clp-package-image; overrides now resolve before helm install, so a bad ref fails loudly instead of silently using the chart default. Web UI and API server are exposed via NodePort so the kind cluster is reachable.
  • Adaptations to the stock images: the worker's config generation uses curl/python3 instead of apt-get/jq/wget/hostname (stock presto-native is CentOS-based) and fails loudly if node identity can't be resolved; the Compose Presto config dir is tmpfs, rebuilt fresh each start.

Connector version: deployment counterpart of y-scope/clp-plugin-presto-connector#36, now merged. 0.1.0-SNAPSHOT is published multi-arch (linux/amd64 + linux/arm64) and is the default here, so the out-of-the-box pull works without overrides. CLP intentionally pins the connector version it onboards.

Note that 0.1.0-SNAPSHOT is a moving tag, so each republish leaves the pinned digest valid but pointing at an image older than the label suggests. Re-pinning means updating the digest in docker-compose.yaml, init.py, and values.yaml together; docs/src/dev-docs/testing-presto-connector.md covers taking the manifest-list digest (docker inspect reports the single-platform one and is the wrong source).

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a breaking change. (Not a breaking change — the new stock presto/presto-native images are feature-compatible with the old CLP-baked ones they replace.)
  • Necessary docs have been updated, OR no docs need to be updated. (Connector image resolution in docs/src/user-docs/guides-using-presto.md, local testing in docs/src/dev-docs/testing-presto-connector.md.)

Validation performed

Docker Compose (end to end, local connector image)

  1. Started the CLP package (webui.query_engine: "presto", pre-compressed archives with 60 records).
  2. set-up-config.sh found the locally-built image and wrote it into .env.
  3. docker compose up -d: the installer exited 0, placing clp-plugin-presto-connector.jar in the coordinator's plugin dir and libclp-plugin-velox-connector.so + lib/ in the worker's; coordinator healthy, worker up.
  4. Worker node.properties has a real node.id/node.internal-address, so the curl/python3 path works.
  5. Queries through the connector: SHOW TABLESdefault; SELECT COUNT(*) → 60; SELECT * LIMIT 2 returned real rows, so handle deserialization works.

Helm / kind (end to end, local connector image)

  1. ./package-helm/set-up-test.sh --presto --clp-connector-image <repo>:0.1.0-SNAPSHOT, all other images at chart defaults; the script kind-loaded the image and set image.clpConnector.{repository,tag,pullPolicy=Never}.
  2. install-clp-plugin exited 0 on both pods before their main containers, with both plugins in place (the worker's via the shared presto-plugin emptyDir).
  3. In-cluster config generation works without apt-get/jq/wget/hostname: node.properties has the real pod name/IP, and the coordinator has use-connector-provided-serialization-codecs=true. The query path itself was covered in Compose above, with the same image and flag.

Published connector image

set-up-config.sh re-run against the live package regenerated a byte-identical .env, and an unresolvable reference fails without writing a partial .env. The published multi-arch image was pulled by digest on an aarch64 host and the installer ran against it, exiting 0 with both plugins in place.

Image references

The end-to-end runs above predate the switch to single-variable, digest-pinned references. That change was re-verified as follows.

With the connector image removed from the local daemon, docker compose up clp-plugin-presto-connector-init pulled it by the pinned reference (…:0.1.0-SNAPSHOT@sha256:d006b0ce…), the installer exited 0, and both plugins landed in the shared volumes (clp-plugin-presto-connector.jar for the coordinator; libclp-plugin-velox-connector.so and lib/ for the worker). The remaining checks:

  • All three pinned digests match their tags, and each is a manifest list (connector: amd64/arm64; presto: amd64/arm64/ppc64le; presto-native: amd64/arm64), so multi-arch resolution is preserved. A per-architecture digest would have broken the other architecture.
  • The four places defining a default — docker-compose.yaml (×3), init.py, and values.yaml (×3) — agree exactly.
  • helm template renders tag@digest, tag-only, and digest-only correctly, and fails with requires "tag" or "digest" when both are absent. The pre-existing digest-only kubectl pin is unchanged.
  • docker compose config resolves the connector, coordinator, and worker images, with and without overrides.
  • init.py resolves the default and honours an overriding CLP_PRESTO_CONNECTOR_REF; a locally-built image is accepted without a network round-trip, and an image that exists nowhere fails at setup naming the ref it tried.
  • task lint:yaml and task lint:check-py pass.

Summary by CodeRabbit

  • New Features
    • Added support for installing and configuring the Presto connector in Docker Compose and Kubernetes deployments.
    • Added connector image overrides, validation, local testing, and plugin installation for Presto coordinator and worker services.
    • Enabled connector-provided serialization codecs and CLP plugin loading.
  • Documentation
    • Added guidance for building, testing, installing, and validating the Presto connector.
  • Bug Fixes
    • Improved deployment reliability and error reporting when connector images cannot be loaded or found.

… connector as a plugin.

Replace the connector-baked Presto images with the upstream `ghcr.io/y-scope/presto` and `ghcr.io/y-scope/presto-native` images, and install the CLP connector into them at startup from a dedicated connector image, so that only the connector artifact needs to be published.

Docker Compose gains a one-shot `clp-plugin-presto-connector-init` service that populates shared plugin volumes; the Helm chart gains an equivalent `install-clp-plugin` init container backed by an `emptyDir`, selected via `image.clpConnector`. Both set the worker's `plugin.dir` and the coordinator's `use-connector-provided-serialization-codecs`, the latter being required for the worker to deserialize the connector's handles through its own codecs rather than through JSON, which the connector doesn't implement.

The stock `presto-native` image is CentOS-based rather than Ubuntu, so the worker's config generation can no longer rely on `apt-get`, `jq`, `wget`, or `hostname`; use `curl` and `python3`, which the image already ships. Resolving the node identity via assignments also ensures a failure aborts the script instead of silently writing empty values.

Mount the Compose config directory as tmpfs instead of a named volume so that it's rebuilt from the image and templates on every start, rather than retaining files seeded from a previously deployed image.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The PR adds Presto connector image resolution and validation, shared plugin installation for Docker Compose and Helm deployments, updated Presto configuration, and documentation for local connector image builds and testing.

Changes

Presto connector deployment

Layer / File(s) Summary
Connector image and local runtime
tools/deployment/presto-clp/scripts/init.py, tools/deployment/presto-clp/docker-compose.yaml, tools/deployment/presto-clp/...
The local runtime resolves connector images through Docker, installs the connector plugin into shared volumes, and updates coordinator and worker configuration generation.
Helm connector deployment
tools/deployment/package-helm/...
Helm setup scripts accept --clp-connector-image. The chart passes the image to coordinator and worker plugin init containers and updates Presto image settings.
Connector deployment documentation
docs/src/dev-docs/..., docs/src/user-docs/guides-using-presto.md
The documentation covers connector image builds, Docker Compose configuration, Helm kind testing, image precedence, and local testing commands.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • y-scope/clp#2020: Extends the Helm image-override mechanism to support the Presto connector image.
  • y-scope/clp#2305: Modifies Helm image configuration and shared image-argument handling for Presto connector images.

Suggested reviewers: junhaoliao

Sequence Diagram(s)

sequenceDiagram
  participant InitScript
  participant Docker
  participant ConnectorPlugin
  participant PrestoCoordinator
  participant PrestoWorker
  InitScript->>Docker: Resolve and validate connector image
  ConnectorPlugin->>Docker: Install plugin into shared volumes
  PrestoCoordinator->>ConnectorPlugin: Wait for successful initialization
  PrestoWorker->>ConnectorPlugin: Wait for successful initialization
  PrestoCoordinator->>ConnectorPlugin: Mount coordinator plugin volume
  PrestoWorker->>ConnectorPlugin: Mount worker plugin volume
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: deploying Presto with stock images and installing the CLP connector as a plugin.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

… and document local testing.

`init.py` now resolves `CLP_CONNECTOR_IMAGE`/`CLP_CONNECTOR_TAG` into `.env` instead of relying on the arm64-specific default in `docker-compose.yaml`. It tries, in order, a locally-built per-architecture tag (`<version>-<arch>`, via `docker image inspect`), a published multi-architecture tag (`<version>`, via `docker manifest inspect`), and a published per-architecture tag, erroring with an actionable message if none is found. This lets a connector built locally via `task package` (which only loads the building machine's `:<version>-<arch>` tag, since a multi-arch manifest can't be loaded into a local daemon) be picked up automatically, while published deployments use the multi-arch manifest.

`CLP_CONNECTOR_PREFER_LOCAL=false` flips the order to prefer the published multi-architecture image, so an upstream release can be tested even when a local build of the same version is loaded; `CLP_CONNECTOR_TAG`/`CLP_CONNECTOR_IMAGE`/`CLP_CONNECTOR_VERSION` override the resolution directly.

The inline default tag in `docker-compose.yaml` becomes the multi-arch `0.1.0-SNAPSHOT` (no arch suffix) since it's only used when `.env` is absent; `init.py`'s resolved tag is authoritative.

Add a short README under `tools/deployment/presto-clp` covering setup, the resolution order and its overrides, building the connector locally, and Helm (kind) local testing via `set-up-test.sh --presto --clp-connector-image=...` (the local-image path the Helm set-up scripts already wire up).
Move the connector-image-resolution and local-testing documentation out of a code-adjacent README under tools/deployment/presto-clp and into the docs tree: the user-facing resolution/override notes and the Helm --clp-connector-image flag go into guides-using-presto.md, and the developer content (building the connector image locally, the CLP_CONNECTOR_PREFER_LOCAL toggle, and the Helm kind recipe) goes into a new dev-docs page.
…ector images

Drop the :<version>-<arch> suffix scheme for locally-built connector images in
favor of the conventional Docker pattern: local builds and the published
multi-arch image share the same :<version> tag, and whatever is in the local
daemon wins (docker pull to go back to the published image). Matches the
corresponding change in clp-plugin-presto-connector.

init.py's three-candidate tag resolution (local per-arch, published multi-arch,
published per-arch) and CLP_CONNECTOR_PREFER_LOCAL collapse into a single
existence check: error if the tag is in neither the local daemon nor the
registry. The Helm default tag also loses its arm64 suffix, which was wrong on
amd64 hosts. Docs updated; the --clp-connector-image examples also switch to
the space-separated form the parser actually accepts.
CLP_CONNECTOR_IMAGE/TAG/VERSION were ambiguous (connector for what?); rename to
CLP_PRESTO_CONNECTOR_* to match the image repo (clp-plugin-presto-connector) and
the existing PRESTO_COORDINATOR_*/PRESTO_WORKER_* env var family. The vars are new
in this PR so there's no backward-compat to preserve. Also renames the same-named
internal shell variable in the Helm set-up scripts for consistency; the
--clp-connector-image CLI flag is unchanged.
@jackluo923
jackluo923 marked this pull request as ready for review August 1, 2026 02:13
@jackluo923
jackluo923 requested a review from a team as a code owner August 1, 2026 02:13

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/src/dev-docs/testing-presto-connector.md`:
- Around line 46-62: Update the Helm command examples in the
testing-presto-connector documentation to invoke set-up-test.sh from the
repository root using the tools/deployment/package-helm path, keeping the
existing arguments and image examples unchanged.

In `@docs/src/user-docs/guides-using-presto.md`:
- Around line 209-216: The note around set-up-config.sh should explicitly state
that setting CLP_PRESTO_CONNECTOR_TAG skips connector image validation. Clarify
that without an explicit tag, setup validates the image and rejects invalid tags
before writing .env, while an explicitly tagged image may fail later during
Compose startup.

In `@tools/deployment/package-helm/set-up-multi-dedicated-test.sh`:
- Around line 165-166: Update
tools/deployment/package-helm/set-up-multi-dedicated-test.sh at lines 165-166 to
resolve and validate get_image_helm_args output for the connector before
invoking helm install, exiting on failure instead of silently dropping the
override; apply the same checked-resolution pattern to
tools/deployment/package-helm/set-up-test.sh at lines 34-35.

In `@tools/deployment/presto-clp/scripts/init.py`:
- Around line 420-495: Introduce a shared Docker subprocess runner near
_image_exists_locally and _tag_exists_on_registry that applies a finite timeout,
catches OSError and subprocess.TimeoutExpired, logs the execution failure, and
returns False. Update both _image_exists_locally and _tag_exists_on_registry to
use this runner while preserving their existing command arguments and boolean
success behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b7d2e39b-09f7-4c81-88ad-07d96e2801f9

📥 Commits

Reviewing files that changed from the base of the PR and between 155fbda and 7b35238.

📒 Files selected for processing (18)
  • docs/src/dev-docs/index.md
  • docs/src/dev-docs/testing-presto-connector.md
  • docs/src/user-docs/guides-using-presto.md
  • tools/deployment/package-helm/.set-up-common.sh
  • tools/deployment/package-helm/Chart.yaml
  • tools/deployment/package-helm/set-up-multi-dedicated-test.sh
  • tools/deployment/package-helm/set-up-multi-shared-test.sh
  • tools/deployment/package-helm/set-up-test.sh
  • tools/deployment/package-helm/templates/configmap.yaml
  • tools/deployment/package-helm/templates/presto-coordinator-deployment.yaml
  • tools/deployment/package-helm/templates/presto-worker-deployment.yaml
  • tools/deployment/package-helm/values.yaml
  • tools/deployment/presto-clp/coordinator/config-template/config.properties
  • tools/deployment/presto-clp/coordinator/scripts/generate-configs.sh
  • tools/deployment/presto-clp/docker-compose.yaml
  • tools/deployment/presto-clp/scripts/init.py
  • tools/deployment/presto-clp/worker/config-template/config.properties
  • tools/deployment/presto-clp/worker/scripts/generate-configs.sh

Comment thread docs/src/dev-docs/testing-presto-connector.md
Comment thread docs/src/user-docs/guides-using-presto.md
Comment thread tools/deployment/package-helm/set-up-multi-dedicated-test.sh Outdated
Comment thread tools/deployment/presto-clp/scripts/init.py Outdated
…ample

The Helm testing example used ./package-helm/set-up-test.sh, which only
works from tools/deployment/. The script resolves its own directory via
BASH_SOURCE, so use the repo-root-relative path
tools/deployment/package-helm/set-up-test.sh instead — copy-pasteable from
the repository root. Arguments and image examples unchanged.
The connector-image note in the user guide said set-up-config.sh writes
the image into .env "after verifying it exists," which only holds for
CLP_PRESTO_CONNECTOR_IMAGE/VERSION. An explicit CLP_PRESTO_CONNECTOR_TAG
is written as-is and skips the existence check (init.py returns early
without calling _connector_image_available), so an invalid tag surfaces
later during docker compose up. Distinguish the two cases so users know
when validation happens and when it does not.
get_image_helm_args was invoked inline as $(...) in the helm install
command, so its non-zero exit (invalid image ref, or image absent from
the local Docker daemon) was silently swallowed: helm install fell back
to the chart-default image with no error. Resolve the overrides into
Helm --set flags up front and exit 1 on failure in set-up-test.sh and
set-up-multi-dedicated-test.sh.

Also make get_image_helm_args check `kind load` explicitly. A bare
`kind load ...` relied on errexit, but the caller's
`$(...) ... || exit 1` pattern suspends errexit inside the command
substitution, so a kind-load failure would be ignored and we would
proceed with pullPolicy=Never for an image never loaded. Return 1
explicitly so every failure mode propagates.
Add _run_docker_probe: a shared runner for the Docker CLI probes used to
check the connector image. It applies a finite timeout and catches
OSError and subprocess.TimeoutExpired, logging the failure and returning
False so a hung Docker daemon or an unresponsive registry does not stall
set-up-config.sh indefinitely.

Inline the two one-line wrappers (_image_exists_locally and
_tag_exists_on_registry) into _connector_image_available — each was
called once and the call site already distinguishes local daemon vs
registry in its log messages. Command arguments and boolean success
behavior are unchanged.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
docs/src/dev-docs/testing-presto-connector.md (2)

27-41: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Run the Compose commands from the stack directory.

If a reader follows this page from the repository root, ./scripts/set-up-config.sh and docker compose up -d do not resolve the presto-clp files. Add cd tools/deployment/presto-clp before the commands, or use explicit repository-root paths.

This repeats the command-path issue raised for the Helm examples in the previous review; the Helm block is corrected, but the Compose block still has the same failure mode.

Proposed fix
 The `presto-clp` Compose stack is in `tools/deployment/presto-clp`.

+cd tools/deployment/presto-clp
+
 ```shell
 ./scripts/set-up-config.sh <clp-package-dir>
 docker compose up -d
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/src/dev-docs/testing-presto-connector.md around lines 27 - 41, Update
the Compose instructions around the set-up-config.sh and docker compose up -d commands to first change into tools/deployment/presto-clp, so both
commands run from the presto-clp stack directory when starting the Compose
stack.


</details>

<!-- cr-comment:v1:7e31864d9af2b2d4a05ad5bd -->

---

`27-28`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _⚡ Quick win_

**Add version-aware links for deployment directories.**

Link `tools/deployment/presto-clp` and `tools/deployment/package-helm` to their GitHub directories with `DOCS_VAR_CLP_GIT_REF`. This lets readers open the directory for the documentation version that they are viewing.

Based on learnings, directory references in `docs/` should use version-aware GitHub URLs with `DOCS_VAR_CLP_GIT_REF`.






<details>
<summary>Proposed fix</summary>

```diff
-The `presto-clp` Compose stack is in `tools/deployment/presto-clp`.
+The `presto-clp` Compose stack is in
+[`tools/deployment/presto-clp`](https://github.com/y-scope/clp/tree/DOCS_VAR_CLP_GIT_REF/tools/deployment/presto-clp).

-The Helm chart's local-image path is wired into the set-up scripts in
-`tools/deployment/package-helm`, which load a local image into the `kind` cluster and set
+The Helm chart's local-image path is wired into the set-up scripts in
+[`tools/deployment/package-helm`](https://github.com/y-scope/clp/tree/DOCS_VAR_CLP_GIT_REF/tools/deployment/package-helm), which load a local image into the `kind` cluster and set

Also applies to: 48-50

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/src/dev-docs/testing-presto-connector.md` around lines 27 - 28, Update
the deployment directory references in the testing Presto connector
documentation, including the occurrences around the Compose stack and
configuration script, to use GitHub directory links parameterized by
DOCS_VAR_CLP_GIT_REF. Link tools/deployment/presto-clp and
tools/deployment/package-helm while preserving the surrounding documentation
text.

Source: Learnings

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@docs/src/dev-docs/testing-presto-connector.md`:
- Around line 27-41: Update the Compose instructions around the
`set-up-config.sh` and `docker compose up -d` commands to first change into
`tools/deployment/presto-clp`, so both commands run from the `presto-clp` stack
directory when starting the Compose stack.
- Around line 27-28: Update the deployment directory references in the testing
Presto connector documentation, including the occurrences around the Compose
stack and configuration script, to use GitHub directory links parameterized by
DOCS_VAR_CLP_GIT_REF. Link tools/deployment/presto-clp and
tools/deployment/package-helm while preserving the surrounding documentation
text.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 85b83494-edfe-49f5-bea8-59e32a0ec3c8

📥 Commits

Reviewing files that changed from the base of the PR and between 7b35238 and d8a3aa2.

📒 Files selected for processing (6)
  • docs/src/dev-docs/testing-presto-connector.md
  • docs/src/user-docs/guides-using-presto.md
  • tools/deployment/package-helm/.set-up-common.sh
  • tools/deployment/package-helm/set-up-multi-dedicated-test.sh
  • tools/deployment/package-helm/set-up-test.sh
  • tools/deployment/presto-clp/scripts/init.py

jackluo923 and others added 3 commits August 1, 2026 00:21
ruff TRY400 (stable under the pinned ruff<0.16) flags `logger.error`
inside an except clause. Switch the _run_docker_probe failure log to
`logger.exception(..., exc_info=e)`, matching the existing idiom in
_add_worker_env_vars. Behavior is unchanged: the probe still returns
False on OSError and subprocess.TimeoutExpired.

The CPY001 copyright-header notices surfaced by newer local ruff builds
are not failing CI — the repo caps ruff<0.16 (commit 40bee80, issue
y-scope#2422) to defer them, so they belong in a separate PR.
`ghcr.io/y-scope/clp-plugin-presto-connector:0.1.0-SNAPSHOT` is now published as
a multi-arch (linux/amd64 + linux/arm64) tag, so drop the three pre-merge TODOs
asking for the defaults to point at a released tag. The default values in
`init.py`, `docker-compose.yaml`, and `values.yaml` already named that tag and
are unchanged.

Also convert `set-up-multi-shared-test.sh` to resolve the image overrides into
Helm flags before `helm install`, matching `set-up-test.sh` and
`set-up-multi-dedicated-test.sh`. fed5c4c made an invalid or unloadable image
override fail loudly in those two scripts but missed this one, where the
override was still expanded inline inside the `helm install` command and a
failure was swallowed, silently falling back to the chart-default image.

Co-Authored-By: Claude <noreply@anthropic.com>
Both the dev page and the Compose set-up note in the user guide restated the
same image-resolution rules at length. Trim them to what a reader needs and let
the user guide defer to the dev page for the details.

`testing-presto-connector.md`: fold the two Helm examples into one concrete
command, and shorten the local-vs-published explanation.

`guides-using-presto.md`: shorten the `set-up-config.sh` note, and match the
surrounding notes' one-idea-per-sentence phrasing rather than chaining clauses.

Both files are added by this PR, so neither change reflows text that exists on
main.

Co-Authored-By: Claude <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/src/dev-docs/testing-presto-connector.md (1)

35-35: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use a repository-root path for the Compose setup command.

./scripts/set-up-config.sh works only when the current directory is tools/deployment/presto-clp. The page does not instruct the reader to change to that directory. From the repository root, the example fails. Use tools/deployment/presto-clp/scripts/set-up-config.sh or add an explicit directory-change step.

Proposed documentation fix
-./scripts/set-up-config.sh <clp-package-dir>
+tools/deployment/presto-clp/scripts/set-up-config.sh <clp-package-dir>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/src/dev-docs/testing-presto-connector.md` at line 35, Update the Compose
setup command in testing-presto-connector.md to use the repository-root path
tools/deployment/presto-clp/scripts/set-up-config.sh, or explicitly instruct
readers to change into tools/deployment/presto-clp before running the existing
command.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@docs/src/dev-docs/testing-presto-connector.md`:
- Line 35: Update the Compose setup command in testing-presto-connector.md to
use the repository-root path
tools/deployment/presto-clp/scripts/set-up-config.sh, or explicitly instruct
readers to change into tools/deployment/presto-clp before running the existing
command.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 28f844f4-ebc3-414e-8a56-f016ba3bb952

📥 Commits

Reviewing files that changed from the base of the PR and between 883e93a and 6bf710b.

📒 Files selected for processing (6)
  • docs/src/dev-docs/testing-presto-connector.md
  • docs/src/user-docs/guides-using-presto.md
  • tools/deployment/package-helm/set-up-multi-shared-test.sh
  • tools/deployment/package-helm/values.yaml
  • tools/deployment/presto-clp/docker-compose.yaml
  • tools/deployment/presto-clp/scripts/init.py
💤 Files with no reviewable changes (3)
  • tools/deployment/package-helm/values.yaml
  • tools/deployment/presto-clp/scripts/init.py
  • tools/deployment/presto-clp/docker-compose.yaml

jackluo923 and others added 3 commits August 2, 2026 01:09
The rationale comment for resolving image overrides before `helm install` was
five lines repeated verbatim in all three set-up scripts, and the `kind load`
check carried a five-line walkthrough of the `errexit` interaction. Keep the
non-obvious part of each (that `errexit` is suspended inside the caller's
command substitution, and that the failure mode is a silent fall back to the
chart default) and drop the restatement.

Also restore the blank line after `sleep 2` in `set-up-multi-shared-test.sh` so
it matches its two sibling scripts.

Co-Authored-By: Claude <noreply@anthropic.com>
Collapse the two exit paths in `_add_connector_image_env_vars` into one: both
wrote the same pair of env vars, so resolve the tag first and assign once.

Drop the `docker_executable` parameter from `_run_docker_probe`. It was always
the same literal, threaded through two functions; hoist it to
`_DOCKER_EXECUTABLE` alongside the timeout constant.

Trim the comments to what isn't already evident from the code. The module
constant comment restated the function's docstring, the docstring restated the
local-vs-published behaviour already covered in `testing-presto-connector.md`,
and the probe call sites were annotated with what their own log lines say.

No behaviour change: defaults resolve, an explicit `CLP_PRESTO_CONNECTOR_TAG`
still bypasses the check, an unavailable image still fails without writing a
partial env var set, and the local and registry probes are unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
…and select each with a single image reference.

The connector image was selected through three environment variables (`CLP_PRESTO_CONNECTOR_IMAGE`,
`_VERSION`, and `_TAG`) that were concatenated with a hardcoded ":", so a digest couldn't be
expressed at all. Each image is now chosen with one variable holding a complete reference, used
as-is, so `repository:tag`, `repository@digest`, and `repository:tag@digest` all work:

* `CLP_PRESTO_CONNECTOR_REF`
* `CLP_PRESTO_COORDINATOR_REF`
* `CLP_PRESTO_WORKER_REF`

All three now default to `tag@digest`: the digest pins what's actually pulled, while the tag stays
as a human-readable label. The digests are those of the multi-arch manifest lists, so both
linux/amd64 and linux/arm64 continue to resolve.

On the Helm side, `clp.imageRef` previously discarded the tag whenever a digest was set, so it
could render only two of the three forms; it now renders all three and fails if neither is given.
The Presto coordinator and worker templates were building their references by hand instead of
calling it, which meant `image.presto{Coordinator,Worker}.digest` was silently ignored; both now
go through the helper.
@jackluo923
jackluo923 marked this pull request as draft August 7, 2026 06:41
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.

1 participant