Skip to content

Conversation

@czentgr
Copy link
Contributor

@czentgr czentgr commented Oct 22, 2025

Description

A recent change in Velox changed what the current
directory is after github_checkout. This breaks
building the PrestoC++ dependencies.

The refactor removes github cloning and instead
pulls released tar.gz images of the source code.
This also increases the download speed.

This is a companion PR to #26385

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 Oct 22, 2025
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Oct 22, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR refactors the native setup scripts to download released tarball artifacts instead of cloning from Git, parameterizes dependency versions, updates build helper invocations to use cmake_install_dir, and switches CI workflows to a custom container image.

Sequence diagram for dependency installation in setup scripts (refactored)

sequenceDiagram
    participant Script
    participant SourceRepo
    participant TarballServer
    participant BuildHelper
    Script->>TarballServer: Download dependency tarball
    Script->>BuildHelper: Extract and install from tarball
    BuildHelper->>Script: Installation complete
Loading

Class diagram for build helper function changes

classDiagram
    class Script {
      +install_gperf()
      +install_proxygen()
      +install_jwt_cpp()
      +install_prometheus_cpp()
    }
    class BuildHelper {
      +wget_and_untar(url, target_dir)
      +cmake_install_dir(target_dir, options)
    }
    Script --> BuildHelper: uses
    Script : -github_checkout() (removed)
    Script : -cmake_install() (replaced)
    Script : +cmake_install_dir() (added)
    Script : +wget_and_untar() (added)
    Script : +parameterized dependency versions
Loading

File-Level Changes

Change Details Files
Replaced Git-based dependency fetching with tarball downloads
  • Swapped git clone/github_checkout calls with wget_and_untar in setup scripts
  • Parameterized download URLs using GPERF_VERSION, JWT_VERSION, PROMETHEUS_VERSION
  • Simplified install_gperf to use the generic untar helper
presto-native-execution/scripts/setup-centos.sh
presto-native-execution/scripts/setup-adapters.sh
presto-native-execution/scripts/setup-ubuntu.sh
Updated build invocations to use cmake_install_dir helper
  • Replaced cmake_install with cmake_install_dir in proxygen, jwt-cpp, and prometheus-cpp builds
  • Adjusted install prefixes accordingly
presto-native-execution/scripts/setup-centos.sh
presto-native-execution/scripts/setup-adapters.sh
presto-native-execution/scripts/setup-ubuntu.sh
Switched CI workflows to new container image
  • Updated container image from prestodb/presto-native-dependency to ghcr.io/czentgr/czentgr-test:centos9-deps
.github/workflows/prestocpp-linux-adapters-build.yml
.github/workflows/prestocpp-linux-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 czentgr marked this pull request as ready for review October 22, 2025 21:36
@czentgr czentgr requested review from a team and unidevel as code owners October 22, 2025 21:36
@prestodb-ci prestodb-ci requested review from a team, aaneja and jp-sivaprasad and removed request for a team October 22, 2025 21:36
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 and they look great!


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.

wget ${WGET_OPTIONS} https://mirrors.ocf.berkeley.edu/gnu/gperf/gperf-3.1.tar.gz &&
tar -xzf gperf-3.1.tar.gz &&
cd gperf-3.1 &&
wget_and_untar https://mirrors.ocf.berkeley.edu/gnu/gperf/gperf-${GPERF_VERSION}.tar.gz gperf
Copy link
Contributor

Choose a reason for hiding this comment

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

I remember @PingLiuPing also has a fix relate to this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, it is in setup-macos.sh. I think it is ok to just use this site for downloading.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me update setup-macos.sh as well with this URL.

majetideepak
majetideepak previously approved these changes Oct 23, 2025
A recent change in Velox changed what the current
directory is after github_checkout. This breaks
building the PrestoC++ dependencies.

The refactor removes github cloning and instead
pulls released tar.gz images of the source code.
This also increases the download speed.
majetideepak
majetideepak previously approved these changes Oct 23, 2025
aditi-pandit
aditi-pandit previously approved these changes Oct 23, 2025
Copy link
Contributor

@aditi-pandit aditi-pandit left a comment

Choose a reason for hiding this comment

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

Thanks @czentgr. Looking forward to this fix :)

unidevel
unidevel previously approved these changes Oct 23, 2025
Copy link
Contributor

@unidevel unidevel left a comment

Choose a reason for hiding this comment

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

LGTM

@czentgr
Copy link
Contributor Author

czentgr commented Oct 23, 2025

Removing the custom dependency image, the runs were clean. There is another PR updating these.

Copy link
Contributor

@aditi-pandit aditi-pandit left a comment

Choose a reason for hiding this comment

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

Thanks @czentgr

@aditi-pandit aditi-pandit merged commit cc46adb into prestodb:master Oct 24, 2025
79 checks passed
@czentgr czentgr deleted the cz_fix_setup_scripts branch October 24, 2025 03:12
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.

7 participants