chore: dependabot only does lockfile maintenance

This commit is contained in:
Rob Ede 2025-05-09 17:11:13 +01:00
parent eb061205b9
commit 5d35459e70
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
10 changed files with 125 additions and 36 deletions

View File

@ -8,3 +8,4 @@ updates:
directory: / directory: /
schedule: schedule:
interval: weekly interval: weekly
versioning-strategy: lockfile-only

102
Cargo.lock generated
View File

@ -61,6 +61,7 @@ dependencies = [
"tokio-uring", "tokio-uring",
"tokio-util", "tokio-util",
"tracing", "tracing",
"tracing-subscriber",
] ]
[[package]] [[package]]
@ -1159,6 +1160,15 @@ dependencies = [
"linked-hash-map", "linked-hash-map",
] ]
[[package]]
name = "matchers"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
dependencies = [
"regex-automata 0.1.10",
]
[[package]] [[package]]
name = "memchr" name = "memchr"
version = "2.7.4" version = "2.7.4"
@ -1219,6 +1229,16 @@ dependencies = [
"minimal-lexical", "minimal-lexical",
] ]
[[package]]
name = "nu-ansi-term"
version = "0.46.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
dependencies = [
"overload",
"winapi",
]
[[package]] [[package]]
name = "num-conv" name = "num-conv"
version = "0.1.0" version = "0.1.0"
@ -1299,6 +1319,12 @@ dependencies = [
"vcpkg", "vcpkg",
] ]
[[package]]
name = "overload"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
[[package]] [[package]]
name = "parking_lot" name = "parking_lot"
version = "0.12.3" version = "0.12.3"
@ -1543,8 +1569,17 @@ checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"memchr", "memchr",
"regex-automata", "regex-automata 0.4.9",
"regex-syntax", "regex-syntax 0.8.5",
]
[[package]]
name = "regex-automata"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
dependencies = [
"regex-syntax 0.6.29",
] ]
[[package]] [[package]]
@ -1555,9 +1590,15 @@ checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
dependencies = [ dependencies = [
"aho-corasick", "aho-corasick",
"memchr", "memchr",
"regex-syntax", "regex-syntax 0.8.5",
] ]
[[package]]
name = "regex-syntax"
version = "0.6.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
[[package]] [[package]]
name = "regex-syntax" name = "regex-syntax"
version = "0.8.5" version = "0.8.5"
@ -1891,6 +1932,15 @@ dependencies = [
"serde", "serde",
] ]
[[package]]
name = "sharded-slab"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
dependencies = [
"lazy_static",
]
[[package]] [[package]]
name = "shlex" name = "shlex"
version = "1.3.0" version = "1.3.0"
@ -2035,6 +2085,16 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "thread_local"
version = "1.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
dependencies = [
"cfg-if",
"once_cell",
]
[[package]] [[package]]
name = "time" name = "time"
version = "0.3.40" version = "0.3.40"
@ -2296,6 +2356,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"valuable",
] ]
[[package]] [[package]]
@ -2308,6 +2369,35 @@ dependencies = [
"tracing", "tracing",
] ]
[[package]]
name = "tracing-log"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
dependencies = [
"log",
"once_cell",
"tracing-core",
]
[[package]]
name = "tracing-subscriber"
version = "0.3.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008"
dependencies = [
"matchers",
"nu-ansi-term",
"once_cell",
"regex",
"sharded-slab",
"smallvec",
"thread_local",
"tracing",
"tracing-core",
"tracing-log",
]
[[package]] [[package]]
name = "trust-dns-proto" name = "trust-dns-proto"
version = "0.23.2" version = "0.23.2"
@ -2425,6 +2515,12 @@ version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"
[[package]]
name = "valuable"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
[[package]] [[package]]
name = "vcpkg" name = "vcpkg"
version = "0.2.15" version = "0.2.15"

View File

@ -187,10 +187,7 @@ impl SystemRunner {
match exit_code { match exit_code {
0 => Ok(()), 0 => Ok(()),
nonzero => Err(io::Error::new( nonzero => Err(io::Error::other(format!("Non-zero exit code: {}", nonzero))),
io::ErrorKind::Other,
format!("Non-zero exit code: {}", nonzero),
)),
} }
} }
@ -199,8 +196,7 @@ impl SystemRunner {
let SystemRunner { rt, stop_rx, .. } = self; let SystemRunner { rt, stop_rx, .. } = self;
// run loop // run loop
rt.block_on(stop_rx) rt.block_on(stop_rx).map_err(io::Error::other)
.map_err(|err| io::Error::new(io::ErrorKind::Other, err))
} }
/// Retrieves a reference to the underlying [Actix runtime](crate::Runtime) associated with this /// Retrieves a reference to the underlying [Actix runtime](crate::Runtime) associated with this

View File

@ -47,6 +47,7 @@ pretty_env_logger = "0.5"
static_assertions = "1" static_assertions = "1"
tokio = { version = "1.44.2", features = ["io-util", "rt-multi-thread", "macros", "fs", "time"] } tokio = { version = "1.44.2", features = ["io-util", "rt-multi-thread", "macros", "fs", "time"] }
tokio-util = "0.7" tokio-util = "0.7"
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
[lints] [lints]
workspace = true workspace = true

View File

