This is an automated email from the ASF dual-hosted git repository.

github-merge-queue[bot] pushed a commit to branch 
gh-readonly-queue/main/pr-9556-6a16e1a58926368a3e9ea4cfad61cfb20daacd26
in repository https://gitbox.apache.org/repos/asf/texera.git

commit 02c8e120cf46b77c4988ab977cef35bf1608adcc
Author: Meng Wang <[email protected]>
AuthorDate: Mon Nov 23 19:40:18 2026 +0000

    feat(result-service, single-node): deploy the result service (#9556)
    
    ### What changes were proposed in this PR?
    
    result-service (#9356) is built and tested in CI, but nothing runs it.
    This PR deploys it in the single-node Docker Compose stack: it publishes
    an image for it, runs it, and routes `/api/results/` to it through
    nginx. Nothing calls it yet; #8996 moves the result panel over.
    
    - `bin/dockerfiles/result-service.dockerfile` (new) is
    `file-service.dockerfile` with the service's name and port (9102).
    - `build-and-push-images.yml` maps it to `texera-result-service`, the
    prefix every other image uses.
    - `docker-compose.yml` starts it once Postgres and Lakekeeper are up and
    the warehouse is created, as the computing unit does, and nginx waits
    for it like the other services. It needs no new `.env` values: it reads
    the database, Lakekeeper and object storage settings the stack already
    has.
    - `nginx.conf` routes `/api/results/` to it; the longer prefix wins over
    the `/api/` catch-all. `docker-compose.observability.yml` turns its
    tracing on like the other services.
    
    ### Any related issues, documentation, discussions?
    
    Closes #9637. Part of #8995. Mirrors #7932, which deployed
    notebook-migration-service the same way. Local-dev and Kubernetes follow
    in separate PRs.
    
    ### How was this PR tested?
    
    - Built the image from the new Dockerfile and ran the stack with it;
    every container came up healthy.
    - Through nginx, a read without a token is refused (401). With one, a
    missing execution gets 403 and a workflow with no run gets 404, both
    from result-service.
    - Ran the Iris example workflow into a per-user warehouse, then read it
    through nginx: its latest execution, its results, a first and a last
    page of the CSV scan, the column statistics, and a scatter plot's HTML
    whole.
    - `docker compose config` passes with and without the observability
    overlay, and `test_single_node_sh.sh`, `test_load_examples_sh.sh` and
    `test_create_release_tarballs.sh` pass.
    
    ### Was this PR authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Code (claude-opus-5-5)
---
 .github/workflows/build-and-push-images.yml      |  3 +
 bin/dockerfiles/result-service.dockerfile        | 83 ++++++++++++++++++++++++
 bin/single-node/docker-compose.observability.yml |  3 +
 bin/single-node/docker-compose.yml               | 23 +++++++
 bin/single-node/nginx.conf                       |  6 ++
 5 files changed, 118 insertions(+)

diff --git a/.github/workflows/build-and-push-images.yml 
b/.github/workflows/build-and-push-images.yml
index 558d798a7a..3fd91f37d6 100644
--- a/.github/workflows/build-and-push-images.yml
+++ b/.github/workflows/build-and-push-images.yml
@@ -288,6 +288,9 @@ jobs:
                 "jupyter")
                   image_name="texera-jupyter"
                   ;;
+                "result-service")
+                  image_name="texera-result-service"
+                  ;;
                 *)
                   # Default: use service name as-is
                   image_name="$service"
diff --git a/bin/dockerfiles/result-service.dockerfile 
b/bin/dockerfiles/result-service.dockerfile
new file mode 100644
index 0000000000..7d25616989
--- /dev/null
+++ b/bin/dockerfiles/result-service.dockerfile
@@ -0,0 +1,83 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Apache Texera is an effort undergoing incubation at The Apache Software
+# Foundation (ASF), sponsored by the Apache Incubator PMC. Incubation is
+# required of all newly accepted projects until a further review indicates
+# that the infrastructure, communications, and decision-making process have
+# stabilized in a manner consistent with other successful ASF projects.
+# While incubation status is not necessarily a reflection of the
+# completeness or stability of the code, it does indicate that the project
+# has yet to be fully endorsed by the ASF.
+
+FROM 
docker.io/sbtscala/scala-sbt:eclipse-temurin-jammy-17.0.5_8_1.9.3_2.13.11@sha256:c20fad6183112843d6c87fd54bb9b507a424ab7893c6a570b1624acf2e0324c4
 AS build
