Skip to content

Conversation

anlowee
Copy link
Member

@anlowee anlowee commented Jul 4, 2025

Description

For the coordinator image build, we modified the build.sh to use docker build instead of a builder, otherwise the published image will have unknown manefest. We can probably look into this issue in the future but to make it work for now, we can make this change.

Then in the exesiting maven-checks.yml we add a new step which is to download the cached built coordinator and cli tar balls which are used for building the coordinator image. Then just run the build.sh to build the image and publish it when directly push to the main branch.

For the worker image, we added a new workflow, which does similar things as building coordinator image.

For the doc update, we have another PR to do that: #28

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.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

Tested the coordinator image build on my fork and succeeded (need to modify the REG_ORG to ghcr.io/anlowee in maven-checks.yaml): https://github.com/anlowee/presto/actions/runs/16119159394/job/45480798215

Then ran the following to test and it printed the coordinator information:

docker pull ghcr.io/anlowee/yscope-presto-with-clp-connector-coordinator
docker run -p 8080:8080 ghcr.io/anlowee/yscope-presto-with-clp-connector-coordinator:latest
# In another window
curl -X GET http://localhost:8080/v1/info

For worker. we also built the images successfully: https://github.com/y-scope/presto/actions/runs/16131561623/job/45519833846

Summary by CodeRabbit

  • New Features

    • Introduced a new workflow to automate building and pushing Docker images for the prestissimo worker.
    • Added a new workflow job to build and conditionally push a coordinator Docker image.
  • Bug Fixes

    • Applied a temporary workaround in the runtime Docker image to address a timezone configuration issue.
  • Chores

    • Updated artifact handling in CI workflows to conditionally upload build artifacts based on Java version.

Copy link

coderabbitai bot commented Jul 4, 2025

"""

Walkthrough

This update introduces a new GitHub Actions workflow for building and pushing prestissimo worker Docker images, modifies the existing Maven workflow to upload artifacts and add a coordinator image build job, and applies a timezone configuration workaround in a Dockerfile for the prestissimo runtime image.

Changes

File(s) Change Summary
.github/workflows/maven-checks.yml Modified to upload presto-server and presto-cli artifacts for Java 8.0.442; added a new presto-coordinator-image job.
.github/workflows/prestissimo-worker-images-build.yml Added new workflow for building and pushing prestissimo worker Docker images.
presto-native-execution/scripts/dockerfiles/prestissimo-runtime.dockerfile Added a temporary workaround for timezone configuration using tzdata and related commands.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHub Actions
    participant Docker Registry

    Developer->>GitHub Actions: Push or PR triggers workflow
    GitHub Actions->>GitHub Actions: Checkout repository (with submodules)
    GitHub Actions->>GitHub Actions: Build prestissimo-worker-dev-env Docker image
    GitHub Actions->>Docker Registry: (If release branch & not PR) Push dev-env image
    GitHub Actions->>GitHub Actions: Build prestissimo-worker runtime Docker image
    GitHub Actions->>Docker Registry: (If release branch & not PR) Push runtime image
Loading
sequenceDiagram
    participant GitHub Actions
    participant Artifact Storage
    participant Docker Registry

    GitHub Actions->>GitHub Actions: Run maven-checks (Java 8.0.442)
    GitHub Actions->>Artifact Storage: Upload presto-server and presto-cli artifacts
    GitHub Actions->>GitHub Actions: Run presto-coordinator-image job
    GitHub Actions->>Artifact Storage: Download artifacts to ./docker
    GitHub Actions->>Docker Registry: (If release branch & not PR) Push coordinator image
Loading

Estimated code review effort

3 (~45 minutes)

Suggested reviewers

  • anlowee
    """

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@anlowee anlowee marked this pull request as draft July 4, 2025 15:01
@anlowee anlowee force-pushed the xwei/add-release-image-publish-workflow branch 14 times, most recently from 6e2a5b7 to 97badb5 Compare July 7, 2025 14:34
@anlowee anlowee force-pushed the xwei/add-release-image-publish-workflow branch from 8d50a75 to 9bd9207 Compare July 7, 2025 14:38
@anlowee anlowee force-pushed the xwei/add-release-image-publish-workflow branch from ccb6bed to 79a72a3 Compare July 7, 2025 17:29
@anlowee anlowee force-pushed the xwei/add-release-image-publish-workflow branch from 79a72a3 to d74b885 Compare July 7, 2025 19:22
Xiaochong Wei added 2 commits July 7, 2025 15:31
@anlowee anlowee force-pushed the xwei/add-release-image-publish-workflow branch 2 times, most recently from e34e3a9 to bf86445 Compare July 8, 2025 01:16
@anlowee anlowee force-pushed the xwei/add-release-image-publish-workflow branch from bf86445 to fc2cc18 Compare July 8, 2025 01:18
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (6)
.github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml (3)

4-6: Remove stale TODO & fix the “specifiy” typo
The branch has already been hard-coded further down (lines 39-40 & 65-66). Keeping this TODO is misleading and the typo hurts professionalism.

-  # TODO: specifiy the branch to the release-0.293 when finalize the PR
+  # Workflow triggers on PRs for any branch and on pushes (see below).

33-42: Enable Docker layer caching to speed up CI
The dependency image rebuilds from scratch every run, adding several minutes to the workflow. docker/build-push-action supports registry caching out-of-the-box.

       uses: "docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4"
       with:
+        cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/prestissimo-with-clp-connector-dependency:cache
+        cache-to:   type=registry,ref=ghcr.io/${{ github.repository }}/prestissimo-with-clp-connector-dependency:cache,mode=max
         context: "./presto-native-execution/"

33-34: Duplicate step names make job logs hard to scan
Both build steps are called “Build and push”. Give the runtime build a distinctive name.

-      - name: "Build and push"
+      - name: "Build and push (dependency)"
...
-      - name: "Build and push"
+      - name: "Build and push (runtime)"

Also applies to: 53-54

.github/workflows/maven-checks.yml (3)

68-68: always() && success() is self-contradictory
always() makes the condition true even on failed upstream jobs; success() then forces false, but the expression is confusing. A plain success() (or no condition at all) is clearer.

-    if: ${{ always() && success() }}
+    # Downstream job runs only on successful maven-checks
+    if: ${{ success() }}

49-60: Hard-coded version 0.293 appears in 4 places
Upgrading Presto will require editing each occurrence. Define a single PRESTO_VERSION env var and reuse it.

-env:
+env:
+  PRESTO_VERSION: "0.293"
...
-          path: presto-server/target/presto-server-0.293.tar.gz
+          path: presto-server/target/presto-server-${{ env.PRESTO_VERSION }}.tar.gz
...
-          path: presto-cli/target/presto-cli-0.293-executable.jar
+          path: presto-cli/target/presto-cli-${{ env.PRESTO_VERSION }}-executable.jar
...
-            PRESTO_VERSION=0.293
+            PRESTO_VERSION=${{ env.PRESTO_VERSION }}

Also applies to: 106-108


61-63: Strip trailing whitespace to satisfy YAML linters
Line 63 contains only spaces and fails yamllint.

-  
+
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dbb28fa and 4ca014c.

📒 Files selected for processing (2)
  • .github/workflows/maven-checks.yml (1 hunks)
  • .github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.
.github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml (1)
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.
.github/workflows/maven-checks.yml (1)
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.
🪛 YAMLlint (1.37.1)
.github/workflows/maven-checks.yml

[error] 63-63: trailing spaces

(trailing-spaces)

Comment on lines 28 to 31
images: >-
ghcr.io/${{github.repository}}/prestissimo-with-clp-connector-dependency
tags: |
type=raw,value=ubuntu-22.04
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Image repository is not lower-cased – GHCR rejects mixed-case paths
${{ github.repository }} preserves capital letters in the org/user name. GHCR (and Docker) require all-lowercase repositories, so pushes fail for maintainers with uppercase chars.

-            ghcr.io/${{github.repository}}/prestissimo-with-clp-connector-dependency
+            ghcr.io/${{ github.repository  | toLower }} /prestissimo-with-clp-connector-dependency

(The same change is needed for the runtime image block below.)
GitHub Actions lacks a built-in toLower function; one common workaround is:

env:
  REPO_LOWER: ${{ github.repository }} 
...
          images: ghcr.io/${{ env.REPO_LOWER,, }}/prestissimo-with-clp-connector-dependency

Please adopt a lower-casing strategy before merging.

Also applies to: 48-51

🤖 Prompt for AI Agents
In .github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml
around lines 28 to 31 and also lines 48 to 51, the image repository path uses
`${{ github.repository }}` which can contain uppercase letters, causing GHCR
push failures. Fix this by defining an environment variable that stores the
lowercase version of the repository name using shell parameter expansion (e.g.,
`REPO_LOWER: ${{ github.repository }}`) and then reference this variable with
lowercase conversion syntax `${{ env.REPO_LOWER,, }}` in the image paths to
ensure all repository names are lowercase.

Comment on lines 56 to 59
build-args: |-
NUM_THREADS=4
DEPENDENCY_IMAGE=${{ steps.meta-dependency.outputs.tags }}
BASE_IMAGE=ubuntu:22.04
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

DEPENDENCY_IMAGE may contain multiple tags → invalid ARG
steps.meta-dependency.outputs.tags is a newline-separated list (often multiple tags). Passing it verbatim to docker build --build-arg yields unknown flag: –t or pulls the wrong image.

-            DEPENDENCY_IMAGE=${{ steps.meta-dependency.outputs.tags }}
+            # Use the first tag only
+            DEPENDENCY_IMAGE=${{ steps.meta-dependency.outputs.tags%%$'\n'* }}

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In .github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml
around lines 56 to 59, the DEPENDENCY_IMAGE build argument is set directly from
steps.meta-dependency.outputs.tags, which can contain multiple newline-separated
tags causing invalid ARG errors. To fix this, modify the workflow to extract and
pass only a single valid tag (e.g., the first tag) from the output instead of
the entire list, ensuring the build-arg receives a proper single image tag
string.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4ca014c and fec665a.

📒 Files selected for processing (2)
  • .github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml (1 hunks)
  • presto-native-execution/scripts/dockerfiles/prestissimo-runtime.dockerfile (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.
.github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml (1)
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.
🪛 Hadolint (2.12.0)
presto-native-execution/scripts/dockerfiles/prestissimo-runtime.dockerfile

[info] 44-44: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[warning] 44-44: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-aggregation-queries)
  • GitHub Check: test (17.0.13, :presto-main-base)
  • GitHub Check: test (17.0.13, :presto-main)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-local-queries)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-tpch-distributed-queries)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-distributed-queries)
  • GitHub Check: test (8.0.442, :presto-main-base)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-aggregation-queries)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-distributed-non-hash-gen)
  • GitHub Check: test (17.0.13, :presto-tests -P presto-tests-execution-memory)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-plan-determinism)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-local-queries)
  • GitHub Check: test (8.0.442, :presto-tests -P presto-tests-execution-memory)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-distributed-non-hash-gen)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-tpch-distributed-queries)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-distributed-queries)
  • GitHub Check: prestocpp-linux-build-for-test
  • GitHub Check: maven-checks (17.0.13)
  • GitHub Check: maven-checks (8.0.442)
  • GitHub Check: prestocpp-worker-with-clp-connector-runtime-image

Comment on lines 42 to 49
# TODO: This is a temporary fix for issue: https://github.com/prestodb/presto/issues/25531
# When there is a proper fix, update this piece of code.
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata && \
ln -snf /usr/share/zoneinfo/America/Toronto /etc/localtime && \
echo "America/New_York" > /etc/timezone && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Timezone hot-fix assumes an Ubuntu base – breaks the default CentOS build

