fix: Restore ca-certificates and tzdata in the worker runtime image (fixes #153).#154
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change adds a conditional block to the prestissimo-runtime Dockerfile final stage that installs ca-certificates and tzdata packages via apt when apt-get is available. The block updates package lists, installs packages with minimal dependencies, and cleans up cached files. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
d10e6a4
into
y-scope:release-0.297-edge-10-clp-connector
Description
Problem
PR #147 (upstream
release-0.297-edge10merge) overwroteprestissimo-runtime.dockerfile, dropping theca-certificatesandtzdatapackages originally added in PR #55. Without
ca-certificates, the Prestissimoworker cannot verify TLS certificates when accessing presigned S3 URLs — queries
complete with no error but return zero rows. Without
tzdata, the worker hitsthe timezone issue described in
prestodb#25531.
Root cause
The CI workflow builds the runtime image with
BASE_IMAGE=ubuntu:22.04:presto/.github/workflows/prestissimo-worker-images-build.yml
Line 57 in 33e9de0
The bare
ubuntu:22.04image does not ship withca-certificatesortzdata, so the runtime image had no CA trust store (/etc/ssl/certs/wasempty) and no timezone data. The Velox/libcurl S3 client looks for certs at
/etc/ssl/certs/and silently fails TLS verification when the directory ismissing.
Fix
Auto-detect
apt-getat build time and installca-certificatesandtzdataif present. CentOS Stream 9 already bundles both, so only Debian/Ubuntu base
images need the explicit install. This avoids coupling to the
OSNAMEARG,which can be overridden by CI or
docker build --build-argindependently ofBASE_IMAGE.Checklist
breaking change.
Validation performed
1. Confirm the published image is missing
ca-certificatesandtzdataTask: Verify that the existing worker image (
clp-v0.10.0) has no SSLcertificate or timezone files, confirming the regression.
Command:
Output:
Explanation: The published image has zero SSL certificate files and no
timezone data. This confirms the regression from PR #147.
2. Build the full runtime image and verify both packages are installed
Task: Build the full
prestissimo-runtimeimage using the same build argsas CI and confirm both
ca-certificatesandtzdataare present.Command:
Verification:
Explanation: The full multi-stage build completes successfully — stage 1
compiles
presto_serverfrom source using the dependency image, and stage 2produces the runtime image with
ca-certificatesandtzdatainstalled. Bothpackages are confirmed present via
dpkg -l, and the actual certificate(
/etc/ssl/certs/ca-certificates.crt) and timezone files (/usr/share/zoneinfo/)are present on disk.
3. E2E Testing Infra
Check out y-scope/clp#2004 and apply below patch
then configure
tools/deployment/package-helm/values.yaml:then run
and observed
Create a compression job in the webui http://localhost:30000/ingest with
/home/junhao/samples/postgresql.jsonlthen perform a search on http://localhost:30000/search
then observed results were returned:

Summary by CodeRabbit