Skip to content

Commit 2e7a6f7

Browse files
authored
ci: remove macos from PR test suite (#5142)
## Changes Made We currently use MacOS to run unit tests in PRs because we had an issue with getting Rust code coverage in Ubuntu 22.04. The latest Rust toolchain no longer has this issue, so this PR updates the rust toolchain to the latest nightly and moves the code coverage tests to Ubuntu. The vast majority of the diff here is just linting and lifetime fixes due to the upgrade to the latest nightly Rust + 2024 edition. The rest of the changes are as follows: - moving the code coverage tests in `.github/workflows/pr-test-suite.yml` to Ubuntu as described above - it was failing due to out of disk space so I also added a disk space remover action - update our Rust versions in `rust-toolchain.toml` and `Cargo.toml` - use `hashbrown::HashMap` instead of `std::HashMap` because `raw_entry_mut` was removed from the standard library ## Related Issues #3801 ## Checklist - [x] Documented in API Docs (if applicable) - [x] Documented in User Guide (if applicable) - [x] If adding a new documentation page, doc is added to `docs/mkdocs.yml` navigation - [x] Documentation builds and is formatted properly (tag @/ccmao1130 for docs review)
1 parent 98551c4 commit 2e7a6f7

File tree

608 files changed

+3427
-2448
lines changed

Some content is hidden

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

608 files changed

+3427
-2448
lines changed

.github/workflows/pr-test-suite.yml

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -71,30 +71,32 @@ jobs:
7171
unit-test:
7272
needs: skipcheck
7373
if: ${{ needs.skipcheck.outputs.skip == 'false' }}
74-
runs-on: ${{ matrix.os }}
75-
timeout-minutes: 45
74+
runs-on: ubuntu-latest
75+
timeout-minutes: 60
7676
strategy:
7777
fail-fast: false
7878
matrix:
7979
python-version: ['3.9', '3.12']
8080
daft-runner: [ray, native]
8181
pyarrow-version: [8.0.0, 19.0.1]
8282
flotilla: [1, 0]
83-
os: [ubuntu-latest, macos-latest]
8483
exclude:
8584
- daft-runner: native
8685
flotilla: 0
8786
- daft-runner: ray
8887
pyarrow-version: 8.0.0
89-
- python-version: '3.9'
90-
os: macos-latest
91-
- pyarrow-version: 8.0.0
92-
os: macos-latest
9388
- python-version: '3.12'
9489
pyarrow-version: 8.0.0
95-
- os: macos-latest
96-
flotilla: 0
9790
steps:
91+
- name: Free Disk Space (Ubuntu) # only run on ubuntu
92+
uses: jlumbroso/free-disk-space@main
93+
with:
94+
tool-cache: false
95+
96+
- run: |
97+
sudo apt-get update
98+
sudo apt-get install ffmpeg libsm6 libxext6 -y
99+
98100
- uses: actions/checkout@v4
99101
- uses: moonrepo/setup-rust@v1
100102
with:
@@ -135,27 +137,7 @@ jobs:
135137
source .venv/bin/activate
136138
uv pip install pyarrow==${{ matrix.pyarrow-version }}
137139
138-
# Rust code coverage does not work on ubuntu-latest, so we only run it on macOS
139-
# For more info: https://github.com/Eventual-Inc/Daft/issues/3801
140-
- name: Build library and Test with pytest (Linux)
141-
if: ${{ (runner.os == 'Linux') }}
142-
run: |
143-
source .venv/bin/activate
144-
maturin develop --uv
145-
pytest --ignore tests/integration --collect-only -qq # run this to ensure no weird imports that result in `Collector` errors
146-
pytest --cov=daft --ignore tests/integration --durations=0 | ./tools/capture-durations.sh "pytest_output.txt"
147-
python tools/aggregate_test_durations.py pytest_output.txt
148-
coverage combine -a --data-file='.coverage' || true
149-
mkdir -p report-output
150-
coverage xml -o ./report-output/coverage-${{ join(matrix.*, '-') }}.xml
151-
env:
152-
CARGO_TARGET_DIR: ./target
153-
154-
DAFT_RUNNER: ${{ matrix.daft-runner }}
155-
DAFT_FLOTILLA: ${{ matrix.flotilla }}
156-
157-
- name: Build library and Test with pytest with code coverage (macOS)
158-
if: ${{ (runner.os == 'macOS') }}
140+
- name: Build library and Test with pytest
159141
run: |
160142
source .venv/bin/activate
161143
cargo llvm-cov clean --workspace
@@ -180,7 +162,6 @@ jobs:
180162
DAFT_FLOTILLA: ${{ matrix.flotilla }}
181163

182164
- name: Upload coverage report
183-
if: ${{ (runner.os == 'macOS') }}
184165
uses: actions/upload-artifact@v4
185166
with:
186167
name: coverage-reports-unit-tests-${{ join(matrix.*, '-') }}

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ repos:
7373
- id: fmt
7474
name: Rust code Formatting
7575
description: Format files with cargo fmt.
76-
entry: cargo fmt
76+
entry: cargo fmt --manifest-path Cargo.toml
7777
language: system
7878
types: [rust]
7979
args: [--]

Cargo.lock

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

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ crate-type = ["cdylib"]
118118
name = "daft"
119119

120120
[package]
121-
edition = "2021"
121+
edition = "2024"
122122
name = "daft"
123123
publish = false
124124
version = "0.3.0-dev0"
@@ -278,6 +278,7 @@ daft-sql = {path = "src/daft-sql"}
278278
derive_builder = "0.20.2"
279279
educe = "0.6.0"
280280
futures = "0.3.30"
281+
hashbrown = "0.16"
281282
html-escape = "0.2.13"
282283
image = {version = "0.25.5", default-features = false}
283284
indexmap = "2.9.0"
@@ -454,5 +455,5 @@ wildcard_imports = "allow"
454455
zero_sized_map_values = "allow"
455456

456457
[workspace.package]
457-
edition = "2021"
458+
edition = "2024"
458459
version = "0.3.0-dev0"

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[toolchain]
2-
channel = "nightly-2025-01-19"
2+
channel = "nightly-2025-09-03"
33
components = ["rustfmt", "clippy"]
44
profile = "minimal"

src/arrow2/src/bitmap/immutable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ impl Bitmap {
125125
///
126126
/// The returned tuple contains:
127127
/// * `.1`: The byte slice, truncated to the start of the first bit. So the start of the slice
128-
/// is within the first 8 bits.
128+
/// is within the first 8 bits.
129129
/// * `.2`: The start offset in bits on a range `0 <= offsets < 8`.
130130
/// * `.3`: The length in number of bits.
131131
#[inline]

src/arrow2/src/compute/sort/row/fixed.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ pub trait FixedLengthEncoding: Copy {
4848

4949
fn encode(self) -> Self::Encoded;
5050

51+
#[allow(dead_code)]
5152
fn decode(encoded: Self::Encoded) -> Self;
5253
}
5354

src/arrow2/src/compute/sort/row/mod.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,16 @@ use std::{
3636
sync::Arc,
3737
};
3838

39-
use crate::{
40-
array::{Array, BinaryArray, BooleanArray, DictionaryArray, PrimitiveArray, Utf8Array},
41-
datatypes::PhysicalType,
42-
error::*,
43-
};
44-
use crate::{compute::sort::SortOptions, datatypes::DataType};
45-
4639
use self::{
4740
dictionary::{compute_dictionary_mapping, encode_dictionary},
4841
interner::OrderPreservingInterner,
4942
};
43+
use crate::{
44+
array::{Array, BinaryArray, BooleanArray, DictionaryArray, PrimitiveArray, Utf8Array},
45+
compute::sort::SortOptions,
46+
datatypes::{DataType, PhysicalType},
47+
error::*,
48+
};
5049

5150
mod dictionary;
5251
mod fixed;
@@ -378,7 +377,7 @@ impl<'a> Eq for Row<'a> {}
378377
impl<'a> PartialOrd for Row<'a> {
379378
#[inline]
380379
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
381-
Some(self.data.cmp(other.data))
380+
Some(self.cmp(other))
382381
}
383382
}
384383

src/arrow2/src/io/parquet/mod.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,8 @@ impl From<parquet2::error::Error> for Error {
1919
.to_string();
2020
Error::ExternalFormat(message)
2121
}
22-
parquet2::error::Error::Transport(msg) => {
23-
Error::Io(std::io::Error::new(std::io::ErrorKind::Other, msg))
24-
}
25-
parquet2::error::Error::IoError(msg) => {
26-
Error::Io(std::io::Error::new(std::io::ErrorKind::Other, msg))
27-
}
22+
parquet2::error::Error::Transport(msg) => Error::Io(std::io::Error::other(msg)),
23+
parquet2::error::Error::IoError(msg) => Error::Io(std::io::Error::other(msg)),
2824
_ => Error::ExternalFormat(error.to_string()),
2925
}
3026
}