apt-get exists only when the build actually overrides BASE_IMAGE with an Ubuntu image (as the CI workflow does).
If anyone builds this Dockerfile with the default BASE_IMAGE=quay.io/centos/centos:stream9, the layer fails immediately.

-RUN apt-get update && \
-    DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata && \
+RUN if command -v apt-get >/dev/null; then \
+      apt-get update && \
+      DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata; \
+    elif command -v dnf >/dev/null; then \
+      dnf install -y tzdata; \
+    else \
+      echo "Unsupported package manager" && exit 1; \
+    fi && \

• Makes the fix distro-agnostic.
• Adds --no-install-recommends per Hadolint DL3015.
• Still keeps the clean-up commands below.

Alternatively, split into two dedicated Dockerfiles (centos vs ubuntu) to avoid conditional logic.
Please patch before the next CentOS-based release build.

Committable suggestion skipped: line range outside the PR's diff.

🧰 Tools
🪛 Hadolint (2.12.0)

[info] 44-44: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[warning] 44-44: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)

🤖 Prompt for AI Agents
In presto-native-execution/scripts/dockerfiles/prestissimo-runtime.dockerfile
around lines 42 to 49, the current timezone fix uses apt-get which only works on
Ubuntu-based images and fails on the default CentOS base image. To fix this,
make the timezone setup commands conditional based on the base image or split
the Dockerfile into separate versions for Ubuntu and CentOS. Also, add
--no-install-recommends to the apt-get install command to follow best practices
and keep the cleanup commands intact. This will ensure the build works correctly
regardless of the base image used.

Comment on lines 76 to 81
build-args: |-
NUM_THREADS=${{ steps.get-cores.outputs.num-threads }}
DEPENDENCY_IMAGE=${{ steps.meta-dependency.outputs.tags }}
BASE_IMAGE=ubuntu:22.04
OSNAME=ubuntu
EXTRA_CMAKE_FLAGS=-DPRESTO_ENABLE_TESTING=OFF -DPRESTO_ENABLE_PARQUET=ON -DPRESTO_ENABLE_S3=ON
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Unused/unsafe build args – consider quoting and sanitising

EXTRA_CMAKE_FLAGS contains spaces; quoting the entire arg prevents word-splitting issues:

EXTRA_CMAKE_FLAGS="-DPRESTO_ENABLE_TESTING=OFF -DPRESTO_ENABLE_PARQUET=ON -DPRESTO_ENABLE_S3=ON"

Also ensure downstream Dockerfile uses "$EXTRA_CMAKE_FLAGS" with quotes.

🤖 Prompt for AI Agents
In .github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml
around lines 76 to 81, the build argument EXTRA_CMAKE_FLAGS contains spaces and
is not quoted, which can cause word-splitting issues. Fix this by enclosing the
entire value of EXTRA_CMAKE_FLAGS in double quotes. Additionally, verify that
the Dockerfile uses "$EXTRA_CMAKE_FLAGS" with quotes when referencing this
argument to ensure it is passed correctly without splitting.

Comment on lines 56 to 67
- name: "Build and push dependency image"
if: steps.dependency-changes.outputs.dep-changed == 'true'
uses: "docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4"
with:
context: "./presto-native-execution/"
file: "./presto-native-execution/scripts/dockerfiles/ubuntu-22.04-dependency.dockerfile"
push: >-
${{github.event_name != 'pull_request'
&& github.ref == 'refs/heads/release-0.293-clp-connector'}}
tags: "${{steps.meta-dependency.outputs.tags}}"
labels: "${{steps.meta-dependency.outputs.labels}}"

Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Multi-line tag list passed as DEPENDENCY_IMAGE will break docker build

steps.meta-dependency.outputs.tags is newline-separated. Passing the whole string to --build-arg yields an invalid ARG or pulls the wrong image. Extract the first tag:

build-args: |
  DEPENDENCY_IMAGE=${{ steps.meta-dependency.outputs.tags %% $'\n'* }}

or capture it in a preceding step:

- run: echo "dep_tag=$(echo "${{ steps.meta-dependency.outputs.tags }}" | head -n1)" >> $GITHUB_OUTPUT
  id: select-tag
...
  DEPENDENCY_IMAGE=${{ steps.select-tag.outputs.dep_tag }}
🤖 Prompt for AI Agents
In .github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml
around lines 56 to 67, the tags output from steps.meta-dependency.outputs.tags
is newline-separated and passing it directly to the tags or build-args causes
docker build to fail or use incorrect images. To fix this, extract only the
first tag from the multi-line string before passing it as DEPENDENCY_IMAGE in
build-args. You can do this by either using shell string manipulation to get the
first line or by adding a preceding step that captures the first tag into a
separate output variable and then referencing that single tag in the build-args.

Comment on lines 3 to 7
on:
# TODO: specifiy the branch to the release-0.293 when finalize the PR
pull_request:
push:

Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

TODO & broad trigger – restrict the workflow before merge

The comment is still TODO and the push trigger has no branch filter, so every branch push will execute an expensive multi-image build.
Either:

on:
  push:
    branches: [ "release-0.293-clp-connector" ]
  pull_request:
    branches: [ "release-0.293-clp-connector" ]

or drop the TODO entirely.

🤖 Prompt for AI Agents
In .github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml
around lines 3 to 7, the workflow trigger is too broad because the push event
has no branch filter, causing expensive builds on every branch push. To fix
this, restrict the push and pull_request triggers to only the
"release-0.293-clp-connector" branch by adding a branches filter under each
trigger or remove the TODO comment if no restriction is needed.

