Skip to content

Conversation

@czentgr
Copy link
Contributor

@czentgr czentgr commented Nov 26, 2025

Description

Motivation and Context

Impact

Test Plan

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.
  • If adding new dependencies, verified they have an OpenSSF Scorecard score of 5.0 or higher (or obtained explicit TSC approval for lower scores).

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== NO RELEASE NOTE ==

@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Nov 26, 2025
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Nov 26, 2025

Reviewer's Guide

Re-enables the prestocpp Linux adapters CI workflow on pull requests by adjusting its trigger configuration, reclaiming disk space on the GitHub-hosted runner from within the container, updating adapter setup scripts, and switching to a newer GCC toolset for the engine build.

Flow diagram for updated prestocpp-linux-adapters-build CI job

flowchart TD
  A["Triggers
workflow_dispatch
pull_request"] --> B["Job prestocpp-linux-adapters-build
runs-on ubuntu-22.04
uses container prestodb/presto-native-dependency"]

  B --> C["Set concurrency group
github.workflow + PR number"]
  C --> D["Checkout prestodb/presto"]
  D --> E["Configure git safe.directory
for GITHUB_WORKSPACE"]

  E --> F["Free Disk Space inside container
- Remove /host_usr/share/dotnet
- Remove /host_usr/local/lib/android
- Remove /host_opt/hostedtoolcache/CodeQL"]

  F --> G["Update submodules
in presto-native-execution"]

  G --> H["Prepare adapter directories
adapter-deps/install
adapter-deps/download
unset CC, CXX
source gcc-toolset-12"]

  H --> I["Run adapter setup scripts
DEPENDENCY_DIR, INSTALL_PREFIX
PROMPT_ALWAYS_RESPOND=y
velox setup-centos-adapters.sh
setup-adapters.sh"]

  I --> J["Install GitHub CLI
for stash action"]
  J --> K["Restore or configure adapter dependency cache
apache/infrastructure-actions/stash"]

  K --> L["Configure ccache"]

  L --> M["Build engine
unset CC, CXX
source gcc-toolset-14
cmake configure with adapter options
ninja build"]
Loading

File-Level Changes

Change Details Files
Re-enable the prestocpp Linux adapters build workflow for pull requests and adjust its runtime environment.
  • Change workflow trigger to run on both manual dispatch and pull_request events instead of only workflow_dispatch.
  • Run the job inside the prestodb/presto-native-dependency:0.296-20251021214746-7eb2686 container with host /usr and /opt mounted into /host_usr and /host_opt.
  • Configure job-level concurrency based on workflow name and pull request number to cancel in-progress runs for the same PR.
.github/workflows/prestocpp-linux-adapters-build.yml
Add an in-container disk space reclamation step to avoid out-of-disk failures on CI runners.
  • Introduce a shell step that defines a getAvailableSpace helper and prints available disk space before and after cleanup.
  • Delete large toolchains and caches from the mounted host paths, including DotNet, Android SDK, and CodeQL hostedtoolcache to free disk space.
.github/workflows/prestocpp-linux-adapters-build.yml
Update adapter setup and engine build steps to use new scripts and newer GCC toolset.
  • Before enabling GCC toolset, explicitly unset CC and CXX to avoid leaking host compiler settings into the container environment.
  • Switch adapter installation to use velox/scripts/setup-centos-adapters.sh and ensure PROMPT_ALWAYS_RESPOND is set to 'y' for non-interactive execution.
  • Upgrade the engine build step to use gcc-toolset-14 instead of gcc-toolset-12 and remove the PRESTO_ENABLE_TESTING=OFF flag from the CMake configuration.
.github/workflows/prestocpp-linux-adapters-build.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@czentgr
Copy link
Contributor Author

czentgr commented Nov 26, 2025

@karthikeyann FYI. Lets see if we can add the CUDA build here (trying without right now). We probably won't have a lot of parallelism. Memory is constrained and in a local build I ran out of memory and got kills during the cuda compilation process.

@czentgr czentgr marked this pull request as ready for review November 26, 2025 23:18
@czentgr czentgr requested review from a team and unidevel as code owners November 26, 2025 23:18
@prestodb-ci prestodb-ci requested review from a team, auden-woolfson and jp-sivaprasad and removed request for a team November 26, 2025 23:18
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • The concurrency.group string unconditionally references github.event.pull_request.number, which will be undefined for workflow_dispatch events; consider guarding this or using a value that exists for both triggers (e.g., github.run_id).
  • The disk space cleanup relies on /usr and /opt being mounted from the host into /host_usr and /host_opt, which assumes a specific runner layout; it may be safer to gate these rm -rf calls on existence checks and/or clearly document this expectation in the workflow.
  • When unsetting CC/CXX and switching from gcc-toolset-12 to gcc-toolset-14, it might be worth explicitly commenting why the toolchain change is needed to avoid future regressions back to the older toolset.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `concurrency.group` string unconditionally references `github.event.pull_request.number`, which will be undefined for `workflow_dispatch` events; consider guarding this or using a value that exists for both triggers (e.g., `github.run_id`).
- The disk space cleanup relies on `/usr` and `/opt` being mounted from the host into `/host_usr` and `/host_opt`, which assumes a specific runner layout; it may be safer to gate these `rm -rf` calls on existence checks and/or clearly document this expectation in the workflow.
- When unsetting `CC`/`CXX` and switching from gcc-toolset-12 to gcc-toolset-14, it might be worth explicitly commenting why the toolchain change is needed to avoid future regressions back to the older toolset.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@unidevel
Copy link
Contributor

unidevel commented Dec 1, 2025

@czentgr what's the purpose of this action? check depedencies installation? I noticed prestocpp-linux-build.yml also tests the build but without depenedencies, not sure whether they can combined together.

Copy link
Collaborator

@majetideepak majetideepak left a comment

Choose a reason for hiding this comment

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

@czentgr let's should we add clang and gcc to the workflow titles to clarify the difference between this and prestocpp-linux-build ?

@czentgr
Copy link
Contributor Author

czentgr commented Dec 1, 2025

@unidevel prestocpp-linux-build.yml uses Clang and builds in debug mode without tests. This is a variation of using GCC with release and tests turned on. We probably not need the adapters install. Originally, we didn't have the adapters installed into the dependency image but that has changed since this was deactivated.
We want to add GPU in this one as well. We can't do that with Clang.
We can perhaps organize this into a single job with a matrix of clang-debug, clang-release, gcc-debug, gcc-release.
And here we can use the newer clang and gcc compared to the baseline support. But turn off GPU for clang based runs.
What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

from:IBM PR from IBM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants