Compare commits

..
Author SHA1 Message Date
Renovate Bot 72177cba8c chore(deps): update ruma digest to 1bb5d06 2026-12-04 05:02:49 +00:00
3 changed files with 20 additions and 45 deletions

No files matched your search

Generated
+11 -11
View File
@@ -5049,7 +5049,7 @@ dependencies = [
[[package]]
name = "ruma"
version = "0.18.0"
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
source = "git+https://github.com/ruma/ruma.git?rev=1bb5d0663e8e64f096be3715aff7ee793d521e15#1bb5d0663e8e64f096be3715aff7ee793d521e15"
dependencies = [
"assign",
"js_int",
@@ -5068,7 +5068,7 @@ dependencies = [
[[package]]
name = "ruma-appservice-api"
version = "0.18.0"
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
source = "git+https://github.com/ruma/ruma.git?rev=1bb5d0663e8e64f096be3715aff7ee793d521e15#1bb5d0663e8e64f096be3715aff7ee793d521e15"
dependencies = [
"http",
"js_int",
@@ -5081,7 +5081,7 @@ dependencies = [
[[package]]
name = "ruma-client-api"
version = "0.26.0"
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
source = "git+https://github.com/ruma/ruma.git?rev=1bb5d0663e8e64f096be3715aff7ee793d521e15#1bb5d0663e8e64f096be3715aff7ee793d521e15"
dependencies = [
"as_variant",
"assign",
@@ -5103,7 +5103,7 @@ dependencies = [
[[package]]
name = "ruma-common"
version = "0.21.0"
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
source = "git+https://github.com/ruma/ruma.git?rev=1bb5d0663e8e64f096be3715aff7ee793d521e15#1bb5d0663e8e64f096be3715aff7ee793d521e15"
dependencies = [
"as_variant",
"base64 0.23.1",
@@ -5136,7 +5136,7 @@ dependencies = [
[[package]]
name = "ruma-events"
version = "0.36.0"
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
source = "git+https://github.com/ruma/ruma.git?rev=1bb5d0663e8e64f096be3715aff7ee793d521e15#1bb5d0663e8e64f096be3715aff7ee793d521e15"
dependencies = [
"as_variant",
"indexmap 2.14.2",
@@ -5157,7 +5157,7 @@ dependencies = [
[[package]]
name = "ruma-federation-api"
version = "0.17.0"
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
source = "git+https://github.com/ruma/ruma.git?rev=1bb5d0663e8e64f096be3715aff7ee793d521e15#1bb5d0663e8e64f096be3715aff7ee793d521e15"
dependencies = [
"bytes",
"http",
@@ -5179,7 +5179,7 @@ dependencies = [
[[package]]
name = "ruma-identifiers-validation"
version = "0.14.1"
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
source = "git+https://github.com/ruma/ruma.git?rev=1bb5d0663e8e64f096be3715aff7ee793d521e15#1bb5d0663e8e64f096be3715aff7ee793d521e15"
dependencies = [
"js_int",
"thiserror 2.0.21",
@@ -5188,7 +5188,7 @@ dependencies = [
[[package]]
name = "ruma-macros"
version = "0.20.3"
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
source = "git+https://github.com/ruma/ruma.git?rev=1bb5d0663e8e64f096be3715aff7ee793d521e15#1bb5d0663e8e64f096be3715aff7ee793d521e15"
dependencies = [
"as_variant",
"cfg-if",
@@ -5204,7 +5204,7 @@ dependencies = [
[[package]]
name = "ruma-push-gateway-api"
version = "0.17.0"
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
source = "git+https://github.com/ruma/ruma.git?rev=1bb5d0663e8e64f096be3715aff7ee793d521e15#1bb5d0663e8e64f096be3715aff7ee793d521e15"
dependencies = [
"js_int",
"ruma-common",
@@ -5216,7 +5216,7 @@ dependencies = [
[[package]]
name = "ruma-signatures"
version = "0.23.0"
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
source = "git+https://github.com/ruma/ruma.git?rev=1bb5d0663e8e64f096be3715aff7ee793d521e15#1bb5d0663e8e64f096be3715aff7ee793d521e15"
dependencies = [
"base64 0.23.1",
"ed25519-dalek",
@@ -5233,7 +5233,7 @@ dependencies = [
[[package]]
name = "ruma-state-res"
version = "0.19.0"
source = "git+https://github.com/ruma/ruma.git?rev=d6621e1355419c5ef9a7c260b28ae1c0e6722b86#d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
source = "git+https://github.com/ruma/ruma.git?rev=1bb5d0663e8e64f096be3715aff7ee793d521e15#1bb5d0663e8e64f096be3715aff7ee793d521e15"
dependencies = [
"js_int",
"ruma-common",
+1 -1
View File
@@ -357,7 +357,7 @@ version = "1.1.1"
# Used for matrix spec type definitions and helpers
[workspace.dependencies.ruma]
git = "https://github.com/ruma/ruma.git"
rev = "d6621e1355419c5ef9a7c260b28ae1c0e6722b86"
rev = "1bb5d0663e8e64f096be3715aff7ee793d521e15"
features = [
"appservice-api-c",
"client-api",
+8 -33
View File
@@ -1,5 +1,4 @@
use std::{
any::TypeId,
borrow::Cow,
fmt::Debug,
mem,
@@ -126,7 +125,6 @@ impl super::Service {
where
T: OutgoingRequest<PathBuilder: PathBuilder<Input<'i> = PathBuilderInput>> + Send,
PathBuilderInput: FederationPathBuilderInput,
<T as ruma::api::Metadata>::Authentication: 'static,
{
if !self.services.server.config.allow_federation {
return Err!(Config("allow_federation", "Federation is disabled."));
@@ -138,21 +136,7 @@ impl super::Service {
))));
}
// Don't check health on unauthenticated requests, since those are only
// for keys and manual pings, which want to bypass health tracking
// anyway.
//
// TODO(nex): We should probably do a proper builder pattern for
// requests, since callers may wish to tune
// - Authentication (signed vs unsigned)
// - Health check activity
// - Timeout (normal vs slow)
// and having a billion functions and conditions for all of those is not
// ideal.
let doctor = TypeId::of::<T::Authentication>() != TypeId::of::<NoAuthentication>();
if doctor {
self.ensure_remote_is_healthy(dest)?;
}
self.ensure_remote_is_healthy(dest)?;
/// How long to wait with re-resolution if a server fails to resolve
const UNRESOLVABLE_RETRY_AFTER: Duration = Duration::from_hours(24 * 90);
@@ -176,8 +160,7 @@ impl super::Service {
self.validate_url(request.url())?;
self.services.server.check_running()?;
self.perform::<T>(dest, &actual, request, client, doctor)
.await
self.perform::<T>(dest, &actual, request, client).await
}
/// Actually sends the federation request, handling the response before
@@ -190,7 +173,6 @@ impl super::Service {
actual: &Resolution,
request: Request,
client: &Client,
doctor: bool,
) -> Result<T::IncomingResponse>
where
T: OutgoingRequest + Send,
@@ -226,10 +208,8 @@ impl super::Service {
.record(elapsed.as_secs_f64(), &[KeyValue::new("outcome", outcome)]);
match response {
| Ok(response) =>
self.handle_response::<T>(dest, actual, &method, &url, response, doctor)
self.handle_response::<T>(dest, actual, &method, &url, response)
.await,
| Err(error) if !doctor =>
Err(handle_error(actual, &method, &url, error).expect_err("always returns error")),
| Err(error) => {
// This awful wrapping hack is required because `reqwest::Error`
// does not implement `Clone`, but we need to convert it
@@ -275,7 +255,6 @@ impl super::Service {
method: &Method,
url: &Url,
response: Response,
doctor: bool,
) -> Result<T::IncomingResponse>
where
T: OutgoingRequest + Send,
@@ -304,17 +283,13 @@ impl super::Service {
body.as_ref(),
))
.inspect(|_| {
if doctor {
self.mark_healthy(dest);
}
self.mark_healthy(dest);
})
.map_err(|e| {
if doctor {
// Bad 200 response is usually a sign of bad routing, so we'll
// mark as stale. We won't mark as offline though since we
// technically got a response.
self.mark_destination_stale(dest);
}
// Bad 200 response is usually a sign of bad routing, so we'll mark
// as stale. We won't mark as offline though since we technically
// got a response.
self.mark_destination_stale(dest);
err!(BadServerResponse("Server returned bad 200 response: {e:?}"))
})
}