Skip to content

Commit dc5e115

Browse files
committed
merge upstream main
2 parents 3eec7a9 + 42cd2fa commit dc5e115

85 files changed

Lines changed: 7368 additions & 987 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.asf.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ github:
5858
- "Check Markdown Links"
5959
- "Validate required_status_checks in .asf.yaml"
6060
- "Spell Check with Typos"
61+
- "Circular Dependency Check"
62+
- "Detect Unused Dependencies"
6163
# needs to be updated as part of the release process
6264
# .asf.yaml doesn't support wildcard branch protection rules, only exact branch names
6365
# https://github.com/apache/infrastructure-asfyaml?tab=readme-ov-file#branch-protection

.github/workflows/audit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
steps:
4646
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4747
- name: Install cargo-audit
48-
uses: taiki-e/install-action@055f5df8c3f65ea01cd41e9dc855becd88953486 # v2.75.18
48+
uses: taiki-e/install-action@481c34c1cf3a84c68b5e46f4eccfc82af798415a # v2.75.23
4949
with:
5050
tool: cargo-audit
5151
- name: Run audit check
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# Detect semver-incompatible (breaking) API changes in crates modified by a PR.
19+
#
20+
# Only public workspace crates that have file changes are checked.
21+
# Internal crates (benchmarks, test-utils, sqllogictest, doc) are excluded.
22+
#
23+
# If breaking changes are found, a sticky comment is posted on the PR.
24+
# The comment is removed automatically once the issues are resolved.
25+
26+
name: "Detect breaking changes"
27+
28+
on:
29+
pull_request:
30+
branches:
31+
- main
32+
33+
permissions:
34+
contents: read
35+
36+
jobs:
37+
check-semver:
38+
name: Check semver
39+
runs-on: ubuntu-latest
40+
outputs:
41+
logs: ${{ steps.check_semver.outputs.logs }}
42+
# Default to "success" so the comment job clears any stale comment
43+
# when the check step is skipped (e.g. no published crates changed).
44+
result: ${{ steps.check_semver.outputs.result || 'success' }}
45+
steps:
46+
- name: Checkout
47+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
48+
with:
49+
fetch-depth: 0
50+
51+
# For fork PRs, `origin` points to the fork, not the upstream repo.
52+
# Explicitly fetch the base branch from the upstream repo so we have
53+
# a valid baseline ref for both diff and semver-checks.
54+
- name: Fetch base branch
55+
env:
56+
BASE_REF: ${{ github.base_ref }}
57+
REPO: ${{ github.repository }}
58+
run: git fetch "https://github.com/${REPO}.git" "${BASE_REF}:refs/remotes/origin/${BASE_REF}"
59+
60+
- name: Determine changed crates
61+
id: changed_crates
62+
env:
63+
BASE_REF: ${{ github.base_ref }}
64+
run: |
65+
PACKAGES=$(ci/scripts/changed_crates.sh changed-crates "origin/${BASE_REF}")
66+
echo "packages=$PACKAGES" >> "$GITHUB_OUTPUT"
67+
echo "Changed crates: $PACKAGES"
68+
69+
- name: Install cargo-semver-checks
70+
if: steps.changed_crates.outputs.packages != ''
71+
uses: taiki-e/install-action@94cb46f8d6e437890146ffbd78a778b78e623fb2 # v2.74.0
72+
with:
73+
tool: cargo-semver-checks
74+
75+
- name: Run cargo-semver-checks
76+
id: check_semver
77+
if: steps.changed_crates.outputs.packages != ''
78+
env:
79+
BASE_REF: ${{ github.base_ref }}
80+
PACKAGES: ${{ steps.changed_crates.outputs.packages }}
81+
run: |
82+
set +e
83+
# `tee` lets cargo's output stream live into the Actions log
84+
# while we also keep a copy for the PR comment.
85+
ci/scripts/changed_crates.sh semver-check "origin/${BASE_REF}" $PACKAGES \
86+
2>&1 | tee /tmp/semver-output.txt
87+
EXIT_CODE=${PIPESTATUS[0]}
88+
{
89+
echo "logs<<EOF"
90+
sed 's/\x1b\[[0-9;]*m//g' /tmp/semver-output.txt
91+
echo "EOF"
92+
} >> "$GITHUB_OUTPUT"
93+
# Pass the result through an output instead of failing the job:
94+
# a detected breaking change should surface as a PR comment, not a
95+
# red check, so PR authors aren't confused by an intentional break.
96+
if [ "$EXIT_CODE" -eq 0 ]; then
97+
echo "result=success" >> "$GITHUB_OUTPUT"
98+
else
99+
echo "result=failure" >> "$GITHUB_OUTPUT"
100+
fi
101+
102+
# Post or remove a sticky comment on the PR based on the semver check result.
103+
comment-on-pr:
104+
name: Comment on pull request
105+
runs-on: ubuntu-latest
106+
needs: check-semver
107+
if: always()
108+
permissions:
109+
contents: read
110+
pull-requests: write
111+
steps:
112+
- name: Checkout
113+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
114+
with:
115+
sparse-checkout: ci/scripts
116+
117+
- name: Update PR comment
118+
env:
119+
GH_TOKEN: ${{ github.token }}
120+
REPO: ${{ github.repository }}
121+
PR_NUMBER: ${{ github.event.pull_request.number }}
122+
CHECK_RESULT: ${{ needs.check-semver.outputs.result }}
123+
SEMVER_LOGS: ${{ needs.check-semver.outputs.logs }}
124+
run: |
125+
ci/scripts/changed_crates.sh comment \
126+
"$REPO" "$PR_NUMBER" "$CHECK_RESULT" "$SEMVER_LOGS"