+
+# Set working directory
+WORKDIR /texera
+
+# Copy modules for building the service
+COPY common/ common/
+COPY result-service/ result-service/
+COPY project/ project/
+COPY build.sbt build.sbt
+COPY .jvmopts .jvmopts
+
+# Update system and install dependencies
+ARG PACKAGE_SNAPSHOT
+RUN --mount=type=bind,source=bin/dockerfiles/snapshot,target=/snapshot \
+    bash /snapshot/install.sh apt netcat unzip libpq-dev
+
+COPY LICENSE NOTICE DISCLAIMER ./
+COPY licenses/ licenses/
+
+# Pins jar and dist-zip entry timestamps; pass the commit time
+# (git log -1 --format=%ct) for a reproducible build.
+ARG SOURCE_DATE_EPOCH
+RUN sbt clean ResultService/dist
+
+# Unzip the texera binary
+RUN unzip result-service/target/universal/result-service-*.zip -d target/
+
+FROM 
docker.io/library/eclipse-temurin:17-jre-jammy@sha256:97137382c6f0c30427d9b7c44ad8b2d55ac823b0768c171d81a643ed219023c5
 AS runtime
+
+WORKDIR /texera
+
+# Copy the built texera binary from the build phase
+COPY --from=build /texera/target/result-service-* /texera/
+# Copy resources directories from build phase
+COPY --from=build /texera/common/config/src/main/resources 
/texera/common/config/src/main/resources
+COPY --from=build /texera/result-service/src/main/resources 
/texera/result-service/src/main/resources
+# Copy ASF licensing files. LICENSE-binary and NOTICE-binary describe the
+# bundled third-party contents of this image and ship as /texera/LICENSE
+# and /texera/NOTICE; licenses/ holds the per-license full texts referenced
+# by LICENSE-binary.
+COPY --from=build /texera/result-service/LICENSE-binary /texera/LICENSE
+COPY --from=build /texera/result-service/NOTICE-binary /texera/NOTICE
+COPY --from=build /texera/licenses /texera/licenses
+COPY --from=build /texera/DISCLAIMER /texera/
+
+# Dates the texera account in /etc/shadow; pass the commit time
+# (git log -1 --format=%ct) for a reproducible build.
+ARG SOURCE_DATE_EPOCH
+RUN groupadd --system --gid 1001 texera \
+ && useradd --system --uid 1001 --gid texera --home-dir /texera 
--no-create-home texera \
+ && chown -R texera:texera /texera
+USER texera
+
+CMD ["bin/result-service"]
+
+EXPOSE 9102
diff --git a/bin/single-node/docker-compose.observability.yml 
b/bin/single-node/docker-compose.observability.yml
index a3adf91311..b6316f01f3 100644
--- a/bin/single-node/docker-compose.observability.yml
+++ b/bin/single-node/docker-compose.observability.yml
@@ -39,6 +39,9 @@ services:
   notebook-migration-service:
     environment:
       OTEL_SDK_DISABLED: "false"
+  result-service:
+    environment:
+      OTEL_SDK_DISABLED: "false"
   workflow-compiling-service:
     environment:
       OTEL_SDK_DISABLED: "false"
diff --git a/bin/single-node/docker-compose.yml 
b/bin/single-node/docker-compose.yml
index fc9d26cd48..9022e63775 100644
--- a/bin/single-node/docker-compose.yml
+++ b/bin/single-node/docker-compose.yml
@@ -529,6 +529,28 @@ services:
       retries: 5
       start_period: 15s
 
+  # ResultService serves the results of executions, so they can be read 
without a computing unit.
+  # It reads them through Lakekeeper, so it needs 
STORAGE_ICEBERG_CATALOG_TYPE=rest (the default).
+  # With postgres, result tables are the computing unit's local files, which 
this does not mount.
+  result-service:
+    image: 
${IMAGE_REGISTRY:-ghcr.io/apache}/texera-result-service:${IMAGE_TAG:-latest}
+    container_name: result-service
+    restart: unless-stopped
+    depends_on:
+      postgres:
+        condition: service_healthy
+      lakekeeper:
+        condition: service_healthy
+      lakekeeper-init:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    healthcheck:
+      test: ["CMD", "curl", "-sf", "http://localhost:9102/api/healthcheck";]
+      interval: 5s
+      timeout: 3s
+      retries: 10
+
   # Part 3: reverse proxy service for Texera's micro services
   nginx:
     image: nginx:1.30.5-alpine
@@ -543,6 +565,7 @@ services:
       - workflow-computing-unit-managing-service
       - agent-service
       - notebook-migration-service
+      - result-service
     volumes:
       - ./nginx.conf:/etc/nginx/nginx.conf:ro
     ports:
diff --git a/bin/single-node/nginx.conf b/bin/single-node/nginx.conf
index 2a795c013d..2ba3772bf1 100644
--- a/bin/single-node/nginx.conf
+++ b/bin/single-node/nginx.conf
@@ -118,6 +118,12 @@ http {
             proxy_set_header X-Real-IP $remote_addr;
         }
 
+        location /api/results/ {
+            proxy_pass http://result-service:9102;
+            proxy_set_header Host $host;
+            proxy_set_header X-Real-IP $remote_addr;
+        }
+
         location /api/pve/ {
             proxy_pass http://workflow-runtime-coordinator-service:8085;
             proxy_set_header Host $host;

Reply via email to