Skip to content

MINOR: Don't install Homebrew's aws-sdk-cpp and gRPC for JNI macOS build - #1269

Merged
kou merged 1 commit into
apache:mainfrom
jbonofre:jni-macos-brew-skip
Aug 29, 2026
Merged

kou merged 1 commit into
apache:mainfrom
jbonofre:jni-macos-brew-skip

Conversation

@jbonofre

Copy link
Copy Markdown
Member

Rationale for this change

The JNI macos-15-intel x86_64 job in the RC workflow fails in Install dependencies, before anything is built:

##[error]aws-sdk-cpp: no bottle available!
##[error]grpc: no bottle available!
This is a Tier 3 configuration:
  https://docs.brew.sh/Support-Tiers#tier-3
`brew bundle` failed! 2 Brewfile dependencies failed to install

Homebrew treats x86_64 macOS as a tier 3 configuration and rarely publishes bottles for it. brew bundle doesn't build from source, so arrow/cpp/Brewfile can no longer be installed as-is there.

This breaks main too, not just PRs, so nightly RC runs are red.

What changes are included in this PR?

We don't use Homebrew's aws-sdk-cpp and gRPC anyway:

  • The JNI macOS build uses the ninja-release-jni-macos preset, which sets ARROW_DEPENDENCY_USE_SHARED=OFF.
  • Homebrew provides only shared libraries for aws-sdk-cpp and gRPC.
  • So both are uninstalled just after brew bundle to ensure the bundled ones are used.

We skip installing them with HOMEBREW_BUNDLE_BREW_SKIP instead of installing and uninstalling them. This also makes the macos-14 aarch_64 job a bit faster because it no longer installs two formulae it immediately removes.

brew uninstall aws-sdk-cpp needs || : now because it's no longer installed by brew bundle. It's still called because it may be pre-installed on GitHub Actions runner images.

Note that this keeps building the x86_64 macOS shared libraries. Dropping the macos-15-intel entry would remove .dylib files for x86_64 macOS from our release JARs, which needs a separate discussion.

Are these changes tested?

Yes, by CI. The JNI macos-15-intel x86_64 and JNI macos-14 aarch_64 jobs in this PR exercise the changed step.

Are there any user-facing changes?

No.

The "JNI macos-15-intel x86_64" job fails in "Install dependencies":

    ##[error]aws-sdk-cpp: no bottle available!
    ##[error]grpc: no bottle available!
    `brew bundle` failed! 2 Brewfile dependencies failed to install

Homebrew treats x86_64 macOS as a tier 3 configuration and rarely
publishes bottles for it. "brew bundle" doesn't build from source, so
arrow/cpp/Brewfile can no longer be installed as-is.

We don't use Homebrew's aws-sdk-cpp and gRPC anyway. The JNI build uses
ARROW_DEPENDENCY_USE_SHARED=OFF and Homebrew provides only shared
libraries for them, so we uninstall both just after "brew bundle". We
skip installing them with HOMEBREW_BUNDLE_BREW_SKIP instead of
installing and uninstalling them.

"brew uninstall aws-sdk-cpp" needs "|| :" now because it's no longer
installed by "brew bundle". It's still called because it may be
pre-installed on GitHub Actions runner images.
@jbonofre jbonofre added the chore PRs that make misc changes. label Aug 28, 2026
@github-actions github-actions Bot added this to the 20.0.0 milestone Aug 28, 2026
@jbonofre

Copy link
Copy Markdown
Member Author

@lidavidm this PR is about a CI failure I observed.

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

@kou
kou merged commit f7a7829 into apache:main Aug 29, 2026
23 of 26 checks passed
@jbonofre
jbonofre deleted the jni-macos-brew-skip branch August 30, 2026 06:07
kou pushed a commit that referenced this pull request Aug 31, 2026
The `JNI macos-15-intel x86_64` job currently fails on `main` and on
every open PR while installing dependencies:

```
==> Installing node
Error: node: no bottle available!
This is a Tier 3 configuration:
  https://docs.brew.sh/Support-Tiers#tier-3
Installing node has failed!
`brew bundle` failed! 1 Brewfile dependency failed to install
```

`apache/arrow`'s `cpp/Brewfile` lists `brew "node"`, and Homebrew treats
x86_64 macOS as a tier 3 configuration and no longer builds a bottle for
it. `brew bundle` doesn't build from source, so the step aborts before
anything is built.

We don't need Node.js for the JNI build, so this skips installing it via
`HOMEBREW_BUNDLE_BREW_SKIP`, the same way #1269 did for `aws-sdk-cpp`
and gRPC.

Failing runs for reference:

* `main`:
https://github.com/apache/arrow-java/actions/runs/33283736388/job/99183221397
* PR #1263:
https://github.com/apache/arrow-java/actions/runs/33297775855/job/99221106761
kou pushed a commit that referenced this pull request Sep 21, 2026
### Rationale for this change

Homebrew treats x86_64 macOS as a [tier 3
configuration](https://docs.brew.sh/Support-Tiers#tier-3) and rarely
builds bottles for it. `brew bundle` doesn't build from source, so the
`JNI macos-15-intel x86_64` job in the RC workflow aborts in `Install
dependencies` with `no bottle available!` before anything is compiled.

We've been patching this formula by formula:

* #1269 skipped `aws-sdk-cpp` and gRPC.
* #1270 skipped Node.js.

Any new dependency added to `apache/arrow`'s `cpp/Brewfile` can break
the job again the same way, and nightly RC runs go red on `main` when it
does. We can't keep this job green on a configuration Homebrew doesn't
support.

#1269 noted that dropping the `macos-15-intel` entry needed its own
discussion because it's user-facing. #1305 is that discussion.

### What changes are included in this PR?

`rc.yml`:

* Removed the `macos-15-intel` / `x86_64` entry from the `jni-macos`
matrix.
* `binaries` no longer extracts `jni-macos-x86_64.tar.gz` nor asserts
the four `jni/*/x86_64/*.dylib` files.
* Dropped the `/usr/local` `python@XXX --overwrite` conflict loop. Its
comment already said it could go once we dropped `macos-15-intel`, since
`macos-14` and later on arm64 use `/opt/homebrew`. `brew update` is
kept.
* Unwrapped the `pkg-config` uninstall from its `if [ "$(uname -m)" =
"arm64" ]` guard, which is now always true.
* Trimmed the tier-3 justification from the `HOMEBREW_BUNDLE_BREW_SKIP`
comment. The skip list itself is unchanged: `aws-sdk-cpp` and gRPC are
still skipped so the bundled static ones are used, and Node.js is still
skipped because the JNI build doesn't need it.

`test.yml`:

* Removed the `AMD64` / `macos-15-intel` entry from the `macos` test
matrix, leaving `AArch64` on `macos-latest`.

`ci/scripts/jni_macos_build.sh` is untouched, so building the JNI
libraries locally on an Intel Mac still works.

### Are these changes tested?

Yes, by CI. The remaining `JNI macos-14 aarch_64` job exercises the
changed `Install dependencies` step, and `binaries` exercises the
changed artifact extraction and verification.

### Are there any user-facing changes?

Yes. Release JARs no longer bundle x86_64 macOS `.dylib` files for
`arrow_cdata_jni`, `arrow_dataset_jni`, `arrow_orc_jni` and
`gandiva_jni`. Intel Mac users of those modules will need to build the
JNI libraries themselves. aarch64 macOS, x86_64 and aarch64 Linux, and
x86_64 Windows are unaffected.

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

Labels

chore PRs that make misc changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants