Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/archery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ jobs:
fetch-depth: 0
- name: Git Fixup
shell: bash
run: git branch master origin/master || true
run: |
DEFAULT_BRANCH=${{ github.event.repository.default_branch }}
git branch $DEFAULT_BRANCH origin/$DEFAULT_BRANCH || true
- name: Setup Python
uses: actions/setup-python@v1
with:
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/comment_bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/pr-fetch@master
- uses: r-lib/actions/pr-fetch@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: See what is different
run: |
set -ex
DEFAULT_BRANCH=${{ github.event.repository.default_branch }}
git remote add upstream https://github.com/apache/arrow
git fetch upstream
changed() {
git diff --name-only HEAD..upstream/master | grep -e "$1" >/dev/null 2>&1
git diff --name-only HEAD..upstream/$DEFAULT_BRANCH | grep -e "$1" >/dev/null 2>&1
}
if changed '^r/.*\.R$'; then
echo "R_DOCS=true" >> $GITHUB_ENV
Expand Down Expand Up @@ -115,7 +116,7 @@ jobs:
--clang_format_binary=clang-format-${CLANG_TOOLS} \
--exclude_glob=cpp/build-support/lint_exclusions.txt \
--source_dir=r/src --quiet --fix
- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
if: env.R_DOCS == 'true' || env.R_CODE == 'true' || endsWith(github.event.comment.body, 'everything')
- name: Update R docs
if: env.R_DOCS == 'true' || endsWith(github.event.comment.body, 'everything')
Expand All @@ -131,7 +132,7 @@ jobs:
if: env.R_CODE == 'true' || endsWith(github.event.comment.body, 'everything')
shell: Rscript {0}
run: |
changed_files <- system("git diff --name-only HEAD..upstream/master 2>&1", intern = TRUE)
changed_files <- system("git diff --name-only HEAD..upstream/${{ github.event.repository.default_branch }} 2>&1", intern = TRUE)
# only grab the .R files under r/
changed_files <- grep('^r/.*\\.R$', changed_files, value = TRUE)
# remove latin1 which is unstylable due to encoding and codegen.R which is unique
Expand All @@ -145,7 +146,7 @@ jobs:
git config user.name "$(git log -1 --pretty=format:%an)"
git config user.email "$(git log -1 --pretty=format:%ae)"
git commit -a -m 'Autoformat/render all the things [automated commit]' || echo "No changes to commit"
- uses: r-lib/actions/pr-push@master
- uses: r-lib/actions/pr-push@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -155,18 +156,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/pr-fetch@master
- uses: r-lib/actions/pr-fetch@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Rebase on ${{ github.repository }} master
- name: Rebase on ${{ github.repository }} default branch
run: |
set -ex
git config user.name "$(git log -1 --pretty=format:%an)"
git config user.email "$(git log -1 --pretty=format:%ae)"
git remote add upstream https://github.com/${{ github.repository }}
git fetch --unshallow upstream master
git rebase upstream/master
- uses: r-lib/actions/pr-push@master
git fetch --unshallow upstream ${{ github.event.repository.default_branch }}
git rebase upstream/${{ github.event.repository.default_branch }}
- uses: r-lib/actions/pr-push@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
args: "--force"
1 change: 1 addition & 0 deletions .github/workflows/dev_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
# push:
# branches:
# - master
# - main
pull_request_target:
types:
- opened
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@ jobs:
restore-keys: r-${{ matrix.config.rtools }}-ccache-mingw-
# We use the makepkg-mingw setup that is included in rtools40 even when
# we use the rtools35 compilers, so we always install R 4.0/Rtools40
- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-r@v2
with:
r-version: "4.1"
rtools-version: 40
Ncpus: 2
- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-r@v2
if: ${{ matrix.config.rtools == 35 }}
with:
rtools-version: 35
Expand Down Expand Up @@ -303,13 +303,13 @@ jobs:
path: ccache
key: r-${{ matrix.rtools }}-ccache-mingw-${{ hashFiles('cpp/**') }}
restore-keys: r-${{ matrix.rtools }}-ccache-mingw-
- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-r@v2
if: ${{ matrix.rtools == 40 }}
with:
r-version: "4.1"
rtools-version: 40
Ncpus: 2
- uses: r-lib/actions/setup-r@master
- uses: r-lib/actions/setup-r@v2
if: ${{ matrix.rtools == 35 }}
with:
rtools-version: 35
Expand All @@ -327,7 +327,7 @@ jobs:
- name: Install cpp11 (on R 3.6)
# Since we force installation of binary packages below, dependency versions
# are frozen for old versions of R. We need newer cpp11 than is available as
# "binary" (though it doesn't matter because the cpp11 R package is just a
# "binary" (though it doesn't matter because the cpp11 R package is just a
# vehicle for the header-only C++ code.
if: ${{ matrix.rtools == 35 }}
shell: Rscript {0}
Expand Down
6 changes: 3 additions & 3 deletions ci/detect-changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def list_github_actions_affected_files():
"""
# GitHub Actions checkout `refs/remotes/pull/$PR/merge` where `HEAD` points
# to the merge commit while `HEAD^` points to the commit before. Hence,
# `..HEAD^` points to all commit between master and the PR.
# `..HEAD^` points to all commit between the default branch and the PR.
return list_affected_files("HEAD^..")


Expand Down Expand Up @@ -228,9 +228,9 @@ def run_from_travis():
perr("Environment variables (excerpt):")
dump_env_vars('TRAVIS_', '(BRANCH|COMMIT|PULL)')
if (os.environ['TRAVIS_REPO_SLUG'] == 'apache/arrow' and
os.environ['TRAVIS_BRANCH'] == 'master' and
os.environ['TRAVIS_BRANCH'] in ['master', 'main'] and
os.environ['TRAVIS_EVENT_TYPE'] != 'pull_request'):
# Never skip anything on master builds in the official repository
# Never skip anything on default-branch builds in the official repo
affected = dict.fromkeys(ALL_TOPICS, True)
else:
desc = get_travis_commit_description()
Expand Down
4 changes: 1 addition & 3 deletions ci/scripts/install_kartothek.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ karthothek=$1
target=$2

git clone --recurse-submodules https://github.com/JDASoftwareGroup/kartothek "${target}"
if [ "${kartothek}" = "master" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Did you check that no existing CI job was passing "master" to this script?

Copy link
Member

Choose a reason for hiding this comment

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

I see, it's simply redundant with the else branch below?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct

Copy link
Member

Choose a reason for hiding this comment

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

Yes, we can safely remove this branch.

git -C "${target}" checkout master;
elif [ "${kartothek}" = "latest" ]; then
if [ "${kartothek}" = "latest" ]; then
git -C "${target}" checkout $(git describe --tags);
else
git -C "${target}" checkout ${kartothek};
Expand Down
4 changes: 1 addition & 3 deletions ci/scripts/install_turbodbc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ turbodbc=$1
target=$2

git clone --recurse-submodules https://github.com/blue-yonder/turbodbc "${target}"
if [ "${turbodbc}" = "master" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Same question here.

git -C "${target}" checkout master;
elif [ "${turbodbc}" = "latest" ]; then
if [ "${turbodbc}" = "latest" ]; then
git -C "${target}" checkout $(git describe --tags);
else
git -C "${target}" checkout ${turbodbc};
Expand Down
3 changes: 2 additions & 1 deletion ci/scripts/python_benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export PYARROW_WITH_GANDIVA=0

pushd $ARROW_PYTHON_DIR
# Workaround for https://github.com/airspeed-velocity/asv/issues/631
git fetch --depth=100 origin master:master
DEFAULT_BRANCH=$(git rev-parse --abbrev-ref origin/HEAD | sed s@origin/@@)
git fetch --depth=100 origin $DEFAULT_BRANCH:$DEFAULT_BRANCH
# Generate machine information (mandatory)
asv machine --yes
# Run benchmarks on the changeset being tested
Expand Down