src/arrow2/src/io/parquet/read/deserialize/nested_utils.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ use parquet2::{
66
read::levels::get_bit_width,
77
};
88

9+
use super::{
10+
super::Pages,
11+
utils::{DecodedState, MaybeNext, PageState},
12+
};
913
use crate::{array::Array, bitmap::MutableBitmap, error::Result};
1014

11-
use super::utils::{DecodedState, MaybeNext};
12-
use super::{super::Pages, utils::PageState};
13-
1415
/// trait describing deserialized repetition and definition levels
1516
pub trait Nested: std::fmt::Debug + Send + Sync {
1617
fn inner(&mut self) -> (Vec<i64>, Option<MutableBitmap>);
@@ -455,8 +456,7 @@ pub(super) fn extend<'a, D: NestedDecoder<'a>>(
455456
/// * `decoded` - The state of our decoded values.
456457
/// * `decoder` - The decoder for the leaf-level type.
457458
/// * `additional` - The number of top-level rows to read for the current chunk. This is the
458-
/// min of `chunk size - number of rows existing in the current chunk` and
459-
/// `rows_remaining`.
459+
/// min of `chunk size - number of rows existing in the current chunk` and `rows_remaining`.
460460
#[allow(clippy::too_many_arguments)]
461461
fn extend_offsets2<'a, D: NestedDecoder<'a>>(
462462
page: &mut NestedPage<'a>,

0 commit comments

Comments
 (0)