Skip to content

build(native): Add c-ares installation to Mac setup#27135

Merged
nmahadevuni merged 1 commit intoprestodb:masterfrom
nmahadevuni:add_c-ares_package_to_mac_setup
Feb 17, 2026
Merged

build(native): Add c-ares installation to Mac setup#27135
nmahadevuni merged 1 commit intoprestodb:masterfrom
nmahadevuni:add_c-ares_package_to_mac_setup

Conversation

@nmahadevuni
Copy link
Copy Markdown
Member

@nmahadevuni nmahadevuni commented Feb 13, 2026

Description

This change adds 'c-ares' package installation to the Mac setup scripts.

Motivation and Context

After recent changes to FB_OS_VERSION for dependencies, proxygen requires c-ares package.

Impact

No impact

Test Plan

Ran setup script successfully on Mac.

Release Notes

== NO RELEASE NOTE ==

Summary by Sourcery

Build:

  • Install the c-ares package via Homebrew as part of the macOS native setup script.

@nmahadevuni nmahadevuni requested review from a team as code owners February 13, 2026 10:58
@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Feb 13, 2026
@prestodb-ci prestodb-ci requested review from a team, NivinCS and jp-sivaprasad and removed request for a team February 13, 2026 10:58
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Feb 13, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds Homebrew-based installation of the c-ares dependency to the macOS native Presto setup flow and wires it into the existing dependency install sequence.

Sequence diagram for macOS Presto dependency installation including c_ares

sequenceDiagram
    actor Developer
    participant setup_macos_sh
    participant install_presto_deps
    participant install_presto_deps_from_brew
    participant Homebrew

    Developer->>setup_macos_sh: execute script
    setup_macos_sh->>install_presto_deps: call function
    activate install_presto_deps
    install_presto_deps->>install_presto_deps_from_brew: run_and_time install_presto_deps_from_brew
    activate install_presto_deps_from_brew
    install_presto_deps_from_brew->>Homebrew: install_from_brew c-ares
    Homebrew-->>install_presto_deps_from_brew: c-ares installed
    deactivate install_presto_deps_from_brew
    install_presto_deps->>install_presto_deps: run_and_time install_gperf
    install_presto_deps->>install_presto_deps: run_and_time install_proxygen
    install_presto_deps->>install_presto_deps: run_and_time install_datasketches
    deactivate install_presto_deps
    install_presto_deps-->>setup_macos_sh: dependencies installed
    setup_macos_sh-->>Developer: setup complete
Loading

Flow diagram for updated macOS setup with c_ares brew installation

flowchart TD
    A[Developer runs setup-macos.sh] --> B[Source common Velox macOS setup]
    B --> C[Define MACOS_PRESTO_DEPS = c-ares]
    C --> D[Call install_presto_deps]
    D --> E[run_and_time install_presto_deps_from_brew]
    E --> F[Loop over MACOS_PRESTO_DEPS]
    F --> G[install_from_brew c-ares]
    G --> H[run_and_time install_gperf]
    H --> I[run_and_time install_proxygen]
    I --> J[run_and_time install_datasketches]
    J --> K[macOS native Presto deps ready]
Loading

File-Level Changes

Change Details Files
Introduce a Homebrew-based installation path for the c-ares dependency and integrate it into the macOS Presto dependency setup.
  • Define a MACOS_PRESTO_DEPS variable listing c-ares as a required package
  • Add an install_presto_deps_from_brew helper that iterates over MACOS_PRESTO_DEPS and installs each package via install_from_brew
  • Invoke install_presto_deps_from_brew at the start of install_presto_deps using run_and_time so c-ares is installed alongside other dependencies
presto-native-execution/scripts/setup-macos.sh

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

Copy link
Copy Markdown
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 - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `presto-native-execution/scripts/setup-macos.sh:30-34` </location>
<code_context>
 DATASKETCHES_VERSION="5.2.0"
+MACOS_PRESTO_DEPS="c-ares"
+
+function install_presto_deps_from_brew {
+  for pkg in ${MACOS_PRESTO_DEPS}; do
+    install_from_brew "${pkg}"
+  done
</code_context>

<issue_to_address>
**suggestion (bug_risk):** Use a local variable for `pkg` to avoid leaking it into the global scope.

You can declare it like this:

```bash
function install_presto_deps_from_brew {
  local pkg
  for pkg in ${MACOS_PRESTO_DEPS}; do
    install_from_brew "${pkg}"
  done
}
```

```suggestion
function install_presto_deps_from_brew {
  local pkg
  for pkg in ${MACOS_PRESTO_DEPS}; do
    install_from_brew "${pkg}"
  done
}
```
</issue_to_address>

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.

@nmahadevuni nmahadevuni force-pushed the add_c-ares_package_to_mac_setup branch 2 times, most recently from 44b0758 to 4bc5419 Compare February 16, 2026 17:27
Copy link
Copy Markdown
Contributor

@czentgr czentgr left a comment

Choose a reason for hiding this comment

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

Looks good. Lets add a comment though.

source "$(dirname "${BASH_SOURCE[0]}")/../velox/scripts/setup-macos.sh"
GPERF_VERSION="3.1"
DATASKETCHES_VERSION="5.2.0"
MACOS_PRESTO_DEPS="c-ares"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's add a small comment somewhere that identifies where this is used (in this case by proxygen). So we keep track of it.

majetideepak
majetideepak previously approved these changes Feb 16, 2026
Copy link
Copy Markdown
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 @nmahadevuni

@nmahadevuni nmahadevuni merged commit 8236897 into prestodb:master Feb 17, 2026
83 of 85 checks passed
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.

5 participants