You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@texera.apache.org by gi...@apache.org on 2026/06/28 23:59:26 UTC

(texera) 01/01: chore: move bin/*.dockerfile into bin/dockerfiles/ (#6006)

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-6006-4d05ab2efc73843533b763343a79e9340cd549e7
in repository https://gitbox.apache.org/repos/asf/texera.git

commit e5b928f73b5f59b3bf0b25bcbb4b2bb90448d1b1
Author: Yicong Huang <17...@users.noreply.github.com>
AuthorDate: Sun Jun 28 16:59:18 2026 -0700

    chore: move bin/*.dockerfile into bin/dockerfiles/ (#6006)
    
    ### What changes were proposed in this PR?
    
    The nine per-service Dockerfiles sat next to general-purpose tooling
    (`build-images.sh`, `local-dev.sh`, `single-node/`, etc.) at the top of
    `bin/`. Tuck them into a dedicated `bin/dockerfiles/` subdirectory so
    the top of `bin/` stays scannable:
    
    ```
    bin/                                  bin/dockerfiles/
    ├── access-control-service.dockerfile        ──→  access-control-service.dockerfile
    ├── agent-service.dockerfile                 ──→  agent-service.dockerfile
    ├── computing-unit-master.dockerfile         ──→  computing-unit-master.dockerfile
    ├── computing-unit-worker.dockerfile         ──→  computing-unit-worker.dockerfile
    ├── config-service.dockerfile                ──→  config-service.dockerfile
    ├── file-service.dockerfile                  ──→  file-service.dockerfile
    ├── texera-web-application.dockerfile        ──→  texera-web-application.dockerfile
    ├── workflow-compiling-service.dockerfile    ──→  workflow-compiling-service.dockerfile
    └── workflow-computing-unit-managing-service.dockerfile
                                                 ──→  workflow-computing-unit-managing-service.dockerfile
    ```
    
    Refs updated to follow the move:
    
    * `bin/build-images.sh`: glob `dockerfiles/*.dockerfile` (script stays
    cd'd in `bin/` so the pylsp + y-websocket-server build stages further
    down keep working with their `./pylsp` / `./y-websocket-server` relative
    paths, and the `..` build context still resolves to the repo root).
    * `.github/workflows/build-and-push-images.yml`: `cd bin/dockerfiles`
    for service discovery; matrix `dockerfile` entries reference
    `bin/dockerfiles/<svc>.dockerfile`.
    * `bin/README.md`: build-from-source example path.
    
    `bin/pylsp/Dockerfile` and `bin/y-websocket-server/Dockerfile` stay
    where they are — those live inside service source trees (their `COPY`
    statements reference adjacent files), not standalone deployment
    artifacts.
    
    Pure structural move. No image-name changes, no docker-compose / k8s
    value changes, no test changes. Build context is still the repo root for
    every dockerfile.
    
    ### Any related issues, documentation, discussions?
    
    Closes #6005.
    
    ### How was this PR tested?
    
    * `bash -n bin/build-images.sh` → syntax OK.
    * `python -c 'import yaml;
    yaml.safe_load(open(".github/workflows/build-and-push-images.yml"))'` →
    YAML loads.
    * Simulated the build-images.sh dockerfile-discovery step from its
    `cwd`: `(cd bin && ls dockerfiles/*.dockerfile)` lists all 9.
    * Sanity-grepped `bin/<svc>.dockerfile` patterns across `*.sh / *.yml /
    *.yaml / *.md / *.scala / *.py / *.ts / Dockerfile*` (excluding `.git/`,
    `target/`, `node_modules/`); no stale references remain.
    * `bash bin/local-dev/tests/test_local_dev_sh.sh` → `10 passed, 0
    failed` (this branch doesn't touch local-dev, but verified nothing in
    the smoke suite expected a bin/<svc>.dockerfile path).
    
    Image builds themselves can't be exercised locally without pushing to
    ghcr.io; the matrix-build workflow uses the new paths and will surface
    any breakage on first dispatch.
    
    ### Was this PR authored or co-authored using generative AI tooling?
    
    Generated-by: Claude Code (Anthropic, Claude Opus 4.7).
---
 .github/workflows/build-and-push-images.yml                 |  6 +++---
 bin/README.md                                               |  4 ++--
 bin/build-images.sh                                         | 13 +++++++++----
 bin/{ => dockerfiles}/access-control-service.dockerfile     |  0
 bin/{ => dockerfiles}/agent-service.dockerfile              |  0
 bin/{ => dockerfiles}/computing-unit-master.dockerfile      |  0
 bin/{ => dockerfiles}/computing-unit-worker.dockerfile      |  0
 bin/{ => dockerfiles}/config-service.dockerfile             |  0
 bin/{ => dockerfiles}/file-service.dockerfile               |  0
 bin/{ => dockerfiles}/texera-web-application.dockerfile     |  0
 bin/{ => dockerfiles}/workflow-compiling-service.dockerfile |  0
 .../workflow-computing-unit-managing-service.dockerfile     |  0
 bin/merge-image-tags.sh                                     | 10 ++++++----
 13 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/.github/workflows/build-and-push-images.yml b/.github/workflows/build-and-push-images.yml
index ae998c9a9e..1fc36d2322 100644
--- a/.github/workflows/build-and-push-images.yml
+++ b/.github/workflows/build-and-push-images.yml
@@ -209,9 +209,9 @@ jobs:
         run: |
           SERVICES="${{ needs.set-parameters.outputs.services }}"
 
-          # Discover all Dockerfiles in bin/ directory
+          # Discover all Dockerfiles in bin/dockerfiles/
           echo "Discovering services from Dockerfiles..."
-          cd bin
+          cd bin/dockerfiles
 
           # Standard services from *.dockerfile pattern (excluding postgres17-pgroonga)
           STANDARD_SERVICES=()
@@ -247,7 +247,7 @@ jobs:
           for service in "${SERVICES_LIST[@]}"; do
             # Determine dockerfile path and context
             if [[ " ${STANDARD_SERVICES[@]} " =~ " ${service} " ]]; then
-              dockerfile="bin/${service}.dockerfile"
+              dockerfile="bin/dockerfiles/${service}.dockerfile"
               context="."
 
               # Map dockerfile service names to Docker image names
diff --git a/bin/README.md b/bin/README.md
index 847e47512b..620794ad89 100644
--- a/bin/README.md
+++ b/bin/README.md
@@ -4,12 +4,12 @@ This directory contains Dockerfiles and configuration files for building and dep
 
 ## Dockerfiles
 
-This directory includes several Dockerfiles, such as `file-service.dockerfile` and `computing-unit-master.dockerfile`. Each Dockerfile builds a specific Texera microservice. All Dockerfiles must be built from the `texera` project root as the Docker build context.
+`bin/dockerfiles/` collects the per-service Dockerfiles, e.g. `file-service.dockerfile` and `computing-unit-master.dockerfile`. Each Dockerfile builds a specific Texera microservice. All Dockerfiles must be built from the `texera` project root as the Docker build context.
 
 For example, to build the image using `texera-web-application.dockerfile`, run the following command **from the project root**:
 
 ```bash
-docker build -f bin/texera-web-application.dockerfile -t your-repo/texera-web-application:test .
+docker build -f bin/dockerfiles/texera-web-application.dockerfile -t your-repo/texera-web-application:test .
 ```
 
 `build-images.sh` is included for building platform-dependent images conveniently.
diff --git a/bin/build-images.sh b/bin/build-images.sh
index a762bea1db..1f5960784d 100755
--- a/bin/build-images.sh
+++ b/bin/build-images.sh
@@ -107,10 +107,15 @@ docker buildx create --name texera-builder --use --bootstrap > /dev/null 2>&1 ||
 
 cd "$(dirname "$0")"
 
-# Auto-detect Dockerfiles in current directory
-dockerfiles=( *.dockerfile )
-if [[ ${#dockerfiles[@]} -eq 0 ]]; then
-  echo "❌ No Dockerfiles found (*.dockerfile) in the current directory."
+# Auto-detect Dockerfiles in bin/dockerfiles/. We stay cd'd in bin/ so the
+# pylsp + y-websocket-server build stages below keep working (they use
+# relative paths like ./pylsp and ./y-websocket-server from here), and so
+# the build context `..` still resolves to the repo root.
+# `[[ ! -e ... ]]` guards the bash-default-glob case where a no-match glob
+# stays as the literal pattern instead of becoming an empty array.
+dockerfiles=( dockerfiles/*.dockerfile )
+if [[ ${#dockerfiles[@]} -eq 0 ]] || [[ ! -e "${dockerfiles[0]}" ]]; then
+  echo "❌ No Dockerfiles found (*.dockerfile) in bin/dockerfiles/."
   exit 1
 fi
 
diff --git a/bin/access-control-service.dockerfile b/bin/dockerfiles/access-control-service.dockerfile
similarity index 100%
rename from bin/access-control-service.dockerfile
rename to bin/dockerfiles/access-control-service.dockerfile
diff --git a/bin/agent-service.dockerfile b/bin/dockerfiles/agent-service.dockerfile
similarity index 100%
rename from bin/agent-service.dockerfile
rename to bin/dockerfiles/agent-service.dockerfile
diff --git a/bin/computing-unit-master.dockerfile b/bin/dockerfiles/computing-unit-master.dockerfile
similarity index 100%
rename from bin/computing-unit-master.dockerfile
rename to bin/dockerfiles/computing-unit-master.dockerfile
diff --git a/bin/computing-unit-worker.dockerfile b/bin/dockerfiles/computing-unit-worker.dockerfile
similarity index 100%
rename from bin/computing-unit-worker.dockerfile
rename to bin/dockerfiles/computing-unit-worker.dockerfile
diff --git a/bin/config-service.dockerfile b/bin/dockerfiles/config-service.dockerfile
similarity index 100%
rename from bin/config-service.dockerfile
rename to bin/dockerfiles/config-service.dockerfile
diff --git a/bin/file-service.dockerfile b/bin/dockerfiles/file-service.dockerfile
similarity index 100%
rename from bin/file-service.dockerfile
rename to bin/dockerfiles/file-service.dockerfile
diff --git a/bin/texera-web-application.dockerfile b/bin/dockerfiles/texera-web-application.dockerfile
similarity index 100%
rename from bin/texera-web-application.dockerfile
rename to bin/dockerfiles/texera-web-application.dockerfile
diff --git a/bin/workflow-compiling-service.dockerfile b/bin/dockerfiles/workflow-compiling-service.dockerfile
similarity index 100%
rename from bin/workflow-compiling-service.dockerfile
rename to bin/dockerfiles/workflow-compiling-service.dockerfile
diff --git a/bin/workflow-computing-unit-managing-service.dockerfile b/bin/dockerfiles/workflow-computing-unit-managing-service.dockerfile
similarity index 100%
rename from bin/workflow-computing-unit-managing-service.dockerfile
rename to bin/dockerfiles/workflow-computing-unit-managing-service.dockerfile
diff --git a/bin/merge-image-tags.sh b/bin/merge-image-tags.sh
index 2458256d76..2d6a4c939f 100755
--- a/bin/merge-image-tags.sh
+++ b/bin/merge-image-tags.sh
@@ -48,11 +48,13 @@ should_merge() {
 
 cd "$(dirname "$0")"
 
-# Detect all Dockerfiles and extract service names
-dockerfiles=( *.dockerfile )
+# Detect all Dockerfiles in bin/dockerfiles/ and extract service names.
+# `[[ ! -e ... ]]` guards the bash-default-glob case where a no-match glob
+# stays as the literal pattern instead of becoming an empty array.
+dockerfiles=( dockerfiles/*.dockerfile )
 
-if [[ ${#dockerfiles[@]} -eq 0 ]]; then
-  echo "❌ No Dockerfiles found in the current directory."
+if [[ ${#dockerfiles[@]} -eq 0 ]] || [[ ! -e "${dockerfiles[0]}" ]]; then
+  echo "❌ No Dockerfiles found (*.dockerfile) in bin/dockerfiles/."
   exit 1
 fi