Skip to content

Commit 94d2baf

Browse files
mbrobbelalamb
andauthored
Add Cargo.lock (#14483)
* Add `Cargo.lock` * Style fix * Update `Cargo.lock` * Remove unused path * Remove cli-specific ci job and dependabot config * Remove home pin * Make cli test work with backtrace feature * More changes resulting from moving the cli crate in the workspace * Exclude `depcheck` `Cargo.lock` * Remove `--locked` from `depcheck` run * Refer to guidance instead of updated guidance * Remove `--locked` from benchmark script * Only run with `--locked` in `linux-build-lib` job of `Rust` workflow * Remove unrelated formatting changes * Add a note about using `--locked` * Update cargo.lock * Update .github/workflows/rust.yml * Update Cargo.lock * fix yaml --------- Co-authored-by: Andrew Lamb <[email protected]>
1 parent 56a30ac commit 94d2baf

File tree

16 files changed

+2699
-349
lines changed

16 files changed

+2699
-349
lines changed

.github/dependabot.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,9 @@ updates:
2828
# arrow is bumped manually
2929
- dependency-name: "arrow*"
3030
update-types: ["version-update:semver-major"]
31-
- package-ecosystem: cargo
32-
directory: "datafusion-cli/"
33-
schedule:
34-
interval: daily
35-
open-pull-requests-limit: 10
36-
target-branch: main
37-
labels: [auto-dependencies]
38-
ignore:
39-
# arrow is bumped manually
40-
- dependency-name: "arrow*"
41-
update-types: ["version-update:semver-major"]
42-
# datafusion is bumped manually
43-
- dependency-name: "datafusion*"
44-
update-types: ["version-update:semver-major"]
4531
- package-ecosystem: "github-actions"
4632
directory: "/"
4733
schedule:
4834
interval: "daily"
4935
open-pull-requests-limit: 10
5036
labels: [auto-dependencies]
51-

.github/workflows/dependencies.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ on:
2525
push:
2626
paths:
2727
- "**/Cargo.toml"
28+
- "**/Cargo.lock"
2829
pull_request:
2930
paths:
3031
- "**/Cargo.toml"
32+
- "**/Cargo.lock"
3133
# manual trigger
3234
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
3335
workflow_dispatch:
@@ -50,4 +52,4 @@ jobs:
5052
- name: Check dependencies
5153
run: |
5254
cd dev/depcheck
53-
cargo run
55+
cargo run

.github/workflows/rust.yml

Lines changed: 46 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ jobs:
6060
with:
6161
rust-version: stable
6262
- name: Prepare cargo build
63-
run: cargo check --profile ci --all-targets --features integration-tests
63+
run: |
64+
# Adding `--locked` here to assert that the `Cargo.lock` file is up to
65+
# date with the manifest. When this fails, please make sure to commit
66+
# the changes to `Cargo.lock` after building with the updated manifest.
67+
cargo check --profile ci --workspace --all-targets --features integration-tests --locked
6468
6569
# cargo check common, functions and substrait with no default features
6670
linux-cargo-check-no-default-features:
@@ -95,12 +99,6 @@ jobs:
9599
- name: Check workspace with additional features
96100
run: cargo check --profile ci --workspace --benches --features avro,json,integration-tests
97101

98-
- name: Check Cargo.lock for datafusion-cli
99-
run: |
100-
# If this test fails, try running `cargo update` in the `datafusion-cli` directory
101-
# and check in the updated Cargo.lock file.
102-
cargo check --profile ci --manifest-path datafusion-cli/Cargo.toml --locked
103-
104102
# cargo check datafusion to ensure that the datafusion crate can be built with only a
105103
# subset of the function packages enabled.
106104
linux-cargo-check-datafusion:
@@ -189,28 +187,6 @@ jobs:
189187
- name: Verify Working Directory Clean
190188
run: git diff --exit-code
191189

192-
linux-test-datafusion-cli:
193-
name: cargo test datafusion-cli (amd64)
194-
needs: linux-build-lib
195-
runs-on: ubuntu-latest
196-
container:
197-
image: amd64/rust
198-
steps:
199-
- uses: actions/checkout@v4
200-
with:
201-
submodules: true
202-
fetch-depth: 1
203-
- name: Setup Rust toolchain
204-
uses: ./.github/actions/setup-builder
205-
with:
206-
rust-version: stable
207-
- name: Run tests (excluding doctests)
208-
run: |
209-
cd datafusion-cli
210-
cargo test --profile ci --lib --tests --bins --all-features
211-
- name: Verify Working Directory Clean
212-
run: git diff --exit-code
213-
214190
linux-test-example:
215191
name: cargo examples (amd64)
216192
needs: linux-build-lib
@@ -252,10 +228,7 @@ jobs:
252228
with:
253229
rust-version: stable
254230
- name: Run doctests
255-
run: |
256-
cargo test --profile ci --doc --features avro,json
257-
cd datafusion-cli
258-
cargo test --profile ci --doc --all-features
231+
run: cargo test --profile ci --doc --features avro,json
259232
- name: Verify Working Directory Clean
260233
run: git diff --exit-code
261234

@@ -364,45 +337,40 @@ jobs:
364337
POSTGRES_HOST: postgres
365338
POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }}
366339

