This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new dd456e00f1c GH-55698: [CI][Packaging] Clone missing homebrew/core at
depth 1 in homebrew-cpp (#55699)
dd456e00f1c is described below
commit dd456e00f1caf86b6c31a89a608d6f807f64f15d
Author: tadeja <[email protected]>
AuthorDate: Thu Nov 26 05:47:18 2026 +0100
GH-55698: [CI][Packaging] Clone missing homebrew/core at depth 1 in
homebrew-cpp (#55699)
### Rationale for this change
Fix #55698 - macOS runners no longer include a `homebrew/core` checkout
(https://github.com/actions/runner-images/commit/f337b9314a90e1dc5d37704a1ef74355abad7bda),
so `homebrew-cpp` fails when copying `apache-arrow.rb` formulae.
### What changes are included in this PR?
Clone missing `homebrew/core` at depth one.
Disable auto-updates during testing so Homebrew uses the local formulae
without updating the checkout.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No
### Was AI used for this PR?
In accordance to the [AI generation
guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code),
please disclose below whether and how AI was used in this PR.
**PR code and description written by:**
- [X] Human
- [X] AI
**Reviewed before submission by:**
- [X] Human
- [X] AI
- [ ] Not reviewed
* GitHub Issue: #55698
Lead-authored-by: Tadeja Kadunc <[email protected]>
Co-authored-by: tadeja <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
dev/tasks/homebrew-formulae/github.macos.yml | 5 ++++-
dev/tasks/macros.jinja | 12 +++++++++++-
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/dev/tasks/homebrew-formulae/github.macos.yml
b/dev/tasks/homebrew-formulae/github.macos.yml
index c6ad1912542..068545e32c0 100644
--- a/dev/tasks/homebrew-formulae/github.macos.yml
+++ b/dev/tasks/homebrew-formulae/github.macos.yml
@@ -29,8 +29,11 @@ jobs:
{{ macros.configure_homebrew_arrow(formula)|indent }}
- name: Test formula
env:
- # Workaround for bottle download failures on GitHub Actions runners
+ # Required so brew install/test load our local formulae from
homebrew/core
+ # instead of Homebrew's JSON API (and avoids GH-48809 API bottle
issues)
HOMEBREW_NO_INSTALL_FROM_API: 1
+ # Prevent brew from trying to update the shallow homebrew/core clone
+ HOMEBREW_NO_AUTO_UPDATE: 1
run: |
brew install -v --HEAD apache-arrow
brew test apache-arrow
diff --git a/dev/tasks/macros.jinja b/dev/tasks/macros.jinja
index 161c3eeb9ad..11b9055d355 100644
--- a/dev/tasks/macros.jinja
+++ b/dev/tasks/macros.jinja
@@ -160,6 +160,16 @@ env:
brew install --overwrite [email protected] [email protected] [email protected]
set -x
+ # GHA macOS runners no longer pre-tap homebrew/core
+ # (see https://github.com/actions/runner-images/pull/15043).
+ # Use a shallow clone instead of `brew tap --force homebrew/core` to
+ # avoid downloading the full commit history on every CI run while
+ # preserving homebrew/core audit checks.
+ core_tap=$(brew --repository homebrew/core)
+ if [ ! -d "${core_tap}" ]; then
+ git clone --depth=1 https://github.com/Homebrew/homebrew-core.git
"${core_tap}"
+ fi
+
ARROW_GLIB_FORMULA=$(echo ${ARROW_FORMULA} | sed -e 's/\.rb/-glib.rb/')
echo "ARROW_GLIB_FORMULA=${ARROW_GLIB_FORMULA}" >> ${GITHUB_ENV}
for formula in ${ARROW_FORMULA} ${ARROW_GLIB_FORMULA}; do
@@ -175,7 +185,7 @@ env:
# Make sure there's only one
sed -i '' -E -e '[email protected]@.git@' ${formula}
cat ${formula}
- cp ${formula} $(brew --repository homebrew/core)/Formula/a/
+ cp "${formula}" "${core_tap}/Formula/a/"
done
{% endmacro %}