Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revive CI after misconfigured GHA job #42

Merged
merged 12 commits into from
Sep 11, 2024
108 changes: 54 additions & 54 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
strategy:
matrix:
arch: [amd64]
rust: [nightly-2022-06-22]
rust: [nightly-2024-01-29]
container:
image: ${{ matrix.arch }}/rust
env:
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
strategy:
matrix:
arch: [amd64]
rust: [nightly-2022-06-22]
rust: [nightly-2024-01-29]
container:
image: ${{ matrix.arch }}/rust
env:
Expand Down Expand Up @@ -120,61 +120,61 @@ jobs:
cargo run --example read_csv_infer_schema

# test the --features "simd" of the arrow crate. This requires nightly.
linux-test-simd:
name: Test SIMD on AMD64 Rust ${{ matrix.rust }}
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64]
rust: []
container:
image: ${{ matrix.arch }}/rust
env:
# Disable full debug symbol generation to speed up CI build and keep memory down
# "1" means line tables only, which is useful for panic tracebacks.
RUSTFLAGS: "-C debuginfo=1"
ARROW_TEST_DATA: /__w/arrow-rs/arrow-rs/testing/data
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Cache Cargo
uses: actions/cache@v2
with:
path: /github/home/.cargo
# this key equals the ones on `linux-build-lib` for re-use
key: cargo-cache-
- name: Cache Rust dependencies
uses: actions/cache@v2
with:
path: /github/home/target
# this key equals the ones on `linux-build-lib` for re-use
key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}
- name: Setup Rust toolchain
run: |
rustup toolchain install ${{ matrix.rust }}
rustup default ${{ matrix.rust }}
rustup component add rustfmt
- name: Run tests
run: |
export CARGO_HOME="/github/home/.cargo"
export CARGO_TARGET_DIR="/github/home/target"
cd arrow
cargo test --features "simd"
- name: Check new project build with simd features
run: |
export CARGO_HOME="/github/home/.cargo"
export CARGO_TARGET_DIR="/github/home/target"
cd arrow/test/dependency/simd
cargo check
# linux-test-simd:
# name: Test SIMD on AMD64 Rust ${{ matrix.rust }}
# runs-on: ubuntu-latest
# strategy:
# matrix:
# arch: [amd64]
# rust: []
# container:
# image: ${{ matrix.arch }}/rust
# env:
# # Disable full debug symbol generation to speed up CI build and keep memory down
# # "1" means line tables only, which is useful for panic tracebacks.
# RUSTFLAGS: "-C debuginfo=1"
# ARROW_TEST_DATA: /__w/arrow-rs/arrow-rs/testing/data
# steps:
# - uses: actions/checkout@v2
# with:
# submodules: true
# - name: Cache Cargo
# uses: actions/cache@v2
# with:
# path: /github/home/.cargo
# # this key equals the ones on `linux-build-lib` for re-use
# key: cargo-cache-
# - name: Cache Rust dependencies
# uses: actions/cache@v2
# with:
# path: /github/home/target
# # this key equals the ones on `linux-build-lib` for re-use
# key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}
# - name: Setup Rust toolchain
# run: |
# rustup toolchain install ${{ matrix.rust }}
# rustup default ${{ matrix.rust }}
# rustup component add rustfmt
# - name: Run tests
# run: |
# export CARGO_HOME="/github/home/.cargo"
# export CARGO_TARGET_DIR="/github/home/target"
# cd arrow
# cargo test --features "simd"
# - name: Check new project build with simd features
# run: |
# export CARGO_HOME="/github/home/.cargo"
# export CARGO_TARGET_DIR="/github/home/target"
# cd arrow/test/dependency/simd
# cargo check

windows-and-macos:
name: Test on ${{ matrix.os }} Rust ${{ matrix.rust }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest]
rust: [nightly-2022-06-22]
rust: [nightly-2024-01-29]
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
strategy:
matrix:
arch: [amd64]
rust: [nightly-2022-06-22]
rust: [nightly-2024-01-29]
container:
image: ${{ matrix.arch }}/rust
env:
Expand Down Expand Up @@ -257,7 +257,7 @@ jobs:
strategy:
matrix:
arch: [amd64]
rust: [nightly-2022-06-22]
rust: [nightly-2024-01-29]
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -297,7 +297,7 @@ jobs:
strategy:
matrix:
arch: [amd64]
rust: [nightly-2022-06-22]
rust: [nightly-2024-01-29]
container:
image: ${{ matrix.arch }}/rust
env:
Expand Down Expand Up @@ -341,7 +341,7 @@ jobs:
strategy:
matrix:
arch: [amd64]
rust: [nightly-2022-06-22]
rust: [nightly-2024-01-29]
container:
image: ${{ matrix.arch }}/rust
env:
Expand Down
7 changes: 7 additions & 0 deletions arrow-flight/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,10 @@ proc-macro2 = "1.0.27"
#[lib]
#name = "flight"
#path = "src/lib.rs"

