File tree 24 files changed +98
-112
lines changed
24 files changed +98
-112
lines changed Original file line number Diff line number Diff line change 4
4
hooks :
5
5
- id : nixpkgs-fmt
6
6
- repo : https://github.com/pre-commit/pre-commit-hooks
7
- rev : v4 .0.1
7
+ rev : v5 .0.0
8
8
hooks :
9
9
- id : trailing-whitespace
10
10
- repo : local
Original file line number Diff line number Diff line change @@ -5,27 +5,21 @@ edition = "2021"
5
5
6
6
7
7
[build-dependencies ]
8
- tonic-build = " 0.10.2 "
8
+ tonic-build = " 0.12.3 "
9
9
10
10
[dependencies ]
11
- async-nats = " 0.32.1 "
12
- bytes = " 1.5 .0"
13
- serde = " 1.0.188 "
14
- serde_json = " 1.0.107 "
15
- tokio = " 1.32 .0"
16
- tracing = " 0.1.37 "
17
- uuid = { version = " 1.4.1 " , features = [" v4" ] }
18
- async-trait = " 0.1.73 "
19
- futures = " 0.3.28 "
20
- snafu = " 0.7 .5"
21
- tonic = " 0.10.2 "
22
- prost = " 0.12.1 "
23
- chrono = " 0.4.31 "
24
- once_cell = " 1.18.0 "
11
+ async-nats = " 0.37.0 "
12
+ bytes = " 1.8 .0"
13
+ serde = " 1.0.214 "
14
+ serde_json = " 1.0.132 "
15
+ tokio = " 1.41 .0"
16
+ tracing = " 0.1.40 "
17
+ uuid = { version = " 1.11.0 " , features = [" v4" ] }
18
+ async-trait = " 0.1.83 "
19
+ futures = " 0.3.31 "
20
+ snafu = " 0.8 .5"
21
+ tonic = " 0.12.3 "
22
+ prost = " 0.13.3 "
23
+ chrono = " 0.4.38 "
24
+ once_cell = " 1.20.2 "
25
25
prost-extend = { path = " ../../prost-extend" }
26
-
27
- [dev-dependencies .serde ]
28
- # v1.0.198 introduces a breaking change by making use of unstable feature saturating_int_impl!
29
- # Let's ensure we don't use v.1.0.198 or newer until we upgrade the compiler!
30
- # https://github.com/serde-rs/serde/issues/2734
31
- version = " >=1.0.188,<1.0.198"
Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ fn main() {
3
3
. type_attribute ( "." , "#[derive(serde::Deserialize, serde::Serialize)]" )
4
4
. extern_path ( ".google.protobuf.Timestamp" , "::prost_extend::Timestamp" )
5
5
. extern_path ( ".google.protobuf.Duration" , "::prost_extend::Duration" )
6
- . compile ( & [ "protobuf/v1/event.proto" ] , & [ "protobuf/" ] )
6
+ . compile_protos ( & [ "protobuf/v1/event.proto" ] , & [ "protobuf/" ] )
7
7
. unwrap_or_else ( |e| panic ! ( "event v1 protobuf compilation failed: {e}" ) ) ;
8
8
}
Original file line number Diff line number Diff line change @@ -4,22 +4,16 @@ version = "1.0.0"
4
4
edition = " 2021"
5
5
6
6
[build-dependencies ]
7
- tonic-build = " 0.10.2 "
8
- prost-build = " 0.12.1 "
7
+ tonic-build = " 0.12.3 "
8
+ prost-build = " 0.13.3 "
9
9
10
10
[dependencies ]
11
- tonic = " 0.10.2 "
12
- bytes = " 1.5 .0"
13
- prost = " 0.12.1 "
14
- prost-derive = " 0.12.1 "
11
+ tonic = " 0.12.3 "
12
+ bytes = " 1.8 .0"
13
+ prost = " 0.13.3 "
14
+ prost-derive = " 0.13.3 "
15
15
prost-extend = { path = " ../../prost-extend" }
16
- prost-types = " 0.12.1"
17
- serde = { version = " 1.0.188" , features = [" derive" ] }
18
- serde_derive = " 1.0.188"
19
- serde_json = " 1.0.107"
20
-
21
- [dev-dependencies .serde ]
22
- # v1.0.198 introduces a breaking change by making use of unstable feature saturating_int_impl!
23
- # Let's ensure we don't use v.1.0.198 or newer until we upgrade the compiler!
24
- # https://github.com/serde-rs/serde/issues/2734
25
- version = " >=1.0.188,<1.0.198"
16
+ prost-types = " 0.13.3"
17
+ serde = { version = " 1.0.214" , features = [" derive" ] }
18
+ serde_derive = " 1.0.214"
19
+ serde_json = " 1.0.132"
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ fn main() {
10
10
. build_server ( true )
11
11
. type_attribute ( "." , "#[derive(serde::Serialize, serde::Deserialize)]" )
12
12
. extern_path ( ".google.protobuf.Timestamp" , "::prost_extend::Timestamp" )
13
- . compile ( & [ "protobuf/mayastor.proto" ] , & [ "protobuf" ] )
13
+ . compile_protos ( & [ "protobuf/mayastor.proto" ] , & [ "protobuf" ] )
14
14
. unwrap_or_else ( |e| panic ! ( "io-engine protobuf compilation failed: {}" , e) ) ;
15
15
16
16
tonic_build:: configure ( )
@@ -19,7 +19,7 @@ fn main() {
19
19
. type_attribute ( "." , "#[derive(serde::Serialize, serde::Deserialize)]" )
20
20
. extern_path ( ".google.protobuf.Timestamp" , "::prost_extend::Timestamp" )
21
21
. extern_path ( ".google.protobuf.Duration" , "::prost_extend::Duration" )
22
- . compile (
22
+ . compile_protos (
23
23
& [
24
24
"protobuf/v1/bdev.proto" ,
25
25
"protobuf/v1/json.proto" ,
Original file line number Diff line number Diff line change 6
6
// Include Rust sources generated by protobuf.
7
7
#![ allow( unknown_lints) ]
8
8
#![ allow( clippy:: derive_partial_eq_without_eq) ]
9
+ #![ allow( clippy:: doc_lazy_continuation) ]
9
10
tonic:: include_proto!( "mayastor.v1" ) ;
10
11
}
11
12
Original file line number Diff line number Diff line change @@ -7,17 +7,11 @@ edition = "2018"
7
7
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
8
8
9
9
[dependencies ]
10
- tokio = { version = " 1.32 .0" , features = [ " full" ] }
11
- futures = " 0.3.28 "
12
- tracing = " 0.1.37 "
13
- once_cell = " 1.18.0 "
10
+ tokio = { version = " 1.41 .0" , features = [ " full" ] }
11
+ futures = " 0.3.31 "
12
+ tracing = " 0.1.40 "
13
+ once_cell = " 1.20.2 "
14
14
ipnetwork = " 0.20.0"
15
- bollard = " 0.15.0"
16
- strum = " 0.25"
17
- strum_macros = " 0.25"
18
-
19
- [dev-dependencies .serde ]
20
- # v1.0.198 introduces a breaking change by making use of unstable feature saturating_int_impl!
21
- # Let's ensure we don't use v.1.0.198 or newer until we upgrade the compiler!
22
- # https://github.com/serde-rs/serde/issues/2734
23
- version = " >=1.0.188,<1.0.198"
15
+ bollard = " 0.17.1"
16
+ strum = " 0.26"
17
+ strum_macros = " 0.26"
Original file line number Diff line number Diff line change @@ -1782,13 +1782,11 @@ impl ComposeTest {
1782
1782
tracing:: trace!( "Stopping {name:?}/{id}" ) ;
1783
1783
self . stop_id ( & id)
1784
1784
. await
1785
- . map_err ( |error | {
1785
+ . inspect_err ( |_ | {
1786
1786
tracing:: trace!( "Failed to stop {name:?}/{id}" ) ;
1787
- error
1788
1787
} )
1789
- . map ( |ok | {
1788
+ . inspect ( |_ | {
1790
1789
tracing:: trace!( "Stopped {name:?}/{id}" ) ;
1791
- ok
1792
1790
} )
1793
1791
} )
1794
1792
. collect :: < Vec < _ > > ( ) ;
Original file line number Diff line number Diff line change 5
5
edition = " 2018"
6
6
7
7
[dependencies ]
8
- nix = { version = " 0.27.1 " , default-features = false , features = [ " feature" ] }
9
- semver = " 1.0.20 "
10
- snafu = " 0.7 .5"
11
- url = " 2.4.1 "
12
- uuid = { version = " 1.4.1 " , features = [" v4" ] }
8
+ nix = { version = " 0.29.0 " , default-features = false , features = [ " feature" ] }
9
+ semver = " 1.0.23 "
10
+ snafu = " 0.8 .5"
11
+ url = " 2.5.2 "
12
+ uuid = { version = " 1.11.0 " , features = [" v4" ] }
13
13
[build-dependencies ]
14
- bindgen = " 0.68 .1"
14
+ bindgen = " 0.70 .1"
15
15
16
16
[target .'cfg(target_os="linux")' .dependencies ]
17
- udev = " 0.8.0 "
17
+ udev = " 0.9.1 "
Original file line number Diff line number Diff line change @@ -100,7 +100,6 @@ impl FromStr for MountInfo {
100
100
101
101
impl MountInfo {
102
102
/// Attempt to parse a `/proc/mounts`-like line.
103
-
104
103
fn fetch_from_disk_by_path ( path : & str ) -> io:: Result < PathBuf > {
105
104
PartitionID :: from_disk_by_path ( path)
106
105
. map_err ( |why| Error :: new ( ErrorKind :: InvalidData , format ! ( "{path}: {why}" ) ) ) ?
Original file line number Diff line number Diff line change @@ -4,14 +4,8 @@ version = "0.1.0"
4
4
edition = " 2021"
5
5
6
6
[dependencies ]
7
- tracing-subscriber = { version = " 0.3.17 " , features = [ " env-filter" ] }
8
- tokio = { version = " 1.32 .0" }
9
- tracing = " 0.1.37 "
10
- serde_json = " 1.0.107 "
7
+ tracing-subscriber = { version = " 0.3.18 " , features = [ " env-filter" ] }
8
+ tokio = { version = " 1.41 .0" }
9
+ tracing = " 0.1.40 "
10
+ serde_json = " 1.0.132 "
11
11
events-api = { path = " ../apis/events" }
12
-
13
- [dev-dependencies .serde ]
14
- # v1.0.198 introduces a breaking change by making use of unstable feature saturating_int_impl!
15
- # Let's ensure we don't use v.1.0.198 or newer until we upgrade the compiler!
16
- # https://github.com/serde-rs/serde/issues/2734
17
- version = " >=1.0.188,<1.0.198"
Original file line number Diff line number Diff line change 5
5
"homepage" : " " ,
6
6
"owner" : " NixOS" ,
7
7
"repo" : " nixpkgs" ,
8
- "rev" : " 35f9f5784eb50cabac4db09c8c11035dacf36411 " ,
9
- "sha256" : " 1gq4ajsmg2f5jdmbdhdavcnlg32bzynvvidvb4648pk4gdcnr49h " ,
8
+ "rev" : " b06ca0fab3185980a7501d7db273bb9f864580d4 " ,
9
+ "sha256" : " 08pvwij6855wyxq6giyjwj3mdbrl118zzvbr7xdynmb7w9r9lv0l " ,
10
10
"type" : " tarball" ,
11
- "url" : " https://github.com/NixOS/nixpkgs/archive/35f9f5784eb50cabac4db09c8c11035dacf36411 .tar.gz" ,
11
+ "url" : " https://github.com/NixOS/nixpkgs/archive/b06ca0fab3185980a7501d7db273bb9f864580d4 .tar.gz" ,
12
12
"url_template" : " https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
13
13
},
14
14
"rust-overlay" : {
17
17
"homepage" : " " ,
18
18
"owner" : " oxalica" ,
19
19
"repo" : " rust-overlay" ,
20
- "rev" : " d064703dc0657a49a17671c74b1a15ea7433e753 " ,
21
- "sha256" : " 06g1c1ys8ihd3vsjswqrkl8nv9lypizzgivbvwz1aycm34i3ib4z " ,
20
+ "rev" : " 7509d76ce2b3d22b40bd25368b45c0a9f7f36c89 " ,
21
+ "sha256" : " 12gh5a0clc11b219xrvh08f35v959wnnmm089ys1cmqfdxx9v77n " ,
22
22
"type" : " tarball" ,
23
- "url" : " https://github.com/oxalica/rust-overlay/archive/d064703dc0657a49a17671c74b1a15ea7433e753 .tar.gz" ,
23
+ "url" : " https://github.com/oxalica/rust-overlay/archive/7509d76ce2b3d22b40bd25368b45c0a9f7f36c89 .tar.gz" ,
24
24
"url_template" : " https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
25
25
}
26
26
}
File renamed without changes.
Original file line number Diff line number Diff line change @@ -4,14 +4,14 @@ version = "1.0.0"
4
4
edition = " 2021"
5
5
6
6
[dependencies ]
7
- derive_builder = " 0.12.0 "
8
- enum-primitive-derive = " 0.2.2 "
7
+ derive_builder = " 0.20.2 "
8
+ enum-primitive-derive = " 0.3.0 "
9
9
glob = " 0.3.1"
10
10
ioctl-gen = " 0.1.1"
11
- libc = " 0.2.148 "
12
- nix = { version = " 0.27.1 " , default-features = false , features = [ " ioctl" ] }
13
- num-traits = " 0.2.16 "
14
- once_cell = " 1.18.0 "
15
- snafu = " 0.7 .5"
16
- uuid = { version = " 1.4.1 " , features = [" v4" ] }
17
- url = " 2.4.1 "
11
+ libc = " 0.2.161 "
12
+ nix = { version = " 0.29.0 " , default-features = false , features = [ " ioctl" ] }
13
+ num-traits = " 0.2.19 "
14
+ once_cell = " 1.20.2 "
15
+ snafu = " 0.8 .5"
16
+ uuid = { version = " 1.11.0 " , features = [" v4" ] }
17
+ url = " 2.5.2 "
Original file line number Diff line number Diff line change @@ -671,7 +671,6 @@ impl ConnectArgs {
671
671
/// ```rust
672
672
/// let num_disconnects = nvmeadm::nvmf_discovery::disconnect("mynqn");
673
673
/// ```
674
-
675
674
pub fn disconnect ( nqn : & str ) -> Result < usize , NvmeError > {
676
675
let subsys: Result < Vec < Subsystem > , NvmeError > = NvmeSubsystems :: new ( ) ?
677
676
. filter_map ( Result :: ok)
Original file line number Diff line number Diff line change @@ -187,9 +187,10 @@ fn disconnect_test() {
187
187
fn test_against_real_target ( ) {
188
188
// Disconnect all pre-existing NVMe connections to make sure new controller
189
189
// always gets id = 0.
190
- let _nvme_disconnect = Command :: new ( "nvme" )
190
+ Command :: new ( "nvme" )
191
191
. arg ( "disconnect-all" )
192
192
. spawn ( )
193
+ . and_then ( |mut child| child. wait ( ) )
193
194
. expect ( "Failed to cleanup NVMe connections !" ) ;
194
195
195
196
// Start an SPDK-based nvmf target
Original file line number Diff line number Diff line change @@ -6,15 +6,9 @@ description = "A thinner prost-wkt fork with just the bits we need"
6
6
7
7
8
8
[build-dependencies ]
9
- tonic-build = " 0.10.2 "
9
+ tonic-build = " 0.12.3 "
10
10
11
11
[dependencies ]
12
- chrono = " 0.4.26"
13
- serde = { version = " 1.0.183" , features = [ " derive" ] }
14
- prost = " 0.12.1"
15
-
16
- [dev-dependencies .serde ]
17
- # v1.0.198 introduces a breaking change by making use of unstable feature saturating_int_impl!
18
- # Let's ensure we don't use v.1.0.198 or newer until we upgrade the compiler!
19
- # https://github.com/serde-rs/serde/issues/2734
20
- version = " >=1.0.188,<1.0.198"
12
+ chrono = " 0.4.38"
13
+ serde = { version = " 1.0.214" , features = [ " derive" ] }
14
+ prost = " 0.13.3"
Original file line number Diff line number Diff line change @@ -5,6 +5,6 @@ fn main() {
5
5
"google.protobuf.Duration" ,
6
6
"#[derive(serde::Serialize, serde::Deserialize)] #[serde(default)]" ,
7
7
)
8
- . compile ( & [ "protobuf/v1/pb_time.proto" ] , & [ "protobuf/" ] )
8
+ . compile_protos ( & [ "protobuf/v1/pb_time.proto" ] , & [ "protobuf/" ] )
9
9
. unwrap_or_else ( |e| panic ! ( "prost-extend v1 protobuf compilation failed: {e}" ) ) ;
10
10
}
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const NANOS_MAX: i32 = NANOS_PER_SECOND - 1;
9
9
10
10
impl fmt:: Display for Duration {
11
11
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
12
- let mut d = self . clone ( ) ;
12
+ let mut d = * self ;
13
13
d. normalize ( ) ;
14
14
if self . seconds < 0 && self . nanos < 0 {
15
15
write ! ( f, "-" ) ?;
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ impl TryFrom<Timestamp> for DateTime<Utc> {
79
79
/// Converts proto timestamp to chrono's DateTime<Utc>.
80
80
impl Timestamp {
81
81
fn date_time_utc ( & self ) -> DateTime < Utc > {
82
- DateTime :: < Utc > :: try_from ( self . clone ( ) ) . expect ( "invalid or out-of-range datetime" )
82
+ DateTime :: < Utc > :: try_from ( * self ) . expect ( "invalid or out-of-range datetime" )
83
83
}
84
84
}
85
85
@@ -114,7 +114,7 @@ impl<'de> Deserialize<'de> for Timestamp {
114
114
{
115
115
struct TimestampVisitor ;
116
116
117
- impl < ' de > Visitor < ' de > for TimestampVisitor {
117
+ impl Visitor < ' _ > for TimestampVisitor {
118
118
type Value = Timestamp ;
119
119
120
120
fn expecting ( & self , formatter : & mut fmt:: Formatter ) -> fmt:: Result {
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -euo pipefail
4
+
5
+ for d in ` find -maxdepth 3 -name Cargo.toml -printf ' %h\n' | grep -v " ^./h2" ` ; do
6
+ pushd $d
7
+ $@
8
+ popd
9
+ done
10
+
Original file line number Diff line number Diff line change 1
- { profile ? "nightly" , version ? "2024-02-06 " } :
1
+ { profile ? "nightly" , version ? "2024-10-30 " } :
2
2
let
3
3
sources = import ./nix/sources.nix ;
4
4
pkgs = import sources . nixpkgs {
@@ -35,7 +35,15 @@ pkgs.mkShell {
35
35
NODE_PATH = "${ nodePackages . "@commitlint/config-conventional" } /lib/node_modules" ;
36
36
37
37
shellHook = ''
38
- pre-commit install
39
- pre-commit install --hook commit-msg
38
+ if [ -z "$CI" ] && [ "$IN_NIX_SHELL" = "impure" ]; then
39
+ pre-commit install
40
+ pre-commit install --hook commit-msg
41
+ fi
42
+
43
+ if [ -d ~/.cargo/bin ]; then
44
+ # Adding ~/.cargo/bin to the path let's us carry on using rustup but it lowers its
45
+ # priority: https://github.com/rust-lang/cargo/pull/11023
46
+ export PATH=$PATH:~/.cargo/bin
47
+ fi
40
48
'' ;
41
49
}
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ edition = "2021"
6
6
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7
7
8
8
[dependencies ]
9
- tracing-subscriber = { version = " 0.3.17 " , features = [ " env-filter" ] }
9
+ tracing-subscriber = { version = " 0.3.18 " , features = [ " env-filter" ] }
You can’t perform that action at this time.
0 commit comments