You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "mengw15 (via GitHub)" <gi...@apache.org> on 2026/03/09 11:19:03 UTC

[PR] feat: introduce Result Service using Lakekeeper as REST catalog for Iceberg - single-node deployment [texera]

mengw15 opened a new pull request, #4274:
URL: https://github.com/apache/texera/pull/4274

   <!--
   Thanks for sending a pull request (PR)! Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: 
        [Contributing to Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md)
     2. Ensure you have added or run the appropriate tests for your PR
     3. If the PR is work in progress, mark it a draft on GitHub.
     4. Please write your PR title to summarize what this PR proposes, we 
       are following Conventional Commits style for PR titles as well.
     5. Be sure to keep the PR description updated to reflect all changes.
   -->
   
   ### What changes were proposed in this PR?
   <!--
   Please clarify what changes you are proposing. The purpose of this section 
   is to outline the changes. Here are some tips for you:
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
     3. If it is a refactoring, clarify what has been changed.
     3. It would be helpful to include a before-and-after comparison using 
        screenshots or GIFs.
     4. Please consider writing useful notes for better and faster reviews.
   -->
   
   This is PR 3 of a decomposed series from #4242, updating the single-node Docker Compose deployment to integrate Lakekeeper 
     as the Iceberg REST catalog.                                                                                               
                                                                                                                                
     **Changes to `bin/single-node/docker-compose.yml`:**                                                                       
     - Added `lakekeeper-migrate` init container: runs database migration before Lakekeeper starts                              
     - Added `lakekeeper` service (`vakamo/lakekeeper:v0.11.0`): REST catalog server with health checks                         
     - Added `lakekeeper-init` container: bootstraps default project, creates MinIO bucket, and configures warehouse            
     - Made MinIO port configurable via `${MINIO_PORT:-9000}`                                                                   
     - Updated SQL mount path from `../../sql` to `./sql`                                                                       
     - Updated compose project name to `texera-single-node`                                                                     
                                                                                                                                
     **Changes to `bin/single-node/.env`:**
     - Added Lakekeeper config: database URLs, encryption key, base URI
     - Added REST catalog config: warehouse name, S3 bucket, region, catalog URI
     - Set `STORAGE_ICEBERG_CATALOG_TYPE=rest`
     - Added `IMAGE_REGISTRY`, `IMAGE_TAG`, `TEXERA_PORT`, `MINIO_PORT`, `TEXERA_SERVICE_LOG_LEVEL` variables
   
   
   
   ### Any related issues, documentation, discussions?
   <!--
   Please use this section to link other resources if not mentioned already.
     1. If this PR fixes an issue, please include `Fixes #1234`, `Resolves #1234`
        or `Closes #1234`. If it is only related, simply mention the issue number.
     2. If there is design documentation, please add the link.
     3. If there is a discussion in the mailing list, please add the link.
   -->
   
   Part of #4126. Depends on #4272 (catalog migration).
   
   ### How was this PR tested?
   <!--
   If tests were added, say they were added here. Or simply mention that if the PR 
   is tested with existing test cases.  Make sure to include/update test cases that
   check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how
   you tested step by step, ideally copy and paste-able, so that other reviewers can
   test and check, and descendants can verify in the future. If tests were not added, 
   please describe why they were not added and/or why it was difficult to add. 
   -->
   
   Manually tested
   
   ### Was this PR authored or co-authored using generative AI tooling?
   <!--
   If generative AI tooling has been used in the process of authoring this PR, 
   please include the phrase: 'Generated-by: ' followed by the name of the tool 
   and its version. If no, write 'No'. 
   Please refer to the [ASF Generative Tooling Guidance](https://www.apache.org/legal/generative-tooling.html) for details.
   -->
   
   co-authored with Claude


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(docker-compose): use Lakekeeper as the Iceberg Catalog when launching via `docker compose` [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on code in PR #4274:
URL: https://github.com/apache/texera/pull/4274#discussion_r3114584063


##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +105,132 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts
+  lakekeeper-migrate:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper-migrate
+    depends_on:
+      postgres:
+        condition: service_healthy
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["migrate"]
+
+  # Lakekeeper is the Iceberg REST catalog service
+  lakekeeper:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper
+    restart: always
+    depends_on:
+      postgres:
+        condition: service_healthy
+      minio:
+        condition: service_started
+      lakekeeper-migrate:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["serve"]
+    healthcheck:
+      test: ["CMD", "/home/nonroot/lakekeeper", "healthcheck"]
+      interval: 10s
+      timeout: 5s
+      retries: 10
+      start_period: 10s
+
+  # One-shot init container that creates the Lakekeeper default project and
+  # the Iceberg warehouse pointing at the MinIO bucket prepared by minio-init.
+  lakekeeper-init:
+    image: alpine:3.19
+    container_name: texera-lakekeeper-init
+    depends_on:
+      lakekeeper:
+        condition: service_healthy
+      minio-init:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: [ "/bin/sh", "-c" ]
+    command:
+      - |
+        set -e
+
+        echo "Installing dependencies..."
+        apk add --no-cache curl ca-certificates
+
+        check_status() {
+          if [ "$$1" -ge 200 ] && [ "$$1" -lt 300 ]; then
+            echo "Created $$2 successfully (HTTP $$1)."
+          elif [ "$$1" -eq 409 ]; then
+            echo "$$2 already exists (HTTP 409). Treating as success."
+          else
+            echo "Failed to create $$2. HTTP Code: $$1"
+            echo "ERROR RESPONSE:"
+            if [ -f /tmp/response.txt ]; then cat /tmp/response.txt; fi
+            echo ""
+            exit 1
+          fi
+        }
+
+        echo "Step 1: Initializing Default Project..."
+        PROJECT_PAYLOAD='{"project-id": "00000000-0000-0000-0000-000000000000", "project-name": "default"}'
+
+        PROJECT_CODE=$$(curl -s -o /tmp/response.txt -w "%{http_code}" \
+            -X POST \
+            -H "Content-Type: application/json" \
+            -d "$$PROJECT_PAYLOAD" \
+            "$$LAKEKEEPER_BASE_URI/management/v1/project" || echo "000")
+
+        check_status "$$PROJECT_CODE" "Default Project"
+
+
+        echo "Step 2: Initializing Warehouse '$$STORAGE_ICEBERG_CATALOG_REST_WAREHOUSE_NAME'..."
+        CREATE_PAYLOAD=$$(cat <<EOF
+        {
+          "warehouse-name": "$$STORAGE_ICEBERG_CATALOG_REST_WAREHOUSE_NAME",
+          "project-id": "00000000-0000-0000-0000-000000000000",
+          "storage-profile": {
+            "type": "s3",
+            "bucket": "$$STORAGE_ICEBERG_CATALOG_REST_S3_BUCKET",
+            "region": "$$STORAGE_S3_REGION",
+            "endpoint": "$$STORAGE_S3_ENDPOINT",
+            "flavor": "s3-compat",
+            "path-style-access": true,
+            "sts-enabled": false
+          },
+          "storage-credential": {
+            "type": "s3",
+            "credential-type": "access-key",
+            "aws-access-key-id": "$$STORAGE_S3_AUTH_USERNAME",
+            "aws-secret-access-key": "$$STORAGE_S3_AUTH_PASSWORD"
+          }
+        }
+        EOF
+        )
+
+        WAREHOUSE_CODE=$$(curl -s -o /tmp/response.txt -w "%{http_code}" \
+            -X POST \
+            -H "Content-Type: application/json" \
+            -d "$$CREATE_PAYLOAD" \
+            "$$LAKEKEEPER_BASE_URI/management/v1/warehouse" || echo "000")
+
+        # Lakekeeper returns 400 CreateWarehouseStorageProfileOverlap when a

Review Comment:
   The 400 CreateWarehouseStorageProfileOverlap branch below here already gives us the "skip if exists" behavior — if the warehouse is already there, Lakekeeper returns 400 with that specific error code and we treat it as success, so re-runs are idempotent. 
   
   I also checked the explicit pre-check option. Lakekeeper does not seem to provide a lookup-by-name API; we would need to list warehouses and parse the JSON response by name, which adds extra script complexity for the same outcome. But if we feel explicit pre-check would be better, I am willing to change it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(docker-compose): use Lakekeeper as the Iceberg Catalog when launching via `docker compose` [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on code in PR #4274:
URL: https://github.com/apache/texera/pull/4274#discussion_r3120828661


##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +105,153 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts
+  lakekeeper-migrate:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper-migrate
+    depends_on:
+      postgres:
+        condition: service_healthy
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["migrate"]
+
+  # Lakekeeper is the Iceberg REST catalog service
+  lakekeeper:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper
+    restart: always
+    depends_on:
+      postgres:
+        condition: service_healthy
+      minio:
+        condition: service_started
+      lakekeeper-migrate:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["serve"]
+    healthcheck:
+      test: ["CMD", "/home/nonroot/lakekeeper", "healthcheck"]
+      interval: 10s
+      timeout: 5s
+      retries: 10
+      start_period: 10s
+
+  # One-shot init container that creates the Lakekeeper default project and
+  # the Iceberg warehouse pointing at the MinIO bucket prepared by minio-init.
+  lakekeeper-init:
+    image: alpine:3.19
+    container_name: texera-lakekeeper-init
+    depends_on:
+      lakekeeper:
+        condition: service_healthy
+      minio-init:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: [ "/bin/sh", "-c" ]
+    command:
+      - |
+        set -e
+
+        # curl is used to call Lakekeeper's management API over the internal
+        # Docker network; jq parses list responses so we can detect existing
+        # resources before deciding to create them (keeps init idempotent).
+        echo "Installing curl (to call Lakekeeper's management API) and jq (to parse its list responses)..."
+        apk add --no-cache curl jq
+
+        check_status() {
+          if [ "$$1" -ge 200 ] && [ "$$1" -lt 300 ]; then
+            echo "Created $$2 successfully (HTTP $$1)."
+          elif [ "$$1" -eq 409 ]; then
+            echo "$$2 already exists (HTTP 409). Treating as success."

Review Comment:
   Thanks for catching this! 409 was still used for project creation, now I added pre check for project creating as well, and removed check_status()



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(docker-compose): use Lakekeeper as the Iceberg Catalog when launching via `docker compose` [texera]

Posted by "bobbai00 (via GitHub)" <gi...@apache.org>.
bobbai00 commented on code in PR #4274:
URL: https://github.com/apache/texera/pull/4274#discussion_r3120421924


##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +105,153 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts
+  lakekeeper-migrate:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper-migrate
+    depends_on:
+      postgres:
+        condition: service_healthy
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["migrate"]
+
+  # Lakekeeper is the Iceberg REST catalog service
+  lakekeeper:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper
+    restart: always
+    depends_on:
+      postgres:
+        condition: service_healthy
+      minio:
+        condition: service_started
+      lakekeeper-migrate:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["serve"]
+    healthcheck:
+      test: ["CMD", "/home/nonroot/lakekeeper", "healthcheck"]
+      interval: 10s
+      timeout: 5s
+      retries: 10
+      start_period: 10s
+
+  # One-shot init container that creates the Lakekeeper default project and
+  # the Iceberg warehouse pointing at the MinIO bucket prepared by minio-init.
+  lakekeeper-init:
+    image: alpine:3.19
+    container_name: texera-lakekeeper-init
+    depends_on:
+      lakekeeper:
+        condition: service_healthy
+      minio-init:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: [ "/bin/sh", "-c" ]
+    command:
+      - |
+        set -e
+
+        # curl is used to call Lakekeeper's management API over the internal

Review Comment:
   remove these comments



##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +105,153 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts
+  lakekeeper-migrate:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper-migrate
+    depends_on:
+      postgres:
+        condition: service_healthy
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["migrate"]
+
+  # Lakekeeper is the Iceberg REST catalog service
+  lakekeeper:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper
+    restart: always
+    depends_on:
+      postgres:
+        condition: service_healthy
+      minio:
+        condition: service_started
+      lakekeeper-migrate:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["serve"]
+    healthcheck:
+      test: ["CMD", "/home/nonroot/lakekeeper", "healthcheck"]
+      interval: 10s
+      timeout: 5s
+      retries: 10
+      start_period: 10s
+
+  # One-shot init container that creates the Lakekeeper default project and
+  # the Iceberg warehouse pointing at the MinIO bucket prepared by minio-init.
+  lakekeeper-init:
+    image: alpine:3.19
+    container_name: texera-lakekeeper-init
+    depends_on:
+      lakekeeper:
+        condition: service_healthy
+      minio-init:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: [ "/bin/sh", "-c" ]
+    command:
+      - |
+        set -e
+
+        # curl is used to call Lakekeeper's management API over the internal
+        # Docker network; jq parses list responses so we can detect existing
+        # resources before deciding to create them (keeps init idempotent).
+        echo "Installing curl (to call Lakekeeper's management API) and jq (to parse its list responses)..."
+        apk add --no-cache curl jq
+
+        check_status() {
+          if [ "$$1" -ge 200 ] && [ "$$1" -lt 300 ]; then
+            echo "Created $$2 successfully (HTTP $$1)."
+          elif [ "$$1" -eq 409 ]; then
+            echo "$$2 already exists (HTTP 409). Treating as success."

Review Comment:
   We should not 409 as success anymore, right? 



##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +105,153 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts

Review Comment:
   What does `migrate` mean? 



##########
bin/single-node/docker-compose.yml:
##########
@@ -26,9 +26,37 @@ services:
       - "${MINIO_PORT:-9000}:9000"
     env_file:
       - .env
+    environment:
+      - MINIO_ROOT_USER=${STORAGE_S3_AUTH_USERNAME}
+      - MINIO_ROOT_PASSWORD=${STORAGE_S3_AUTH_PASSWORD}
     volumes:
       - minio_data:/data
     command: server --console-address ":9001" /data
+    healthcheck:
+      test: ["CMD", "curl", "-sf", "http://localhost:9000/minio/health/live"]
+      interval: 5s
+      timeout: 3s
+      retries: 10
+
+  # One-shot init container that creates the Iceberg warehouse bucket on first
+  # startup. MinIO's server image has no built-in "create bucket on boot" flag,
+  # so this sidecar uses the official `mc` client to do it idempotently.

Review Comment:
   can you remove the sentences like "so this sidecar...idempotently". Comments should describe what this corresponding piece will do, and what consequence it will bring.
   
   I will write the comment as: "This job will create a bucket used for workflow result storage, which is managed by the Lakekeeper service"



##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +105,153 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts
+  lakekeeper-migrate:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper-migrate
+    depends_on:
+      postgres:
+        condition: service_healthy
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["migrate"]
+
+  # Lakekeeper is the Iceberg REST catalog service
+  lakekeeper:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper
+    restart: always
+    depends_on:
+      postgres:
+        condition: service_healthy
+      minio:
+        condition: service_started
+      lakekeeper-migrate:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["serve"]
+    healthcheck:
+      test: ["CMD", "/home/nonroot/lakekeeper", "healthcheck"]
+      interval: 10s
+      timeout: 5s
+      retries: 10
+      start_period: 10s
+
+  # One-shot init container that creates the Lakekeeper default project and
+  # the Iceberg warehouse pointing at the MinIO bucket prepared by minio-init.
+  lakekeeper-init:
+    image: alpine:3.19
+    container_name: texera-lakekeeper-init
+    depends_on:
+      lakekeeper:
+        condition: service_healthy
+      minio-init:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: [ "/bin/sh", "-c" ]
+    command:
+      - |
+        set -e
+
+        # curl is used to call Lakekeeper's management API over the internal
+        # Docker network; jq parses list responses so we can detect existing
+        # resources before deciding to create them (keeps init idempotent).
+        echo "Installing curl (to call Lakekeeper's management API) and jq (to parse its list responses)..."
+        apk add --no-cache curl jq
+
+        check_status() {
+          if [ "$$1" -ge 200 ] && [ "$$1" -lt 300 ]; then
+            echo "Created $$2 successfully (HTTP $$1)."
+          elif [ "$$1" -eq 409 ]; then
+            echo "$$2 already exists (HTTP 409). Treating as success."
+          else
+            echo "Failed to create $$2. HTTP Code: $$1"
+            echo "ERROR RESPONSE:"
+            if [ -f /tmp/response.txt ]; then cat /tmp/response.txt; fi
+            echo ""
+            exit 1
+          fi
+        }
+
+        # Lakekeeper organizes warehouses under "projects" (its top-level tenant

Review Comment:
   This comment is very clear 👍



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(docker-compose): use Lakekeeper as the Iceberg Catalog when launching via `docker compose` [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on code in PR #4274:
URL: https://github.com/apache/texera/pull/4274#discussion_r3120828661


##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +105,153 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts
+  lakekeeper-migrate:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper-migrate
+    depends_on:
+      postgres:
+        condition: service_healthy
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["migrate"]
+
+  # Lakekeeper is the Iceberg REST catalog service
+  lakekeeper:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper
+    restart: always
+    depends_on:
+      postgres:
+        condition: service_healthy
+      minio:
+        condition: service_started
+      lakekeeper-migrate:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["serve"]
+    healthcheck:
+      test: ["CMD", "/home/nonroot/lakekeeper", "healthcheck"]
+      interval: 10s
+      timeout: 5s
+      retries: 10
+      start_period: 10s
+
+  # One-shot init container that creates the Lakekeeper default project and
+  # the Iceberg warehouse pointing at the MinIO bucket prepared by minio-init.
+  lakekeeper-init:
+    image: alpine:3.19
+    container_name: texera-lakekeeper-init
+    depends_on:
+      lakekeeper:
+        condition: service_healthy
+      minio-init:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: [ "/bin/sh", "-c" ]
+    command:
+      - |
+        set -e
+
+        # curl is used to call Lakekeeper's management API over the internal
+        # Docker network; jq parses list responses so we can detect existing
+        # resources before deciding to create them (keeps init idempotent).
+        echo "Installing curl (to call Lakekeeper's management API) and jq (to parse its list responses)..."
+        apk add --no-cache curl jq
+
+        check_status() {
+          if [ "$$1" -ge 200 ] && [ "$$1" -lt 300 ]; then
+            echo "Created $$2 successfully (HTTP $$1)."
+          elif [ "$$1" -eq 409 ]; then
+            echo "$$2 already exists (HTTP 409). Treating as success."

Review Comment:
   Thanks for catching this! 409 was still used for project creation, now I added pre check for project creation as well, and removed check_status()



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(docker-compose): use Lakekeeper as the Iceberg Catalog when launching via `docker compose` [texera]

Posted by "xuang7 (via GitHub)" <gi...@apache.org>.
xuang7 commented on PR #4274:
URL: https://github.com/apache/texera/pull/4274#issuecomment-4272746768

   I tested this PR. Lakekeeper is functioning: the REST catalog handles namespace and table creation correctly, and workflow execution results are successfully stored in Iceberg via Lakekeeper.
   
   The only issue I hit is SQL init: docker compose up fails because bin/single-node/sql/ is empty. I see PR #4391 is addressing this, so this PR looks good overall.
   
   Separately, while trying other file input operators, I noticed an unrelated issue: file upload fails with a 413 error, likely due to a missing client_max_body_size setting in the single-node deployment nginx configuration.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(docker-compose): use Lakekeeper as the Iceberg Catalog when launching via `docker compose` [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on code in PR #4274:
URL: https://github.com/apache/texera/pull/4274#discussion_r3114488299


##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +105,132 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts
+  lakekeeper-migrate:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper-migrate
+    depends_on:
+      postgres:
+        condition: service_healthy
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["migrate"]
+
+  # Lakekeeper is the Iceberg REST catalog service
+  lakekeeper:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper
+    restart: always
+    depends_on:
+      postgres:
+        condition: service_healthy
+      minio:
+        condition: service_started
+      lakekeeper-migrate:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["serve"]
+    healthcheck:
+      test: ["CMD", "/home/nonroot/lakekeeper", "healthcheck"]
+      interval: 10s
+      timeout: 5s
+      retries: 10
+      start_period: 10s
+
+  # One-shot init container that creates the Lakekeeper default project and
+  # the Iceberg warehouse pointing at the MinIO bucket prepared by minio-init.
+  lakekeeper-init:
+    image: alpine:3.19
+    container_name: texera-lakekeeper-init
+    depends_on:
+      lakekeeper:
+        condition: service_healthy
+      minio-init:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: [ "/bin/sh", "-c" ]
+    command:
+      - |
+        set -e
+
+        echo "Installing dependencies..."
+        apk add --no-cache curl ca-certificates
+
+        check_status() {
+          if [ "$$1" -ge 200 ] && [ "$$1" -lt 300 ]; then
+            echo "Created $$2 successfully (HTTP $$1)."
+          elif [ "$$1" -eq 409 ]; then
+            echo "$$2 already exists (HTTP 409). Treating as success."
+          else
+            echo "Failed to create $$2. HTTP Code: $$1"
+            echo "ERROR RESPONSE:"
+            if [ -f /tmp/response.txt ]; then cat /tmp/response.txt; fi
+            echo ""
+            exit 1
+          fi
+        }
+
+        echo "Step 1: Initializing Default Project..."

Review Comment:
   added



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(docker-compose): use Lakekeeper as the Iceberg Catalog when launching via `docker compose` [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on code in PR #4274:
URL: https://github.com/apache/texera/pull/4274#discussion_r3120751779


##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +105,153 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts

Review Comment:
   Addressed — rewrote the comment to describe what migrate actually does (applies Lakekeeper's DB schema to Postgres, creating/upgrading the tables it uses to track catalog metadata)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(docker-compose): use Lakekeeper as the Iceberg Catalog when launching via `docker compose` [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on code in PR #4274:
URL: https://github.com/apache/texera/pull/4274#discussion_r3114487762


##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +105,132 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts
+  lakekeeper-migrate:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper-migrate
+    depends_on:
+      postgres:
+        condition: service_healthy
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["migrate"]
+
+  # Lakekeeper is the Iceberg REST catalog service
+  lakekeeper:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper
+    restart: always
+    depends_on:
+      postgres:
+        condition: service_healthy
+      minio:
+        condition: service_started
+      lakekeeper-migrate:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["serve"]
+    healthcheck:
+      test: ["CMD", "/home/nonroot/lakekeeper", "healthcheck"]
+      interval: 10s
+      timeout: 5s
+      retries: 10
+      start_period: 10s
+
+  # One-shot init container that creates the Lakekeeper default project and
+  # the Iceberg warehouse pointing at the MinIO bucket prepared by minio-init.
+  lakekeeper-init:
+    image: alpine:3.19
+    container_name: texera-lakekeeper-init
+    depends_on:
+      lakekeeper:
+        condition: service_healthy
+      minio-init:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: [ "/bin/sh", "-c" ]
+    command:
+      - |
+        set -e
+
+        echo "Installing dependencies..."

Review Comment:
   added



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(docker-compose): use Lakekeeper as the Iceberg Catalog when launching via `docker compose` [texera]

Posted by "bobbai00 (via GitHub)" <gi...@apache.org>.
bobbai00 commented on code in PR #4274:
URL: https://github.com/apache/texera/pull/4274#discussion_r3114299796


##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +105,132 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts
+  lakekeeper-migrate:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper-migrate
+    depends_on:
+      postgres:
+        condition: service_healthy
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["migrate"]
+
+  # Lakekeeper is the Iceberg REST catalog service
+  lakekeeper:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper
+    restart: always
+    depends_on:
+      postgres:
+        condition: service_healthy
+      minio:
+        condition: service_started
+      lakekeeper-migrate:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["serve"]
+    healthcheck:
+      test: ["CMD", "/home/nonroot/lakekeeper", "healthcheck"]
+      interval: 10s
+      timeout: 5s
+      retries: 10
+      start_period: 10s
+
+  # One-shot init container that creates the Lakekeeper default project and
+  # the Iceberg warehouse pointing at the MinIO bucket prepared by minio-init.
+  lakekeeper-init:
+    image: alpine:3.19
+    container_name: texera-lakekeeper-init
+    depends_on:
+      lakekeeper:
+        condition: service_healthy
+      minio-init:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: [ "/bin/sh", "-c" ]
+    command:
+      - |
+        set -e
+
+        echo "Installing dependencies..."
+        apk add --no-cache curl ca-certificates
+
+        check_status() {
+          if [ "$$1" -ge 200 ] && [ "$$1" -lt 300 ]; then
+            echo "Created $$2 successfully (HTTP $$1)."
+          elif [ "$$1" -eq 409 ]; then
+            echo "$$2 already exists (HTTP 409). Treating as success."
+          else
+            echo "Failed to create $$2. HTTP Code: $$1"
+            echo "ERROR RESPONSE:"
+            if [ -f /tmp/response.txt ]; then cat /tmp/response.txt; fi
+            echo ""
+            exit 1
+          fi
+        }
+
+        echo "Step 1: Initializing Default Project..."
+        PROJECT_PAYLOAD='{"project-id": "00000000-0000-0000-0000-000000000000", "project-name": "default"}'
+
+        PROJECT_CODE=$$(curl -s -o /tmp/response.txt -w "%{http_code}" \
+            -X POST \
+            -H "Content-Type: application/json" \
+            -d "$$PROJECT_PAYLOAD" \
+            "$$LAKEKEEPER_BASE_URI/management/v1/project" || echo "000")
+
+        check_status "$$PROJECT_CODE" "Default Project"
+
+
+        echo "Step 2: Initializing Warehouse '$$STORAGE_ICEBERG_CATALOG_REST_WAREHOUSE_NAME'..."
+        CREATE_PAYLOAD=$$(cat <<EOF
+        {
+          "warehouse-name": "$$STORAGE_ICEBERG_CATALOG_REST_WAREHOUSE_NAME",
+          "project-id": "00000000-0000-0000-0000-000000000000",
+          "storage-profile": {
+            "type": "s3",
+            "bucket": "$$STORAGE_ICEBERG_CATALOG_REST_S3_BUCKET",
+            "region": "$$STORAGE_S3_REGION",
+            "endpoint": "$$STORAGE_S3_ENDPOINT",
+            "flavor": "s3-compat",
+            "path-style-access": true,
+            "sts-enabled": false
+          },
+          "storage-credential": {
+            "type": "s3",
+            "credential-type": "access-key",
+            "aws-access-key-id": "$$STORAGE_S3_AUTH_USERNAME",
+            "aws-secret-access-key": "$$STORAGE_S3_AUTH_PASSWORD"
+          }
+        }
+        EOF
+        )
+
+        WAREHOUSE_CODE=$$(curl -s -o /tmp/response.txt -w "%{http_code}" \
+            -X POST \
+            -H "Content-Type: application/json" \
+            -d "$$CREATE_PAYLOAD" \
+            "$$LAKEKEEPER_BASE_URI/management/v1/warehouse" || echo "000")
+
+        # Lakekeeper returns 400 CreateWarehouseStorageProfileOverlap when a

Review Comment:
   Can your script detect if the ware house exist? If exist, can you skip the creation?



##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +105,132 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts
+  lakekeeper-migrate:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper-migrate
+    depends_on:
+      postgres:
+        condition: service_healthy
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["migrate"]
+
+  # Lakekeeper is the Iceberg REST catalog service
+  lakekeeper:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper
+    restart: always
+    depends_on:
+      postgres:
+        condition: service_healthy
+      minio:
+        condition: service_started
+      lakekeeper-migrate:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["serve"]
+    healthcheck:
+      test: ["CMD", "/home/nonroot/lakekeeper", "healthcheck"]
+      interval: 10s
+      timeout: 5s
+      retries: 10
+      start_period: 10s
+
+  # One-shot init container that creates the Lakekeeper default project and
+  # the Iceberg warehouse pointing at the MinIO bucket prepared by minio-init.
+  lakekeeper-init:
+    image: alpine:3.19
+    container_name: texera-lakekeeper-init
+    depends_on:
+      lakekeeper:
+        condition: service_healthy
+      minio-init:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: [ "/bin/sh", "-c" ]
+    command:
+      - |
+        set -e
+
+        echo "Installing dependencies..."
+        apk add --no-cache curl ca-certificates
+
+        check_status() {
+          if [ "$$1" -ge 200 ] && [ "$$1" -lt 300 ]; then
+            echo "Created $$2 successfully (HTTP $$1)."
+          elif [ "$$1" -eq 409 ]; then
+            echo "$$2 already exists (HTTP 409). Treating as success."
+          else
+            echo "Failed to create $$2. HTTP Code: $$1"
+            echo "ERROR RESPONSE:"
+            if [ -f /tmp/response.txt ]; then cat /tmp/response.txt; fi
+            echo ""
+            exit 1
+          fi
+        }
+
+        echo "Step 1: Initializing Default Project..."

Review Comment:
   this log is not very informative. What is the default project here?



##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +105,132 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts
+  lakekeeper-migrate:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper-migrate
+    depends_on:
+      postgres:
+        condition: service_healthy
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["migrate"]
+
+  # Lakekeeper is the Iceberg REST catalog service
+  lakekeeper:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper
+    restart: always
+    depends_on:
+      postgres:
+        condition: service_healthy
+      minio:
+        condition: service_started
+      lakekeeper-migrate:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["serve"]
+    healthcheck:
+      test: ["CMD", "/home/nonroot/lakekeeper", "healthcheck"]
+      interval: 10s
+      timeout: 5s
+      retries: 10
+      start_period: 10s
+
+  # One-shot init container that creates the Lakekeeper default project and
+  # the Iceberg warehouse pointing at the MinIO bucket prepared by minio-init.
+  lakekeeper-init:
+    image: alpine:3.19
+    container_name: texera-lakekeeper-init
+    depends_on:
+      lakekeeper:
+        condition: service_healthy
+      minio-init:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: [ "/bin/sh", "-c" ]
+    command:
+      - |
+        set -e
+
+        echo "Installing dependencies..."

Review Comment:
   please improve the logs here



##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +105,132 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts
+  lakekeeper-migrate:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper-migrate
+    depends_on:
+      postgres:
+        condition: service_healthy
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["migrate"]
+
+  # Lakekeeper is the Iceberg REST catalog service
+  lakekeeper:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper
+    restart: always
+    depends_on:
+      postgres:
+        condition: service_healthy
+      minio:
+        condition: service_started
+      lakekeeper-migrate:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["serve"]
+    healthcheck:
+      test: ["CMD", "/home/nonroot/lakekeeper", "healthcheck"]
+      interval: 10s
+      timeout: 5s
+      retries: 10
+      start_period: 10s
+
+  # One-shot init container that creates the Lakekeeper default project and
+  # the Iceberg warehouse pointing at the MinIO bucket prepared by minio-init.
+  lakekeeper-init:
+    image: alpine:3.19
+    container_name: texera-lakekeeper-init
+    depends_on:
+      lakekeeper:
+        condition: service_healthy
+      minio-init:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: [ "/bin/sh", "-c" ]
+    command:
+      - |
+        set -e
+
+        echo "Installing dependencies..."

Review Comment:
   What are these dependencies for? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: introduce Result Service using Lakekeeper as REST catalog for Iceberg - single-node deployment [texera]

Posted by "bobbai00 (via GitHub)" <gi...@apache.org>.
bobbai00 commented on code in PR #4274:
URL: https://github.com/apache/texera/pull/4274#discussion_r3070429874


##########
bin/single-node/.env:
##########
@@ -58,6 +58,18 @@ STORAGE_ICEBERG_CATALOG_POSTGRES_URI_WITHOUT_SCHEME=texera-postgres:5432/texera_
 STORAGE_ICEBERG_CATALOG_POSTGRES_USERNAME=texera
 STORAGE_ICEBERG_CATALOG_POSTGRES_PASSWORD=password
 
+LAKEKEEPER__PG_DATABASE_URL_READ=postgres://texera:password@texera-postgres:5432/texera_lakekeeper

Review Comment:
   please group the env vars together. e.g. for Lakekeeper put their relevent env var together and put comments



##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +75,142 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts
+  lakekeeper-migrate:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper-migrate
+    depends_on:
+      postgres:
+        condition: service_healthy
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["migrate"]
+
+  # Lakekeeper is the Iceberg REST catalog service
+  lakekeeper:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper
+    restart: always
+    depends_on:
+      postgres:
+        condition: service_healthy
+      minio:
+        condition: service_started
+      lakekeeper-migrate:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["serve"]
+    ports:
+      - "8181:8181"
+    healthcheck:
+      test: ["CMD", "/home/nonroot/lakekeeper", "healthcheck"]
+      interval: 10s
+      timeout: 5s
+      retries: 10
+      start_period: 10s
+
+  lakekeeper-init:
+    image: alpine:3.19
+    container_name: texera-lakekeeper-init
+    depends_on:
+      lakekeeper:
+        condition: service_healthy
+      minio:
+        condition: service_started
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: [ "/bin/sh", "-c" ]
+    command:
+      - |
+        set -e
+        
+        echo "Installing dependencies..."
+        apk add --no-cache curl ca-certificates
+        
+        echo "Installing MinIO Client..."
+        wget -q https://dl.min.io/client/mc/release/linux-amd64/mc -O /usr/local/bin/mc
+        chmod +x /usr/local/bin/mc
+        
+        check_status() {
+          if [ "$$1" -ge 200 ] && [ "$$1" -lt 300 ]; then
+            echo "Created $$2 successfully (HTTP $$1)."
+          elif [ "$$1" -eq 409 ]; then
+            echo "$$2 already exists (HTTP 409). Treating as success."
+          else
+            echo "Failed to create $$2. HTTP Code: $$1"
+            echo "ERROR RESPONSE:"
+            if [ -f /tmp/response.txt ]; then cat /tmp/response.txt; fi
+            echo ""
+            exit 1
+          fi
+        }
+        
+        echo "Step 1: Initializing MinIO bucket '$$STORAGE_ICEBERG_CATALOG_REST_S3_BUCKET'..."
+        mc alias set minio "$$STORAGE_S3_ENDPOINT" "$$STORAGE_S3_AUTH_USERNAME" "$$STORAGE_S3_AUTH_PASSWORD" || true
+        if mc ls minio/$$STORAGE_ICEBERG_CATALOG_REST_S3_BUCKET > /dev/null 2>&1; then
+          echo "MinIO bucket '$$STORAGE_ICEBERG_CATALOG_REST_S3_BUCKET' already exists."
+        else
+          mc mb minio/$$STORAGE_ICEBERG_CATALOG_REST_S3_BUCKET || {
+            echo "Failed to create MinIO bucket '$$STORAGE_ICEBERG_CATALOG_REST_S3_BUCKET'"
+            exit 1
+          }
+          echo "MinIO bucket '$$STORAGE_ICEBERG_CATALOG_REST_S3_BUCKET' created successfully."

Review Comment:
   for initializing the minio bucket, can we put it as the job for minio, not for Lakekeeper? There should be a way for minio to create a bucket when it gets started for the 1st time



##########
bin/single-node/.env:
##########
@@ -58,6 +58,18 @@ STORAGE_ICEBERG_CATALOG_POSTGRES_URI_WITHOUT_SCHEME=texera-postgres:5432/texera_
 STORAGE_ICEBERG_CATALOG_POSTGRES_USERNAME=texera
 STORAGE_ICEBERG_CATALOG_POSTGRES_PASSWORD=password
 
+LAKEKEEPER__PG_DATABASE_URL_READ=postgres://texera:password@texera-postgres:5432/texera_lakekeeper
+LAKEKEEPER__PG_DATABASE_URL_WRITE=postgres://texera:password@texera-postgres:5432/texera_lakekeeper
+LAKEKEEPER__PG_ENCRYPTION_KEY=texera_key
+LAKEKEEPER_BASE_URI=http://texera-lakekeeper:8181
+STORAGE_ICEBERG_CATALOG_REST_WAREHOUSE_NAME=texera
+STORAGE_ICEBERG_CATALOG_REST_S3_BUCKET=texera-iceberg
+STORAGE_S3_AUTH_USERNAME=texera_minio
+STORAGE_S3_AUTH_PASSWORD=password

Review Comment:
   can you remove the MINIO's related env vars and unify to use this one you are introducing?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(docker-compose): use Lakekeeper as the Iceberg Catalog when launching via `docker compose` [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on code in PR #4274:
URL: https://github.com/apache/texera/pull/4274#discussion_r3120730371


##########
bin/single-node/docker-compose.yml:
##########
@@ -26,9 +26,37 @@ services:
       - "${MINIO_PORT:-9000}:9000"
     env_file:
       - .env
+    environment:
+      - MINIO_ROOT_USER=${STORAGE_S3_AUTH_USERNAME}
+      - MINIO_ROOT_PASSWORD=${STORAGE_S3_AUTH_PASSWORD}
     volumes:
       - minio_data:/data
     command: server --console-address ":9001" /data
+    healthcheck:
+      test: ["CMD", "curl", "-sf", "http://localhost:9000/minio/health/live"]
+      interval: 5s
+      timeout: 3s
+      retries: 10
+
+  # One-shot init container that creates the Iceberg warehouse bucket on first
+  # startup. MinIO's server image has no built-in "create bucket on boot" flag,
+  # so this sidecar uses the official `mc` client to do it idempotently.

Review Comment:
   Updated. Broadened "workflow result storage" → "the Iceberg warehouse that the Lakekeeper service manages" — workflow results are just one kind of data that lands in the warehouse, so pinning the comment to "results" felt too narrow.                                                                                                                                         
                     



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(docker-compose): use Lakekeeper as the Iceberg Catalog when launching via `docker compose` [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 merged PR #4274:
URL: https://github.com/apache/texera/pull/4274


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: introduce Result Service using Lakekeeper as REST catalog for Iceberg - single-node deployment [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on code in PR #4274:
URL: https://github.com/apache/texera/pull/4274#discussion_r3083089526


##########
bin/single-node/.env:
##########
@@ -58,6 +58,18 @@ STORAGE_ICEBERG_CATALOG_POSTGRES_URI_WITHOUT_SCHEME=texera-postgres:5432/texera_
 STORAGE_ICEBERG_CATALOG_POSTGRES_USERNAME=texera
 STORAGE_ICEBERG_CATALOG_POSTGRES_PASSWORD=password
 
+LAKEKEEPER__PG_DATABASE_URL_READ=postgres://texera:password@texera-postgres:5432/texera_lakekeeper

Review Comment:
   refactored this file



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(docker-compose): use Lakekeeper as the Iceberg Catalog when launching via `docker compose` [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on code in PR #4274:
URL: https://github.com/apache/texera/pull/4274#discussion_r3116004096


##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +105,132 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts
+  lakekeeper-migrate:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper-migrate
+    depends_on:
+      postgres:
+        condition: service_healthy
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["migrate"]
+
+  # Lakekeeper is the Iceberg REST catalog service
+  lakekeeper:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper
+    restart: always
+    depends_on:
+      postgres:
+        condition: service_healthy
+      minio:
+        condition: service_started
+      lakekeeper-migrate:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["serve"]
+    healthcheck:
+      test: ["CMD", "/home/nonroot/lakekeeper", "healthcheck"]
+      interval: 10s
+      timeout: 5s
+      retries: 10
+      start_period: 10s
+
+  # One-shot init container that creates the Lakekeeper default project and
+  # the Iceberg warehouse pointing at the MinIO bucket prepared by minio-init.
+  lakekeeper-init:
+    image: alpine:3.19
+    container_name: texera-lakekeeper-init
+    depends_on:
+      lakekeeper:
+        condition: service_healthy
+      minio-init:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: [ "/bin/sh", "-c" ]
+    command:
+      - |
+        set -e
+
+        echo "Installing dependencies..."
+        apk add --no-cache curl ca-certificates
+
+        check_status() {
+          if [ "$$1" -ge 200 ] && [ "$$1" -lt 300 ]; then
+            echo "Created $$2 successfully (HTTP $$1)."
+          elif [ "$$1" -eq 409 ]; then
+            echo "$$2 already exists (HTTP 409). Treating as success."
+          else
+            echo "Failed to create $$2. HTTP Code: $$1"
+            echo "ERROR RESPONSE:"
+            if [ -f /tmp/response.txt ]; then cat /tmp/response.txt; fi
+            echo ""
+            exit 1
+          fi
+        }
+
+        echo "Step 1: Initializing Default Project..."
+        PROJECT_PAYLOAD='{"project-id": "00000000-0000-0000-0000-000000000000", "project-name": "default"}'
+
+        PROJECT_CODE=$$(curl -s -o /tmp/response.txt -w "%{http_code}" \
+            -X POST \
+            -H "Content-Type: application/json" \
+            -d "$$PROJECT_PAYLOAD" \
+            "$$LAKEKEEPER_BASE_URI/management/v1/project" || echo "000")
+
+        check_status "$$PROJECT_CODE" "Default Project"
+
+
+        echo "Step 2: Initializing Warehouse '$$STORAGE_ICEBERG_CATALOG_REST_WAREHOUSE_NAME'..."
+        CREATE_PAYLOAD=$$(cat <<EOF
+        {
+          "warehouse-name": "$$STORAGE_ICEBERG_CATALOG_REST_WAREHOUSE_NAME",
+          "project-id": "00000000-0000-0000-0000-000000000000",
+          "storage-profile": {
+            "type": "s3",
+            "bucket": "$$STORAGE_ICEBERG_CATALOG_REST_S3_BUCKET",
+            "region": "$$STORAGE_S3_REGION",
+            "endpoint": "$$STORAGE_S3_ENDPOINT",
+            "flavor": "s3-compat",
+            "path-style-access": true,
+            "sts-enabled": false
+          },
+          "storage-credential": {
+            "type": "s3",
+            "credential-type": "access-key",
+            "aws-access-key-id": "$$STORAGE_S3_AUTH_USERNAME",
+            "aws-secret-access-key": "$$STORAGE_S3_AUTH_PASSWORD"
+          }
+        }
+        EOF
+        )
+
+        WAREHOUSE_CODE=$$(curl -s -o /tmp/response.txt -w "%{http_code}" \
+            -X POST \
+            -H "Content-Type: application/json" \
+            -d "$$CREATE_PAYLOAD" \
+            "$$LAKEKEEPER_BASE_URI/management/v1/warehouse" || echo "000")
+
+        # Lakekeeper returns 400 CreateWarehouseStorageProfileOverlap when a

Review Comment:
   Updated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(docker-compose): use Lakekeeper as the Iceberg Catalog when launching via `docker compose` [texera]

Posted by "bobbai00 (via GitHub)" <gi...@apache.org>.
bobbai00 commented on code in PR #4274:
URL: https://github.com/apache/texera/pull/4274#discussion_r3115505284


##########
bin/single-node/docker-compose.yml:
##########
@@ -75,6 +105,132 @@ services:
       timeout: 5s
       retries: 10
 
+  # Lakekeeper migration init container
+  # This runs once to migrate the database before the lakekeeper server starts
+  lakekeeper-migrate:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper-migrate
+    depends_on:
+      postgres:
+        condition: service_healthy
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["migrate"]
+
+  # Lakekeeper is the Iceberg REST catalog service
+  lakekeeper:
+    image: vakamo/lakekeeper:v0.11.0
+    container_name: texera-lakekeeper
+    restart: always
+    depends_on:
+      postgres:
+        condition: service_healthy
+      minio:
+        condition: service_started
+      lakekeeper-migrate:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    entrypoint: ["/home/nonroot/lakekeeper"]
+    command: ["serve"]
+    healthcheck:
+      test: ["CMD", "/home/nonroot/lakekeeper", "healthcheck"]
+      interval: 10s
+      timeout: 5s
+      retries: 10
+      start_period: 10s
+
+  # One-shot init container that creates the Lakekeeper default project and
+  # the Iceberg warehouse pointing at the MinIO bucket prepared by minio-init.
+  lakekeeper-init:
+    image: alpine:3.19
+    container_name: texera-lakekeeper-init
+    depends_on:
+      lakekeeper:
+        condition: service_healthy
+      minio-init:
+        condition: service_completed_successfully
+    env_file:
+      - .env
+    restart: "no"
+    entrypoint: [ "/bin/sh", "-c" ]
+    command:
+      - |
+        set -e
+
+        echo "Installing dependencies..."
+        apk add --no-cache curl ca-certificates
+
+        check_status() {
+          if [ "$$1" -ge 200 ] && [ "$$1" -lt 300 ]; then
+            echo "Created $$2 successfully (HTTP $$1)."
+          elif [ "$$1" -eq 409 ]; then
+            echo "$$2 already exists (HTTP 409). Treating as success."
+          else
+            echo "Failed to create $$2. HTTP Code: $$1"
+            echo "ERROR RESPONSE:"
+            if [ -f /tmp/response.txt ]; then cat /tmp/response.txt; fi
+            echo ""
+            exit 1
+          fi
+        }
+
+        echo "Step 1: Initializing Default Project..."
+        PROJECT_PAYLOAD='{"project-id": "00000000-0000-0000-0000-000000000000", "project-name": "default"}'
+
+        PROJECT_CODE=$$(curl -s -o /tmp/response.txt -w "%{http_code}" \
+            -X POST \
+            -H "Content-Type: application/json" \
+            -d "$$PROJECT_PAYLOAD" \
+            "$$LAKEKEEPER_BASE_URI/management/v1/project" || echo "000")
+
+        check_status "$$PROJECT_CODE" "Default Project"
+
+
+        echo "Step 2: Initializing Warehouse '$$STORAGE_ICEBERG_CATALOG_REST_WAREHOUSE_NAME'..."
+        CREATE_PAYLOAD=$$(cat <<EOF
+        {
+          "warehouse-name": "$$STORAGE_ICEBERG_CATALOG_REST_WAREHOUSE_NAME",
+          "project-id": "00000000-0000-0000-0000-000000000000",
+          "storage-profile": {
+            "type": "s3",
+            "bucket": "$$STORAGE_ICEBERG_CATALOG_REST_S3_BUCKET",
+            "region": "$$STORAGE_S3_REGION",
+            "endpoint": "$$STORAGE_S3_ENDPOINT",
+            "flavor": "s3-compat",
+            "path-style-access": true,
+            "sts-enabled": false
+          },
+          "storage-credential": {
+            "type": "s3",
+            "credential-type": "access-key",
+            "aws-access-key-id": "$$STORAGE_S3_AUTH_USERNAME",
+            "aws-secret-access-key": "$$STORAGE_S3_AUTH_PASSWORD"
+          }
+        }
+        EOF
+        )
+
+        WAREHOUSE_CODE=$$(curl -s -o /tmp/response.txt -w "%{http_code}" \
+            -X POST \
+            -H "Content-Type: application/json" \
+            -d "$$CREATE_PAYLOAD" \
+            "$$LAKEKEEPER_BASE_URI/management/v1/warehouse" || echo "000")
+
+        # Lakekeeper returns 400 CreateWarehouseStorageProfileOverlap when a

Review Comment:
   Let's do the pre-check way.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(docker-compose): use Lakekeeper as the Iceberg Catalog when launching via `docker compose` [texera]

Posted by "Ma77Ball (via GitHub)" <gi...@apache.org>.
Ma77Ball commented on PR #4274:
URL: https://github.com/apache/texera/pull/4274#issuecomment-4272280046

   @bobbai00 I am not sure if it is just a problem on my end, but the script to build the images appears not to work. I'm testing this PR, but when building the images, it fails and appears to be missing some services that should be included. If needed, I can raise a Pr if this is a known issue. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: introduce Result Service using Lakekeeper as REST catalog for Iceberg - single-node deployment [texera]

Posted by "bobbai00 (via GitHub)" <gi...@apache.org>.
bobbai00 commented on PR #4274:
URL: https://github.com/apache/texera/pull/4274#issuecomment-4271720407

   @xuang7 @Ma77Ball Can you help test the PR? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org