Skip to content

Commit ae04c8a

Browse files
authored
ci: check MSRV correctly (#849)
1 parent 7addc3f commit ae04c8a

File tree

11 files changed

+77
-44
lines changed

11 files changed

+77
-44
lines changed

.github/actions/setup-builder/action.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,24 @@ name: Prepare Rust Builder
2121
description: 'Prepare Rust Build Environment'
2222
inputs:
2323
rust-version:
24-
description: 'version of rust to install (e.g. stable)'
25-
required: true
26-
default: 'stable'
24+
description: 'version of rust to install and use'
2725
runs:
2826
using: "composite"
2927
steps:
30-
- name: Setup Rust toolchain
28+
- name: Setup specified Rust toolchain
3129
shell: bash
30+
if: ${{ inputs.rust-version != '' }}
3231
run: |
3332
echo "Installing ${{ inputs.rust-version }}"
3433
rustup toolchain install ${{ inputs.rust-version }}
35-
rustup default ${{ inputs.rust-version }}
34+
rustup override set ${{ inputs.rust-version }}
35+
rustup component add rustfmt clippy
36+
- name: Setup Rust toolchain according to rust-toolchain.toml
37+
shell: bash
38+
if: ${{ inputs.rust-version == '' }}
39+
run: |
40+
echo "Installing toolchain according to rust-toolchain.toml"
41+
rustup show
3642
rustup component add rustfmt clippy
3743
- name: Fixup git permissions
3844
# https://github.com/actions/checkout/issues/766

.github/workflows/ci.yml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
4343
steps:
4444
- uses: actions/checkout@v4
4545

46+
- name: Setup Rust toolchain
47+
uses: ./.github/actions/setup-builder
48+
4649
- name: Check License Header
4750
uses: apache/skywalking-eyes/header@v0.6.0
4851

@@ -89,8 +92,6 @@ jobs:
8992

9093
- name: Setup Rust toolchain
9194
uses: ./.github/actions/setup-builder
92-
with:
93-
rust-version: ${{ env.rust_msrv }}
9495

9596
- name: Cache Rust artifacts
9697
uses: Swatinem/rust-cache@v2
@@ -109,6 +110,9 @@ jobs:
109110
steps:
110111
- uses: actions/checkout@v4
111112

113+
- name: Setup Rust toolchain
114+
uses: ./.github/actions/setup-builder
115+
112116
- name: Cache Rust artifacts
113117
uses: Swatinem/rust-cache@v2
114118

@@ -122,8 +126,6 @@ jobs:
122126

123127
- name: Setup Rust toolchain
124128
uses: ./.github/actions/setup-builder
125-
with:
126-
rust-version: ${{ env.rust_msrv }}
127129

128130
- name: Cache Rust artifacts
129131
uses: Swatinem/rust-cache@v2
@@ -136,3 +138,24 @@ jobs:
136138

137139
- name: Doc Test
138140
run: cargo test --no-fail-fast --doc --all-features --workspace
141+
142+
msrv:
143+
name: Verify MSRV
144+
runs-on: ubuntu-latest
145+
steps:
146+
- uses: actions/checkout@v4
147+
- name: Setup Nightly Rust toolchain
148+
uses: ./.github/actions/setup-builder
149+
- name: Generate minimal versions lockfile
150+
run: |
151+
cargo generate-lockfile -Z direct-minimal-versions -Z minimal-versions
152+
# Some dependencies don't correctly specify a minimal version for their dependencies and will fail to build.
153+
# So we update these transitive dependencies here.
154+
cargo update tap faststr metainfo linkedbytes
155+
- name: Setup MSRV Rust toolchain
156+
uses: ./.github/actions/setup-builder
157+
with:
158+
rust-version: ${{ env.rust_msrv }}
159+
- name: Check MSRV
160+
run: |
161+
cargo +${{ env.rust_msrv }} check --locked --workspace --exclude iceberg-datafusion --exclude iceberg-catalog-s3tables

Cargo.toml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -41,62 +41,62 @@ rust-version = "1.77.1"
4141
anyhow = "1.0.72"
4242
apache-avro = "0.17"
4343
array-init = "2"
44-
arrow-arith = { version = "53" }
45-
arrow-array = { version = "53" }
46-
arrow-cast = { version = "53" }
47-
arrow-ord = { version = "53" }
48-
arrow-schema = { version = "53" }
49-
arrow-select = { version = "53" }
50-
arrow-string = { version = "53" }
44+
arrow-arith = { version = "53.3.0" }
45+
arrow-array = { version = "53.3.0" }
46+
arrow-cast = { version = "53.3.0" }
47+
arrow-ord = { version = "53.3.0" }
48+
arrow-schema = { version = "53.3.0" }
49+
arrow-select = { version = "53.3.0" }
50+
arrow-string = { version = "53.3.0" }
5151
async-stream = "0.3.5"
52-
async-trait = "0.1"
52+
async-trait = "0.1.73"
5353
async-std = "1.12"
54-
aws-config = "1.5.13"
55-
aws-sdk-glue = "1.76"
54+
aws-config = "1"
55+
aws-sdk-glue = "1.39"
5656
bimap = "0.6"
5757
bitvec = "1.0.1"
58-
bytes = "1.5"
59-
chrono = "0.4.34"
58+
bytes = "1.6"
59+
chrono = "0.4.38"
6060
ctor = "0.2.8"
6161
derive_builder = "0.20"
6262
either = "1"
6363
env_logger = "0.11.0"
64-
fnv = "1"
64+
fnv = "1.0.7"
6565
futures = "0.3"
6666
iceberg = { version = "0.4.0", path = "./crates/iceberg" }
6767
iceberg-catalog-rest = { version = "0.4.0", path = "./crates/catalog/rest" }
6868
iceberg-catalog-hms = { version = "0.4.0", path = "./crates/catalog/hms" }
6969
iceberg-catalog-memory = { version = "0.4.0", path = "./crates/catalog/memory" }
7070
iceberg-datafusion = { version = "0.4.0", path = "./crates/integrations/datafusion" }
7171
itertools = "0.13"
72-
log = "0.4"
72+
log = "0.4.22"
7373
mockito = "1"
7474
murmur3 = "0.5.2"
7575
num-bigint = "0.4.6"
76-
once_cell = "1"
76+
once_cell = "1.19"
7777
opendal = "0.51.0"
7878
ordered-float = "4"
79-
parquet = "53.1"
80-
paste = "1"
79+
parquet = "53.3.0"
80+
paste = "1.0.15"
8181
pilota = "0.11.2"
8282
pretty_assertions = "1.4"
8383
port_scanner = "0.1.5"
84-
rand = "0.8"
84+
rand = "0.8.5"
8585
regex = "1.10.5"
86-
reqwest = { version = "0.12", default-features = false, features = ["json"] }
86+
reqwest = { version = "0.12.2", default-features = false, features = ["json"] }
8787
rust_decimal = "1.31"
88-
serde = { version = "1", features = ["rc"] }
89-
serde_bytes = "0.11.8"
90-
serde_derive = "1"
91-
serde_json = "1"
88+
serde = { version = "1.0.204", features = ["rc"] }
89+
serde_bytes = "0.11.15"
90+
serde_derive = "1.0.204"
91+
serde_json = "1.0.120"
9292
serde_repr = "0.1.16"
9393
serde_with = "3.4"
9494
tempfile = "3.15"
95-
tokio = { version = "1", default-features = false }
95+
tokio = { version = "1.36", default-features = false }
9696
typed-builder = "0.20"
97-
url = "2"
97+
url = "2.2.2"
9898
urlencoding = "2"
99-
uuid = { version = "1.6.1", features = ["v7"] }
99+
uuid = { version = "1.10.0", features = ["v7"] }
100100
volo-thrift = "0.10"
101101
hive_metastore = "0.1"
102102
tera = "1"

crates/catalog/rest/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ chrono = { workspace = true }
3535
http = "1.1.0"
3636
iceberg = { workspace = true }
3737
itertools = { workspace = true }
38-
log = "0.4.20"
38+
log = { workspace = true }
3939
reqwest = { workspace = true }
4040
serde = { workspace = true }
4141
serde_derive = { workspace = true }

crates/catalog/s3tables/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ name = "iceberg-catalog-s3tables"
2020
version = { workspace = true }
2121
edition = { workspace = true }
2222
homepage = { workspace = true }
23-
rust-version = { workspace = true }
23+
rust-version = "1.81.0"
2424

2525
categories = ["database"]
2626
description = "Apache Iceberg Rust S3Tables Catalog"

crates/catalog/sql/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ uuid = { workspace = true, features = ["v4"] }
4040
iceberg_test_utils = { path = "../../test_utils", features = ["tests"] }
4141
itertools = { workspace = true }
4242
regex = "1.10.5"
43-
sqlx = { version = "0.8.0", features = [
43+
sqlx = { version = "0.8.1", features = [
4444
"tls-rustls",
4545
"runtime-tokio",
4646
"any",

crates/examples/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ rust-version = { workspace = true }
2727
[dependencies]
2828
iceberg = { workspace = true }
2929
iceberg-catalog-rest = { workspace = true }
30-
tokio = { version = "1", features = ["full"] }
30+
tokio = { workspace = true, features = ["full"] }
3131

3232
[[example]]
3333
name = "rest-catalog-namespace"

crates/iceberg/src/io/object_cache.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
use std::mem::size_of_val;
1819
use std::sync::Arc;
1920

2021
use crate::io::FileIO;

crates/iceberg/src/utils.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
use std::num::NonZero;
18+
use std::num::NonZeroUsize;
1919

2020
// Use a default value of 1 as the safest option.
2121
// See https://doc.rust-lang.org/std/thread/fn.available_parallelism.html#limitations
@@ -31,12 +31,12 @@ const DEFAULT_PARALLELISM: usize = 1;
3131
/// are circumstances where the level of available
3232
/// parallelism can change during the lifetime of an executing
3333
/// process, but this should not be called in a hot loop.
34-
pub(crate) fn available_parallelism() -> NonZero<usize> {
34+
pub(crate) fn available_parallelism() -> NonZeroUsize {
3535
std::thread::available_parallelism().unwrap_or_else(|_err| {
3636
// Failed to get the level of parallelism.
3737
// TODO: log/trace when this fallback occurs.
3838

3939
// Using a default value.
40-
NonZero::new(DEFAULT_PARALLELISM).unwrap()
40+
NonZeroUsize::new(DEFAULT_PARALLELISM).unwrap()
4141
})
4242
}

crates/integrations/datafusion/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ name = "iceberg-datafusion"
2020
version = { workspace = true }
2121
edition = { workspace = true }
2222
homepage = { workspace = true }
23-
rust-version = { workspace = true }
23+
# kept the same as DataFusion's MSRV
24+
# https://github.com/apache/datafusion?tab=readme-ov-file#rust-version-compatibility-policy
25+
# https://github.com/apache/datafusion/blob/main/Cargo.toml#L68
26+
rust-version = "1.80.1"
2427

2528
categories = ["database"]
2629
description = "Apache Iceberg DataFusion Integration"

crates/test_utils/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ license = { workspace = true }
2727

2828
[dependencies]
2929
env_logger = { workspace = true }
30-
log = "0.4.20"
30+
log = { workspace = true }
3131

3232
[features]
3333
tests = []

0 commit comments

Comments
 (0)