.github/workflows/dependencies.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,7 @@ on:
2525
push:
2626
branches-ignore:
2727
- 'gh-readonly-queue/**'
28-
paths:
29-
- "**/Cargo.toml"
30-
- "**/Cargo.lock"
3128
pull_request:
32-
paths:
33-
- "**/Cargo.toml"
34-
- "**/Cargo.lock"
3529
merge_group:
3630
# manual trigger
3731
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
@@ -42,7 +36,7 @@ permissions:
4236

4337
jobs:
4438
depcheck:
45-
name: circular dependency check
39+
name: Circular Dependency Check
4640
runs-on: ubuntu-latest
4741
container:
4842
image: amd64/rust
@@ -61,6 +55,7 @@ jobs:
6155
cargo run
6256
6357
detect-unused-dependencies:
58+
name: Detect Unused Dependencies
6459
runs-on: ubuntu-latest
6560
container:
6661
image: amd64/rust

.github/workflows/dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
source ci/scripts/utils/tool_versions.sh
6565
echo "LYCHEE_VERSION=${LYCHEE_VERSION}" >> "$GITHUB_ENV"
6666
- name: Install lychee
67-
uses: taiki-e/install-action@055f5df8c3f65ea01cd41e9dc855becd88953486 # v2.75.18
67+
uses: taiki-e/install-action@481c34c1cf3a84c68b5e46f4eccfc82af798415a # v2.75.23
6868
with:
6969
tool: lychee@${{ env.LYCHEE_VERSION }}
7070
- name: Run markdown link check

.github/workflows/docs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ name: Deploy DataFusion site
2828

2929
jobs:
3030
build-docs:
31+
permissions:
32+
contents: write
3133
name: Build docs
3234
runs-on: ubuntu-latest
3335
steps:

.github/workflows/rust.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ on:
4242
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
4343
workflow_dispatch:
4444

45+
permissions:
46+
contents: read
47+
4548
jobs:
4649
# Check crate compiles and base cargo check passes
4750
linux-build-lib:
@@ -430,7 +433,7 @@ jobs:
430433
sudo apt-get update -qq
431434
sudo apt-get install -y -qq clang
432435
- name: Setup wasm-pack
433-
uses: taiki-e/install-action@055f5df8c3f65ea01cd41e9dc855becd88953486 # v2.75.18
436+
uses: taiki-e/install-action@481c34c1cf3a84c68b5e46f4eccfc82af798415a # v2.75.23
434437
with:
435438
tool: wasm-pack
436439
- name: Run tests with headless mode
@@ -740,7 +743,7 @@ jobs:
740743
with:
741744
submodules: true
742745
fetch-depth: 1
743-
746+
744747
- name: Mark repository as safe for git
745748
# Required for git commands inside container (avoids "dubious ownership" error)
746749
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
@@ -770,7 +773,7 @@ jobs:
770773
- name: Setup Rust toolchain
771774
uses: ./.github/actions/setup-builder
772775
- name: Install cargo-msrv
773-
uses: taiki-e/install-action@055f5df8c3f65ea01cd41e9dc855becd88953486 # v2.75.18
776+
uses: taiki-e/install-action@481c34c1cf3a84c68b5e46f4eccfc82af798415a # v2.75.23
774777
with:
775778
tool: cargo-msrv
776779

Cargo.lock

Lines changed: 19 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ parquet = { version = "58.1.0", default-features = false, features = [
183183
] }
184184
pbjson = { version = "0.9.0" }
185185
pbjson-types = "0.9"
186+
pin-project = "1"
186187
# Should match arrow-flight's version of prost.
187188
prost = "0.14.1"
188189
rand = "0.9"

0 commit comments

Comments
 (0)