Comment on lines 24 to 41
- name: "Update Metadata for Dependency Image"
id: "meta-dependency"
uses: "docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804"
with:
images: >-
ghcr.io/${{github.repository}}/prestissimo-with-clp-connector-dependency
tags: |
type=raw,value=ubuntu-22.04
- name: "Update Metadata for Runtime Image"
id: "meta-runtime"
uses: "docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804"
with:
images: >-
ghcr.io/${{github.repository}}/prestissimo-with-clp-connector-runtime
tags: |
type=raw,value=ubuntu-22.04
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Repository path may be rejected by GHCR – force lowercase

${{ github.repository }} preserves upper-case characters, but GHCR requires all-lowercase names. Past review flagged this; the issue is still present.

-images: ghcr.io/${{github.repository}}/prestissimo-with-clp-connector-dependency
+images: ghcr.io/${{ env.REPO_LOWER }}/prestissimo-with-clp-connector-dependency

Add a job-level env:

env:
  REPO_LOWER: ${{ github.repository }}

and reference with Bash lowercase ${{ env.REPO_LOWER,, }}.
Do the same for the runtime image block.

🤖 Prompt for AI Agents
In .github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml
around lines 24 to 41, the use of `${{ github.repository }}` in image names may
include uppercase letters, which GHCR rejects. To fix this, add a job-level
environment variable `REPO_LOWER` set to `${{ github.repository }}`, then update
the image references to use the lowercase form `${{ env.REPO_LOWER,, }}` in both
the dependency and runtime image metadata update steps.

Comment on lines 42 to 55
- name: Check for dependency changes in presto-native-execution
id: dependency-changes
run: |
git fetch origin ${{ github.event.before }} --depth=1 || true
dep_changed=false
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q '^presto-native-execution/scripts'; then
dep_changed=true
fi
cd presto-native-execution/velox
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q '^scripts'; then
dep_changed=true
fi
echo "dep-changed=${dep_changed}" >> $GITHUB_OUTPUT
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

dep-changed is an invalid output name – step expression will fail

Hyphens are not allowed in output names (^[A-Za-z0-9_]+$).
Change both the writer and the consumer:

-echo "dep-changed=${dep_changed}" >> $GITHUB_OUTPUT
+echo "dep_changed=${dep_changed}" >> $GITHUB_OUTPUT

and

-if: steps.dependency-changes.outputs.dep-changed == 'true'
+if: steps.dependency-changes.outputs.dep_changed == 'true'

Without this, the job errors with “Error: Invalid workflow file”.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In .github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml
between lines 42 and 55, the output name "dep-changed" uses a hyphen which is
invalid in GitHub Actions output names. Rename the output to use only
alphanumeric characters or underscores, such as "dep_changed", and update both
the line that sets the output (echo "dep-changed=...") and any references to
this output elsewhere in the workflow to match the new valid name.

@anlowee anlowee requested a review from kirkrodrigues July 15, 2025 13:18
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (4)
.github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml (4)

90-90: Quote EXTRA_CMAKE_FLAGS to avoid word-splitting

The value contains spaces; unquoted, Bash splits it into three args.

-            EXTRA_CMAKE_FLAGS=-DPRESTO_ENABLE_TESTING=OFF -DPRESTO_ENABLE_PARQUET=ON -DPRESTO_ENABLE_S3=ON
+            EXTRA_CMAKE_FLAGS="-DPRESTO_ENABLE_TESTING=OFF -DPRESTO_ENABLE_PARQUET=ON -DPRESTO_ENABLE_S3=ON"

4-7: Restrict triggers & remove stale TODO – current setup will run expensive builds on every branch push

The workflow still fires for any push or pull_request, and the TODO comment is obsolete. This will hammer CI minutes on feature branches.

-on:
-  # TODO: specifiy the branch to the release-0.293 when finalize the PR
-  pull_request:
-  push:
+on:
+  push:
+    branches: [ "release-0.293-clp-connector" ]
+  pull_request:
+    branches: [ "release-0.293-clp-connector" ]

28-40: Image repository not forced to lower-case → GHCR push will fail with “invalid reference format”

github.repository preserves upper-case characters. GHCR/Docker require lower-case paths, so pushes will fail for maintainers with capital letters in their username or org.

+env:
+  REPO_LOWER: ${{ github.repository }}

-          images: >-
-            ghcr.io/${{github.repository}}/prestissimo-with-clp-connector-dependency
+          images: ghcr.io/${{ env.REPO_LOWER,, }}/prestissimo-with-clp-connector-dependency
...
-          images: >-
-            ghcr.io/${{github.repository}}/prestissimo-with-clp-connector-runtime
+          images: ghcr.io/${{ env.REPO_LOWER,, }}/prestissimo-with-clp-connector-runtime

86-88: DEPENDENCY_IMAGE can be multi-line – pass only one tag

steps.meta-dependency.outputs.tags is newline-separated when multiple tag formats are configured. Passing it verbatim to docker build yields unknown flag: –t.

-            DEPENDENCY_IMAGE=${{ steps.meta-dependency.outputs.tags }}
+            # Use the first tag only
+            DEPENDENCY_IMAGE=${{ steps.meta-dependency.outputs.tags %% $'\n'* }}
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fec665a and a6ebbaa.

📒 Files selected for processing (1)
  • .github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.
.github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml (1)
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.

Comment on lines 57 to 66
echo "dep-changed=${dep_changed}" >> $GITHUB_OUTPUT
image_exists=true
if ! docker manifest inspect "${{ steps.meta-dependency.outputs.tags }}" > /dev/null 2>&1; then
image_exists=false
fi
echo "image-exists=${image_exists}" >> $GITHUB_OUTPUT
- name: "Build and push dependency image"
if: steps.dependency-changes.outputs.dep-changed == 'true' || steps.dependency-changes.outputs.image-exists == 'false'
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Hyphens in output names break workflow parsing

Outputs must match ^[A-Za-z0-9_]+$. dep-changed and image-exists are invalid, causing a syntax error at workflow load time.