# Just silence all of prolematic rules in original code
# This list should be updated during rebasing on new release, before our commits, but after toolchain updates
# That way we would disable only the rules that are violated by upstream code, but not by ours

[lints.clippy]
needless_borrow = "allow"
48 changes: 48 additions & 0 deletions arrow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ memory-check = []
[dev-dependencies]
criterion = "0.3"
flate2 = "1"
rand = "0.8"
tempfile = "3"

[build-dependencies]
Expand Down Expand Up @@ -163,3 +164,50 @@ harness = false
[[bench]]
name = "buffer_create"
harness = false


# Just silence all of prolematic rules in original code
# This list should be updated during rebasing on new release, before our commits, but after toolchain updates
# That way we would disable only the rules that are violated by upstream code, but not by ours

[lints.rust]
deprecated = "allow"
unreachable_patterns = "allow"
unused_imports = "allow"
unused_must_use = "allow"

[lints.clippy]
# Can drop this rule after rebase on commit 55d6073 "Require Send+Sync bounds for Allocation trait (#1945)", first released in 18.0.0
arc_with_non_send_sync = "allow"
borrow_deref_ref = "allow"
derivable_impls = "allow"
get_first = "allow"
err_expect = "allow"
extra_unused_lifetimes = "allow"
extra_unused_type_parameters = "allow"
into_iter_on_ref = "allow"
manual_bits = "allow"
manual_slice_size_calculation = "allow"
map_flatten = "allow"
needless_borrow = "allow"
needless_borrowed_reference = "allow"
needless_borrows_for_generic_args = "allow"
needless_late_init = "allow"
needless_lifetimes = "allow"
needless_question_mark = "allow"
needless_return = "allow"
non_canonical_partial_ord_impl = "allow"
non_minimal_cfg = "allow"
nonminimal_bool = "allow"
only_used_in_recursion = "allow"
partialeq_to_none = "allow"
redundant_closure = "allow"
redundant_closure_call = "allow"
seek_from_current = "allow"
suspicious_doc_comments = "allow"
to_string_in_format_args = "allow"
unnecessary_cast = "allow"
unnecessary_fallible_conversions = "allow"
unwrap_or_default = "allow"
useless_conversion = "allow"
useless_vec = "allow"
2 changes: 1 addition & 1 deletion arrow/src/compute/kernels/comparison.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ where
/// use arrow::compute::like_utf8;
///
/// let strings = StringArray::from(vec!["Arrow", "Arrow", "Arrow", "Ar"]);
/// let patterns = StringArray::from(vec!["A%", "B%", "A.", "A."]);
/// let patterns = StringArray::from(vec!["A%", "B%", "A.", "A_"]);
///
/// let result = like_utf8(&strings, &patterns).unwrap();
/// assert_eq!(result, BooleanArray::from(vec![true, false, false, true]));
Expand Down
6 changes: 3 additions & 3 deletions arrow/src/compute/kernels/substring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,11 @@ mod tests {

cases.into_iter().try_for_each::<_, Result<()>>(
|(array, start, length, expected)| {
let array = StringArray::from(array);
let array = T::from(array.iter().copied().map(Some).collect());
let result = substring(&array, start, &length)?;
assert_eq!(array.len(), result.len());
let result = result.as_any().downcast_ref::<StringArray>().unwrap();
let expected = StringArray::from(expected);
let result = result.as_any().downcast_ref::<T>().unwrap();
let expected = T::from(expected.iter().copied().map(Some).collect());
assert_eq!(&expected, result,);
Ok(())
},
Expand Down
4 changes: 2 additions & 2 deletions arrow/src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ unsafe extern "C" fn release_schema(schema: *mut FFI_ArrowSchema) {
let schema = &mut *schema;

// take ownership back to release it.
CString::from_raw(schema.format as *mut c_char);
drop(CString::from_raw(schema.format as *mut c_char));
if !schema.name.is_null() {
CString::from_raw(schema.name as *mut c_char);
drop(CString::from_raw(schema.name as *mut c_char));
}
if !schema.private_data.is_null() {
let private_data = Box::from_raw(schema.private_data as *mut SchemaPrivateData);
Expand Down
2 changes: 1 addition & 1 deletion arrow/src/json/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2350,7 +2350,7 @@ mod tests {
let re = builder.build(Cursor::new(json_content));
assert_eq!(
re.err().unwrap().to_string(),
r#"Json error: Expected JSON record to be an object, found Array([Number(1), String("hello")])"#,
r#"Json error: Expected JSON record to be an object, found Array [Number(1), String("hello")]"#,
);
}

Expand Down
2 changes: 1 addition & 1 deletion arrow/src/json/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ mod tests {

assert_eq!(
String::from_utf8(buf).unwrap(),
r#"{"duration_sec":"PT120S","duration_msec":"PT0.120S","duration_usec":"PT0.000120S","duration_nsec":"PT0.000000120S","name":"a"}
r#"{"duration_sec":"PT120S","duration_msec":"PT0.12S","duration_usec":"PT0.00012S","duration_nsec":"PT0.00000012S","name":"a"}
{"name":"b"}
"#
);
Expand Down
8 changes: 0 additions & 8 deletions arrow/src/util/integration_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,6 @@ impl ArrowJsonBatch {
let arr = Int64Array::from(arr.data().clone());
arr.equals_json(&json_array.iter().collect::<Vec<&Value>>()[..])
}
DataType::Int64
| DataType::Date64
| DataType::Time64(_)
| DataType::Timestamp(_, _)
| DataType::Duration(_) => {
let arr = Int64Array::from(arr.data().clone());
arr.equals_json(&json_array.iter().collect::<Vec<&Value>>()[..])
}
DataType::Interval(IntervalUnit::YearMonth) => {
let arr = IntervalYearMonthArray::from(arr.data().clone());
arr.equals_json(&json_array.iter().collect::<Vec<&Value>>()[..])
Expand Down
11 changes: 11 additions & 0 deletions integration-testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,14 @@ serde_json = { version = "1.0", features = ["preserve_order"] }
tokio = { version = "1.0", features = ["macros", "rt", "rt-multi-thread"] }
tonic = "0.4"
tracing-subscriber = { version = "0.2.15", optional = true }

# Just silence all of prolematic rules in original code
# This list should be updated during rebasing on new release, before our commits, but after toolchain updates
# That way we would disable only the rules that are violated by upstream code, but not by ours

[lints.rust]
dead_code = "allow"

[lints.clippy]
get_first = "allow"
needless_borrow = "allow"
36 changes: 35 additions & 1 deletion parquet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,38 @@ harness = false

[[bench]]
name = "arrow_array_reader"
harness = false
harness = false

# Just silence all of prolematic rules in original code
# This list should be updated during rebasing on new release, before our commits, but after toolchain updates
# That way we would disable only the rules that are violated by upstream code, but not by ours

[lints.rust]
deprecated = "allow"
unused_imports = "allow"
unused_mut = "allow"

[lints.clippy]
# Can drop this rule after rebase on commit 55d6073 "Require Send+Sync bounds for Allocation trait (#1945)", first released in 18.0.0
arc_with_non_send_sync = "allow"
derivable_impls = "allow"
enum_variant_names = "allow"
extra_unused_lifetimes = "allow"
get_first = "allow"
let_and_return = "allow"
needless_borrow = "allow"
needless_borrowed_reference = "allow"
needless_borrows_for_generic_args = "allow"
needless_lifetimes = "allow"
needless_return = "allow"
nonminimal_bool = "allow"
partialeq_to_none = "allow"
seek_from_current = "allow"
should_implement_trait = "allow"
unnecessary_cast = "allow"
unnecessary_to_owned = "allow"
unused_io_amount = "allow"
useless_conversion = "allow"
useless_format = "allow"
useless_vec = "allow"
wrong_self_convention = "allow"
6 changes: 5 additions & 1 deletion parquet/src/column/page.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,11 @@ pub trait PageWriter {
///
/// This method is called for every compressed page we write into underlying buffer,
/// either data page or dictionary page.
fn write_page(&mut self, page: CompressedPage, aad_page_ordinal: Option<u16>) -> Result<PageWriteSpec>;
fn write_page(
&mut self,
page: CompressedPage,
aad_page_ordinal: Option<u16>,
) -> Result<PageWriteSpec>;

/// Writes column chunk metadata into the output stream/sink.
///
Expand Down
Loading
Loading