367-
# Temporarily commenting out the Windows flow, the reason is enormously slow running build
368-
# Waiting for new Windows 2025 github runner
369-
# Details: https://github.com/apache/datafusion/issues/13726
370-
#
371-
# windows:
372-
# name: cargo test (win64)
373-
# runs-on: windows-latest
374-
# steps:
375-
# - uses: actions/checkout@v4
376-
# with:
377-
# submodules: true
378-
# - name: Setup Rust toolchain
379-
# uses: ./.github/actions/setup-windows-builder
380-
# - name: Run tests (excluding doctests)
381-
# shell: bash
382-
# run: |
383-
# export PATH=$PATH:$HOME/d/protoc/bin
384-
# cargo test --lib --tests --bins --features avro,json,backtrace
385-
# cd datafusion-cli
386-
# cargo test --lib --tests --bins --all-features
387-
388-
# Commenting out intel mac build as so few users would ever use it
389-
# Details: https://github.com/apache/datafusion/issues/13846
390-
# macos:
391-
# name: cargo test (macos)
392-
# runs-on: macos-latest
393-
# steps:
394-
# - uses: actions/checkout@v4
395-
# with:
396-
# submodules: true
397-
# fetch-depth: 1
398-
# - name: Setup Rust toolchain
399-
# uses: ./.github/actions/setup-macos-builder
400-
# - name: Run tests (excluding doctests)
401-
# shell: bash
402-
# run: |
403-
# cargo test run --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --workspace --lib --tests --bins --features avro,json,backtrace
404-
# cd datafusion-cli
405-
# cargo test run --profile ci --lib --tests --bins --all-features
340+
# Temporarily commenting out the Windows flow, the reason is enormously slow running build
341+
# Waiting for new Windows 2025 github runner
342+
# Details: https://github.com/apache/datafusion/issues/13726
343+
#
344+
# windows:
345+
# name: cargo test (win64)
346+
# runs-on: windows-latest
347+
# steps:
348+
# - uses: actions/checkout@v4
349+
# with:
350+
# submodules: true
351+
# - name: Setup Rust toolchain
352+
# uses: ./.github/actions/setup-windows-builder
353+
# - name: Run tests (excluding doctests)
354+
# shell: bash
355+
# run: |
356+
# export PATH=$PATH:$HOME/d/protoc/bin
357+
# cargo test --lib --tests --bins --features avro,json,backtrace
358+
359+
# Commenting out intel mac build as so few users would ever use it
360+
# Details: https://github.com/apache/datafusion/issues/13846
361+
# macos:
362+
# name: cargo test (macos)
363+
# runs-on: macos-latest
364+
# steps:
365+
# - uses: actions/checkout@v4
366+
# with:
367+
# submodules: true
368+
# fetch-depth: 1
369+
# - name: Setup Rust toolchain
370+
# uses: ./.github/actions/setup-macos-builder
371+
# - name: Run tests (excluding doctests)
372+
# shell: bash
373+
# run: cargo test run --profile ci --exclude datafusion-examples --exclude datafusion-benchmarks --workspace --lib --tests --bins --features avro,json,backtrace
406374

407375
macos-aarch64:
408376
name: cargo test (macos-aarch64)
@@ -416,10 +384,7 @@ jobs:
416384
uses: ./.github/actions/setup-macos-aarch64-builder
417385
- name: Run tests (excluding doctests)
418386
shell: bash
419-
run: |
420-
cargo test --profile ci --lib --tests --bins --features avro,json,backtrace,integration-tests
421-
cd datafusion-cli
422-
cargo test --profile ci --lib --tests --bins --all-features
387+
run: cargo test --profile ci --lib --tests --bins --features avro,json,backtrace,integration-tests
423388

424389
test-datafusion-pyarrow:
425390
name: cargo test pyarrow (amd64)
@@ -615,19 +580,19 @@ jobs:
615580
# (Min Supported Rust Version) than the one specified in the
616581
# `rust-version` key of `Cargo.toml`.
617582
#
618-
# To reproduce:
619-
# 1. Install the version of Rust that is failing. Example:
583+
# To reproduce:
584+
# 1. Install the version of Rust that is failing. Example:
620585
# rustup install 1.80.1
621586
# 2. Run the command that failed with that version. Example:
622587
# cargo +1.80.1 check -p datafusion
623-
#
588+
#
624589
# To resolve, either:
625-
# 1. Change your code to use older Rust features,
590+
# 1. Change your code to use older Rust features,
626591
# 2. Revert dependency update
627592
# 3. Update the MSRV version in `Cargo.toml`
628593
#
629594
# Please see the DataFusion Rust Version Compatibility Policy before
630-
# updating Cargo.toml. You may have to update the code instead.
595+
# updating Cargo.toml. You may have to update the code instead.
631596
# https://github.com/apache/datafusion/blob/main/README.md#rust-version-compatibility-policy
632597
cargo msrv --output-format json --log-target stdout verify
633598
- name: Check datafusion-substrait
@@ -636,6 +601,3 @@ jobs:
636601
- name: Check datafusion-proto
637602
working-directory: datafusion/proto
638603
run: cargo msrv --output-format json --log-target stdout verify
639-
- name: Check datafusion-cli
640-
working-directory: datafusion-cli
641-
run: cargo msrv --output-format json --log-target stdout verify

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ venv/*
4242

4343
# Rust
4444
target
45-
Cargo.lock
46-
!datafusion-cli/Cargo.lock
4745

4846
rusty-tags.vi
4947
.history

0 commit comments

Comments
 (0)