-echo "dep-changed=${dep_changed}" >> $GITHUB_OUTPUT
+echo "dep_changed=${dep_changed}" >> $GITHUB_OUTPUT
...
-echo "image-exists=${image_exists}" >> $GITHUB_OUTPUT
+echo "image_exists=${image_exists}" >> $GITHUB_OUTPUT
...
-if: steps.dependency-changes.outputs.dep-changed == 'true' || steps.dependency-changes.outputs.image-exists == 'false'
+if: steps.dependency-changes.outputs.dep_changed == 'true' || steps.dependency-changes.outputs.image_exists == 'false'
🤖 Prompt for AI Agents
In .github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml
around lines 57 to 66, the output names 'dep-changed' and 'image-exists' use
hyphens, which are invalid characters for GitHub Actions output names. Rename
these outputs to use only alphanumeric characters and underscores, such as
'dep_changed' and 'image_exists', and update all references to these outputs
accordingly to fix the syntax error.

- name: Get number of CPU
id: get-cores
run: |
echo "num-threads=$(nproc)" >> $GITHUB_OUTPUT
Copy link
Member

Choose a reason for hiding this comment

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

How about num_cores?

Comment on lines 86 to 90
NUM_THREADS=${{ steps.get-cores.outputs.num-threads }}
DEPENDENCY_IMAGE=${{ steps.meta-dependency.outputs.tags }}
BASE_IMAGE=ubuntu:22.04
OSNAME=ubuntu
EXTRA_CMAKE_FLAGS=-DPRESTO_ENABLE_TESTING=OFF -DPRESTO_ENABLE_PARQUET=ON -DPRESTO_ENABLE_S3=ON
Copy link
Member

Choose a reason for hiding this comment

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

Can we alphabetize these so they're easier to read later?

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (7)
presto-native-execution/scripts/dockerfiles/prestissimo-runtime.dockerfile (1)

42-49: Time-zone hot-fix still breaks CentOS builds

The unconditional apt-get block assumes an Ubuntu base image, but BASE_IMAGE can be CentOS 9 (dnf) by default. The build will fail for anyone not overriding BASE_IMAGE.

-RUN apt-get update && \
-    DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata && \
+RUN if command -v apt-get >/dev/null; then \
+      apt-get update && \
+      DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata; \
+    elif command -v dnf >/dev/null; then \
+      dnf install -y tzdata; \
+    else \
+      echo "Unsupported package manager" && exit 1; \
+    fi && \
     ln -snf /usr/share/zoneinfo/America/Toronto /etc/localtime && \
     echo "America/New_York" > /etc/timezone && \