@ -8,26 +8,28 @@ use actix_rt::net::TcpStream;
use actix_server::Server; use actix_server::Server;
use actix_service::fn_service; use actix_service::fn_service;
use tokio_util::sync::CancellationToken; use tokio_util::sync::CancellationToken;
use tracing::level_filters::LevelFilter;
use tracing_subscriber::{prelude::*, EnvFilter};
async fn run(stop_signal: CancellationToken) -> io::Result<()> { async fn run(stop_signal: CancellationToken) -> io::Result<()> {
pretty_env_logger::formatted_timed_builder() tracing_subscriber::registry()
.parse_env(pretty_env_logger::env_logger::Env::default().default_filter_or("info")); .with(tracing_subscriber::fmt::layer())
.with(
EnvFilter::builder()
.with_default_directive(LevelFilter::INFO.into())
.from_env_lossy(),
)
.init();
let addr = ("127.0.0.1", 8080); let addr = ("127.0.0.1", 8080);
tracing::info!("starting server on port: {}", &addr.0); tracing::info!("starting server on port: {}", &addr.0);
// let (tx, rx) = tokio::sync::oneshot::channel::<()>();
// let (tx, mut rx) = tokio::sync::broadcast::channel::<()>(1);
Server::build() Server::build()
.bind("shutdown-signal", addr, || { .bind("shutdown-signal", addr, || {
fn_service(|_stream: TcpStream| async { Ok::<_, io::Error>(()) }) fn_service(|_stream: TcpStream| async { Ok::<_, io::Error>(()) })
})? })?
.shutdown_signal(stop_signal.cancelled_owned()) .shutdown_signal(stop_signal.cancelled_owned())
// .shutdown_signal(async move { .workers(2)
// rx.await;
// // rx.recv().await;
// })
.run() .run()
.await .await
} }

View File

@ -76,7 +76,7 @@ impl Accept {
let accept_handle = thread::Builder::new() let accept_handle = thread::Builder::new()
.name("actix-server acceptor".to_owned()) .name("actix-server acceptor".to_owned())
.spawn(move || accept.poll_with(&mut sockets)) .spawn(move || accept.poll_with(&mut sockets))
.map_err(|err| io::Error::new(io::ErrorKind::Other, err))?; .map_err(io::Error::other)?;
Ok((waker_queue, handles_server, accept_handle)) Ok((waker_queue, handles_server, accept_handle))
} }

View File

@ -177,7 +177,7 @@ impl ServerBuilder {
/// ///
/// Using this method will prevent OS signal handlers being set up. /// Using this method will prevent OS signal handlers being set up.
/// ///
/// Typically, a `CancellationToken` or `oneshot` / `broadcast` channel will be used. /// Typically, a `CancellationToken` will be used, but any future _can_ be.
/// ///
/// # Examples /// # Examples
/// ///
@ -408,9 +408,6 @@ pub(super) fn bind_addr<S: ToSocketAddrs>(
} else if let Some(err) = opt_err.take() { } else if let Some(err) = opt_err.take() {
Err(err) Err(err)
} else { } else {
Err(io::Error::new( Err(io::Error::other("Can not bind to address."))
io::ErrorKind::Other,
"Can not bind to address.",
))
} }
} }

View File

@ -57,7 +57,6 @@ impl Future for StopSignal {
} }
/// Process signal listener. /// Process signal listener.
#[derive(Debug)]
pub(crate) struct OsSignals { pub(crate) struct OsSignals {
#[cfg(not(unix))] #[cfg(not(unix))]
signals: futures_core::future::BoxFuture<'static, std::io::Result<()>>, signals: futures_core::future::BoxFuture<'static, std::io::Result<()>>,

View File

@ -341,11 +341,10 @@ impl ServerWorker {
Ok((token, svc)) => services.push((idx, token, svc)), Ok((token, svc)) => services.push((idx, token, svc)),
Err(err) => { Err(err) => {
error!("can not start worker: {:?}", err); error!("can not start worker: {err:?}");
return Err(io::Error::new( return Err(io::Error::other(format!(
io::ErrorKind::Other, "can not start server service {idx}",
format!("can not start server service {}", idx), )));
));
} }
} }
} }
@ -440,13 +439,12 @@ impl ServerWorker {
Ok((token, svc)) => services.push((idx, token, svc)), Ok((token, svc)) => services.push((idx, token, svc)),
Err(err) => { Err(err) => {
error!("can not start worker: {:?}", err); error!("can not start worker: {err:?}");
Arbiter::current().stop(); Arbiter::current().stop();
factory_tx factory_tx
.send(Err(io::Error::new( .send(Err(io::Error::other(format!(
io::ErrorKind::Other, "can not start server service {idx}",
format!("can not start server service {}", idx), ))))
)))
.unwrap(); .unwrap();
return; return;
} }

View File

@ -41,7 +41,6 @@ non_linux_all_features_list := ```
'add | unique | . - ($exclusions | split(",")) | join(",")' 'add | unique | . - ($exclusions | split(",")) | join(",")'
``` ```
all_crate_features := if os() == "linux" { "--all-features" } else { "--features='" + non_linux_all_features_list + "'" } all_crate_features := if os() == "linux" { "--all-features" } else { "--features='" + non_linux_all_features_list + "'" }
toolchain := "" toolchain := ""
# Run Clippy over workspace. # Run Clippy over workspace.