-    apt-get clean && \
+    (command -v apt-get >/dev/null && apt-get clean || true) && \
     rm -rf /var/lib/apt/lists/*

Adds distro-agnostic logic and fulfils Hadolint DL3015.

.github/workflows/maven-checks.yml (2)

49-64: Hard-coded 0.293 scattered—centralise into one env var

The version appears four times; every bump will require a search-and-replace. Define env.PRESTO_VERSION once and interpolate.


71-71: always() && success() is self-contradictory

needs: maven-checks already blocks on failure; always() nullifies that. Keep only success() or drop the condition.

.github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml (4)

3-7: Broad trigger & stale TODO

Workflow runs on every branch push. Restrict push.branches / pull_request.branches to release-0.293-clp-connector and delete the TODO.


25-41: Image paths must be lower-case for GHCR

ghcr.io/${{github.repository}}/... may contain uppercase chars → push rejected. Store a lower-cased var and use that in both metadata blocks.


57-63: Hyphens in output names break workflow parsing

dep-changed / image-exists violate the ^[A-Za-z0-9_]+$ rule—workflow fails to load. Rename to dep_changed, image_exists and update references.


85-91: Quote EXTRA_CMAKE_FLAGS to preserve spaces

Without quotes, YAML splits the value and Docker sees only the first token.

EXTRA_CMAKE_FLAGS="-DPRESTO_ENABLE_TESTING=OFF -DPRESTO_ENABLE_PARQUET=ON -DPRESTO_ENABLE_S3=ON"
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a6ebbaa and 5ca0420.

📒 Files selected for processing (3)
  • .github/workflows/maven-checks.yml (1 hunks)
  • .github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml (1 hunks)
  • presto-native-execution/scripts/dockerfiles/prestissimo-runtime.dockerfile (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.
.github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml (1)
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.
.github/workflows/maven-checks.yml (1)
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.
🪛 Hadolint (2.12.0)
presto-native-execution/scripts/dockerfiles/prestissimo-runtime.dockerfile

[info] 44-44: Avoid additional packages by specifying --no-install-recommends

(DL3015)


[warning] 44-44: Pin versions in apt get install. Instead of apt-get install <package> use apt-get install <package>=<version>

(DL3008)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
  • GitHub Check: test (17.0.13, :presto-tests -P presto-tests-general)
  • GitHub Check: test (17.0.13, :presto-main)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-plan-determinism)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-local-queries)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-distributed-non-hash-gen)
  • GitHub Check: test (8.0.442, :presto-main)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-resource-manager)
  • GitHub Check: test (8.0.442, :presto-main-base)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-distributed-queries)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-plan-determinism)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-aggregation-queries)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-local-queries)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-tpch-distributed-queries)
  • GitHub Check: test (8.0.442, :presto-tests -P presto-tests-execution-memory)
  • GitHub Check: prestocpp-linux-build-for-test
  • GitHub Check: maven-checks (17.0.13)
  • GitHub Check: maven-checks (8.0.442)
  • GitHub Check: prestocpp-worker-with-clp-connector-runtime-image

Comment on lines 100 to 106
images: >-
ghcr.io/${{github.repository}}/coordinator
tags: |-
type=raw,value=dev
- name: "Build and push"
uses: "docker/build-push-action@v6"
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Possible GHCR push failure with mixed-case repo name

${{ github.repository }} keeps capital letters; GHCR requires lower-case paths. Convert to lower-case (e.g., ${{ github.repository }} | toLower).

🤖 Prompt for AI Agents
In .github/workflows/maven-checks.yml around lines 100 to 106, the usage of `${{
github.repository }}` in the image path may cause GHCR push failures because it
retains uppercase letters, while GHCR requires lowercase paths. Fix this by
converting `${{ github.repository }}` to lowercase using the `toLower` function,
ensuring the image path is fully lowercase.

Comment on lines 65 to 76
- name: "Build and push dependency image"
if: steps.dependency-changes.outputs.dep-changed == 'true' || steps.dependency-changes.outputs.image-exists == 'false'
uses: "docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4"
with:
context: "./presto-native-execution/"
file: "./presto-native-execution/scripts/dockerfiles/ubuntu-22.04-dependency.dockerfile"
push: >-
${{github.event_name != 'pull_request'
&& github.ref == 'refs/heads/release-0.293-clp-connector'}}
tags: "${{steps.meta-dependency.outputs.tags}}"
labels: "${{steps.meta-dependency.outputs.labels}}"

Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

DEPENDENCY_IMAGE may contain multiple tags → invalid ARG

steps.meta-dependency.outputs.tags is newline-separated. Extract the first tag before passing it.

build-args: |
  DEPENDENCY_IMAGE=${{ steps.meta-dependency.outputs.tags %% $'\n'* }}
🤖 Prompt for AI Agents
In .github/workflows/prestocpp-worker-with-clp-connector-runtime-image-build.yml
around lines 65 to 76, the tags input uses steps.meta-dependency.outputs.tags
which contains multiple newline-separated tags, causing an invalid ARG error. To
fix this, extract only the first tag from the tags output before passing it as
DEPENDENCY_IMAGE in build-args by using shell parameter expansion or equivalent
syntax to split on the newline and select the first tag.

@anlowee anlowee force-pushed the xwei/add-release-image-publish-workflow branch from 2481b0b to fa06d23 Compare July 18, 2025 20:30
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

♻️ Duplicate comments (3)
.github/workflows/maven-checks.yml (3)

49-64: Still hard-coding the Presto version

Literal 0.293 survives in both artifact paths and step names despite earlier feedback. Centralising the version in a single PRESTO_VERSION env var keeps bumps to one-line changes.


71-72: always() && success() negates the protection

Keeping always() makes the job run even when the upstream failed. Drop it or keep only success().


100-101: GHCR requires lower-case repository paths

${{ github.repository }} may contain capitals → push will fail. Wrap with toLower() or use github.repository_owner.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ca0420 and d120672.

📒 Files selected for processing (2)
  • .github/workflows/maven-checks.yml (1 hunks)
  • .github/workflows/prestissimo-worker-images-build.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.
.github/workflows/maven-checks.yml (1)
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.
.github/workflows/prestissimo-worker-images-build.yml (1)
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (16)
  • GitHub Check: test (17.0.13, :presto-main)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-local-queries)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-resource-manager)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-tpch-distributed-queries)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-resource-manager)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-plan-determinism)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-tpch-distributed-queries)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-aggregation-queries)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-distributed-queries)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-local-queries)
  • GitHub Check: test (8.0.442, :presto-tests -P presto-tests-general)
  • GitHub Check: test (8.0.442, :presto-tests -P presto-tests-execution-memory)
  • GitHub Check: maven-checks (8.0.442)
  • GitHub Check: maven-checks (17.0.13)
  • GitHub Check: prestocpp-linux-build-for-test
  • GitHub Check: prestissimo-worker-images-build
🔇 Additional comments (1)
.github/workflows/prestissimo-worker-images-build.yml (1)

4-6: Open TODO left in trigger section

The branch filter still carries a TODO. Confirm the final branch before merging to avoid accidental runs on every push.

Comment on lines 108 to 111
build-args: |-
JMX_PROMETHEUS_JAVA_AGENT_VERSION=0.20.0
PRESTO_VERSION=0.293
context: "./docker/"
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Build args repeat the hard-coded version

PRESTO_VERSION=0.293 duplicates the literal again. Once you introduce a workflow-level PRESTO_VERSION, reference it here instead.

-            PRESTO_VERSION=0.293
+            PRESTO_VERSION=${{ env.PRESTO_VERSION }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
build-args: |-
JMX_PROMETHEUS_JAVA_AGENT_VERSION=0.20.0
PRESTO_VERSION=0.293
context: "./docker/"
build-args: |-
JMX_PROMETHEUS_JAVA_AGENT_VERSION=0.20.0
PRESTO_VERSION=${{ env.PRESTO_VERSION }}
context: "./docker/"
🤖 Prompt for AI Agents
In .github/workflows/maven-checks.yml around lines 108 to 111, the build
argument PRESTO_VERSION is hard-coded as 0.293, duplicating the version literal.
Replace this hard-coded value with a reference to the workflow-level
PRESTO_VERSION variable to avoid repetition and improve maintainability.

Comment on lines 48 to 51
images: >-
ghcr.io/${{github.repository}}/prestissimo-worker
tags: |-
type=raw,value=dev
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Same lowercase issue for the runtime image path

Apply the same fix as above to keep both images consistent and push-able.

🤖 Prompt for AI Agents
In .github/workflows/prestissimo-worker-images-build.yml around lines 48 to 51,
the runtime image path uses uppercase letters which can cause inconsistencies
and push failures. Modify the image path to use all lowercase letters, matching
the fix applied to the other image path, ensuring both image paths are
consistent and pushable.

Comment on lines 28 to 31
images: >-
ghcr.io/${{github.repository}}/prestissimo-worker-dev-env
tags: |-
type=raw,value=dev
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Upper-case repository names break GHCR pushes

Convert ${{ github.repository }} to lower-case (or just use ${{ github.repository_owner }}) to avoid auth errors.

-            ghcr.io/${{github.repository}}/prestissimo-worker-dev-env
+            ghcr.io/${{ github.repository_owner }}/prestissimo-worker-dev-env
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
images: >-
ghcr.io/${{github.repository}}/prestissimo-worker-dev-env
tags: |-
type=raw,value=dev
images: >-
ghcr.io/${{ github.repository_owner }}/prestissimo-worker-dev-env
tags: |-
type=raw,value=dev
🤖 Prompt for AI Agents
In .github/workflows/prestissimo-worker-images-build.yml around lines 28 to 31,
the use of `${{ github.repository }}` can cause GHCR push failures if the
repository name contains upper-case letters. To fix this, convert `${{
github.repository }}` to lower-case using a function or replace it with `${{
github.repository_owner }}` which is always lower-case, ensuring the image name
is valid and avoiding authentication errors.

@anlowee anlowee requested a review from kirkrodrigues July 18, 2025 21:33
Xiaochong Wei added 3 commits July 21, 2025 14:27
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (5)
.github/workflows/maven-checks.yml (3)

49-64: Hard-coded version string still scattered
The literal 0.293 is repeated in the upload paths. Please consolidate the version into an environment variable (PRESTO_VERSION) and interpolate it everywhere to avoid silent breakage on upgrades.


100-102: Image path may fail on GHCR because of mixed-case repository name
${{ github.repository }} preserves capital letters; GHCR requires lowercase. Wrap with toLower or use ${{ github.repository_owner }}.


108-110: PRESTO_VERSION duplicated again in build args
Reference the same workflow-level variable instead of another literal 0.293.

.github/workflows/prestissimo-worker-images-build.yml (2)

12-18: Inconsistent action pinning style vs other workflows
This file pins actions to SHAs while maven-checks.yml uses version tags. Pick one strategy (commit SHAs are safer) and apply it repo-wide for predictability.


28-30: Upper-case repository segment breaks GHCR push
Convert ${{ github.repository }} to lowercase (or use ${{ github.repository_owner }}) before composing ghcr.io/... to avoid DENIED: invalid repository name errors.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d120672 and 74787c7.

📒 Files selected for processing (2)
  • .github/workflows/maven-checks.yml (1 hunks)
  • .github/workflows/prestissimo-worker-images-build.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.
.github/workflows/maven-checks.yml (1)

Learnt from: anlowee
PR: #7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.

.github/workflows/prestissimo-worker-images-build.yml (1)

Learnt from: anlowee
PR: #7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-resource-manager)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-tpch-distributed-queries)
  • GitHub Check: test (17.0.13, :presto-main)
  • GitHub Check: test (8.0.442, :presto-tests -P presto-tests-execution-memory)
  • GitHub Check: test (17.0.13, :presto-tests -P presto-tests-general)
  • GitHub Check: test (17.0.13, :presto-tests -P presto-tests-execution-memory)
  • GitHub Check: test (8.0.442, :presto-main-base)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-local-queries)
  • GitHub Check: maven-checks (8.0.442)
  • GitHub Check: maven-checks (17.0.13)
  • GitHub Check: prestocpp-linux-build-for-test
  • GitHub Check: prestissimo-worker-images-build

Comment on lines 104 to 115
- name: "Build and push"
uses: "docker/build-push-action@v6"
with:
build-args: |-
JMX_PROMETHEUS_JAVA_AGENT_VERSION=0.20.0
PRESTO_VERSION=0.293
context: "./docker/"
file: "./docker/Dockerfile"
push: >-
${{github.event_name != 'pull_request'
&& github.ref == 'refs/heads/release-0.293-clp-connector'}}
tags: "${{steps.meta.outputs.tags}}"
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Consider skipping the heavy Docker build on pull-requests
You already guard the push, but the image is still fully built during PRs, adding ~5-10 min to CI. Add the same condition to the build step or wrap the whole job in if: github.event_name == 'push' && github.ref == 'refs/heads/release-0.293-clp-connector'.

🤖 Prompt for AI Agents
In .github/workflows/maven-checks.yml around lines 104 to 115, the Docker image
build runs during pull requests, causing unnecessary CI delays. To fix this, add
a condition to skip the build step during pull requests by adding an if clause
that checks if the event is a push to the release-0.293-clp-connector branch, or
wrap the entire job with this condition. This ensures the heavy Docker build
only runs on relevant pushes, not on PRs.

Comment on lines 58 to 66
uses: "docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4"
with:
build-args: |-
BASE_IMAGE=ubuntu:22.04
DEPENDENCY_IMAGE=${{steps.metadata-deps-image.outputs.tags}}
EXTRA_CMAKE_FLAGS=-DPRESTO_ENABLE_TESTING=OFF -DPRESTO_ENABLE_PARQUET=ON -DPRESTO_ENABLE_S3=ON
NUM_THREADS=${{steps.get-cores.outputs.num_cores}}
OSNAME=ubuntu
context: "./presto-native-execution/"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

DEPENDENCY_IMAGE may contain newlines, confusing BuildKit
docker/metadata-action outputs tags as a newline-separated list. Passing that raw into a single BUILD_ARG can inject stray line breaks and break the build. Grab the first tag explicitly:

-            DEPENDENCY_IMAGE=${{steps.metadata-deps-image.outputs.tags}}
+            DEPENDENCY_IMAGE=${{ steps.metadata-deps-image.outputs.tags }}
+            # If multiple tags are present, keep only the first one
+            DEPENDENCY_IMAGE=${DEPENDENCY_IMAGE%%$'\n'*}

or parse it in a separate step and set an output.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In .github/workflows/prestissimo-worker-images-build.yml around lines 58 to 66,
the DEPENDENCY_IMAGE build argument is set directly from
steps.metadata-deps-image.outputs.tags, which may contain multiple
newline-separated tags causing BuildKit to fail. Fix this by extracting only the
first tag from the tags output before passing it as DEPENDENCY_IMAGE, either by
using shell commands to select the first line or by adding a separate step to
parse and set a single tag output, then reference that sanitized output in the
build-args.

Copy link
Member

@kirkrodrigues kirkrodrigues left a comment

Choose a reason for hiding this comment

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

For the PR title, how about:

ci: Add GitHub workflows to build and publish coordinator runtime, worker runtime, and worker development environment container images.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (5)
.github/workflows/maven-checks.yml (3)

49-64: Hard-coded Presto version still duplicated in paths – centralise via env var

The literal 0.293 appears in both artifact paths. This was flagged in a prior review and remains unfixed. Introduce a single PRESTO_VERSION variable at workflow level and reference it here to avoid silent breakage on future bumps.

-          path: "presto-server/target/presto-server-0.293.tar.gz"
+          path: "presto-server/target/presto-server-${{ env.PRESTO_VERSION }}.tar.gz"
...
-          path: "presto-cli/target/presto-cli-0.293-executable.jar"
+          path: "presto-cli/target/presto-cli-${{ env.PRESTO_VERSION }}-executable.jar"

96-103: GHCR path may fail due to uppercase letters

github.repository preserves case; GHCR rejects mixed-case names. Convert to lower-case (or use github.repository_owner) to guarantee pushes succeed.

-          images: "ghcr.io/${{github.repository}}/coordinator"
+          images: "ghcr.io/${{ github.repository }}".toLower()/coordinator

104-109: PRESTO_VERSION duplicated again in build args

Keep the build arg in sync with the artefact upload by reusing env.PRESTO_VERSION.

-            PRESTO_VERSION=0.293
+            PRESTO_VERSION=${{ env.PRESTO_VERSION }}
.github/workflows/prestissimo-worker-images-build.yml (2)

24-29: Upper-case repository segment will break GHCR push

Same issue as coordinator image: ${{ github.repository }} may contain capitals. Lower-case it or switch to ${{ github.repository_owner }}.

-          images: "ghcr.io/${{github.repository}}/prestissimo-worker-dev-env"
+          images: "ghcr.io/${{ github.repository_owner }}/prestissimo-worker-dev-env"

56-59: DEPENDENCY_IMAGE may carry newline-separated tags → invalid build-arg

steps.metadata-deps-image.outputs.tags often contains multiple lines. BuildKit will choke on embedded newlines. Strip to the first tag before passing.

-            DEPENDENCY_IMAGE=${{steps.metadata-deps-image.outputs.tags}}
+            # Sanitise to first tag only
+            DEPENDENCY_IMAGE=${{ steps.metadata-deps-image.outputs.tags }}
+            DEPENDENCY_IMAGE=${DEPENDENCY_IMAGE%%$'\n'*}
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 47b9c10 and ceaa809.

📒 Files selected for processing (2)
  • .github/workflows/maven-checks.yml (1 hunks)
  • .github/workflows/prestissimo-worker-images-build.yml (1 hunks)
🧠 Learnings (3)
📓 Common learnings
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.
.github/workflows/prestissimo-worker-images-build.yml (1)

Learnt from: anlowee
PR: #7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.

.github/workflows/maven-checks.yml (1)

Learnt from: anlowee
PR: #7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.

🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: anlowee
PR: y-scope/presto#7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.
.github/workflows/prestissimo-worker-images-build.yml (1)

Learnt from: anlowee
PR: #7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.

.github/workflows/maven-checks.yml (1)

Learnt from: anlowee
PR: #7
File: .github/workflows/hive-tests.yml:33-35
Timestamp: 2025-06-04T14:50:43.554Z
Learning: In the y-scope/presto repository, GitHub workflows are extended from OSS Presto and should maintain consistent formatting with the upstream patterns, including YAML indentation styles for workflow steps.

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-plan-determinism)
  • GitHub Check: test (17.0.13, :presto-main-base)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-local-queries)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-resource-manager)
  • GitHub Check: test (17.0.13, :presto-tests -P ci-only-aggregation-queries)
  • GitHub Check: test (17.0.13, :presto-tests -P presto-tests-execution-memory)
  • GitHub Check: test (8.0.442, :presto-main)
  • GitHub Check: test (8.0.442, :presto-main-base)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-distributed-non-hash-gen)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-distributed-queries)
  • GitHub Check: test (8.0.442, :presto-tests -P presto-tests-general)
  • GitHub Check: test (8.0.442, :presto-tests -P presto-tests-execution-memory)
  • GitHub Check: test (8.0.442, :presto-tests -P ci-only-aggregation-queries)
  • GitHub Check: prestocpp-linux-build-for-test
  • GitHub Check: maven-checks (8.0.442)
  • GitHub Check: maven-checks (17.0.13)
  • GitHub Check: prestissimo-worker-images-build

Comment on lines +12 to +18
- uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
with:
submodules: "recursive"

- name: "Login to image registry"
uses: "docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772"
with:
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Mixed pinning style: commit SHAs here, version tags elsewhere

This workflow pins actions to SHAs while maven-checks.yml uses version tags (@v4, @v5). Pick one convention (preferably SHA pinning) across all workflows for consistency and supply-chain safety.

🤖 Prompt for AI Agents
In .github/workflows/prestissimo-worker-images-build.yml around lines 12 to 18,
the actions are pinned using commit SHAs while other workflows use version tags.
To maintain consistency and improve supply-chain security, update all action
references in this workflow to use commit SHAs instead of version tags, matching
the preferred SHA pinning style used elsewhere.

@anlowee anlowee changed the title ci: Build Presto coordinator and Presttimo worker runtime images. ci: Add GitHub workflows to build and publish coordinator runtime, worker runtime, and worker development environment container images. Jul 22, 2025
@kirkrodrigues kirkrodrigues merged commit 89ce0f3 into y-scope:release-0.293-clp-connector Jul 22, 2025
41 of 43 checks passed
@anlowee anlowee deleted the xwei/add-release-image-publish-workflow branch July 22, 2025 02:09
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.

2 participants