Compare commits

..

37 commits

Author SHA1 Message Date
Jacob Taylor
cd29b06221 Revert "I am calling you today about your car's extended warranty"
Some checks failed
Rust Checks / Format (push) Failing after 2s
Release Docker Image / define-variables (push) Failing after 5s
Release Docker Image / build-image (linux/amd64, linux-amd64) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, linux-arm64) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
Rust Checks / Clippy (push) Failing after 48s
Rust Checks / Cargo Test (push) Failing after 48s
the ringing was too loud

This reverts commit a3361f215b.
2025-06-18 16:10:20 -07:00
Jacob Taylor
a3361f215b I am calling you today about your car's extended warranty 2025-06-18 15:51:23 -07:00
Jacob Taylor
540f8c2100 fix warns from cargo 2025-06-18 15:51:23 -07:00
Jacob Taylor
bc515aad31 update 1 document 2025-06-18 15:51:23 -07:00
Jacob Taylor
37d17f603e delete unused num_threads function 2025-06-18 15:51:23 -07:00
Jacob Taylor
29265473b8 make fetching key room events less smart 2025-06-18 14:39:08 -07:00
Jacob Taylor
e4a4ed71e2 change rocksdb default error level to info from error 2025-06-18 14:39:08 -07:00
Jacob Taylor
4e89fe8882 scale rocksdb background jobs and subcompactions 2025-06-18 14:39:08 -07:00
Jacob Taylor
461c5976d6 change rocksdb stats level to 3 2025-06-18 14:39:08 -07:00
Jacob Taylor
d7e2c263d9 add more parallelism_scaled and make them public 2025-06-18 14:39:08 -07:00
Jacob Taylor
14174a79ba update sender workers documentation 2025-06-18 14:39:08 -07:00
nexy7574
ba43217696 modify more log strings so they're more useful than not 2025-06-18 14:39:08 -07:00
nexy7574
2b49cd72fe When in doubt, log all the things 2025-06-18 14:39:08 -07:00
Jacob Taylor
e7478f1eac make sender workers default better and clamp value to core count 2025-06-18 14:39:08 -07:00
Jacob Taylor
b9248c879d better roomid_spacehierarchy_cache_capacity 2025-06-18 14:39:08 -07:00
nexy7574
3db5837696 log which room struggled to get mainline depth 2025-06-18 14:39:08 -07:00
nexy7574
7adb1d9d30 more logs 2025-06-18 14:39:08 -07:00
nexy7574
9875e25e1e Unsafe, untested, and potentially overeager PDU sanity checks 2025-06-18 14:39:08 -07:00
nexy7574
c76dc56f5b Fix room ID check 2025-06-18 14:39:08 -07:00
nexy7574
bc2c77f56a Kick up a fuss when m.room.create is unfindable 2025-06-18 14:39:08 -07:00
nexy7574
4d5434dd1d Note about ruma#2064 in TODO 2025-06-18 14:39:08 -07:00
nexy7574
da7fb29696 fix an auth rule not applying correctly 2025-06-18 14:39:08 -07:00
Jacob Taylor
844f058756 better stateinfo_cache_capacity default 2025-06-18 14:39:08 -07:00
Jacob Taylor
d013e0bded enable converged 6g at the edge in continuwuity 2025-06-18 14:39:08 -07:00
nexy7574
2deb8df924 Always calculate state diff IDs in syncv3
seemingly fixes #779
2025-06-18 14:39:08 -07:00
Jacob Taylor
604cb9657f upgrade some settings to enable 5g in continuwuity 2025-06-18 14:39:08 -07:00
Jacob Taylor
43f9339bec add futures::FutureExt to make cb15ac3c01 work 2025-06-18 14:39:08 -07:00
Jason Volk
3ecd496af0 Mitigate large futures
Signed-off-by: Jason Volk <jason@zemos.net>
2025-06-18 14:39:08 -07:00
Jacob Taylor
61feec28c6 bump the number of allowed immutable memtables by 1, to allow for greater flood protection
this should probably not be applied if you have rocksdb_atomic_flush = false (the default)
2025-06-18 14:39:08 -07:00
Jacob Taylor
9ff45a5587 probably incorrectly delete support for non-standardized matrix srv record 2025-06-18 14:39:08 -07:00
Jacob Taylor
fa74c3487a Fix spaces rooms list load error. rev2 2025-06-18 14:39:08 -07:00
Jade Ellis
908efef692 fix: Filter out invalid replacements from bundled aggregations 2025-06-18 14:39:08 -07:00
Jade Ellis
69c66af0ea feat: Add bundled aggregations support
Add support for the m.replace and m.reference bundled
aggregations.
This should fix plenty of subtle client issues.
Threads are not included in the new code as they have
historically been written to the database. Replacing the
old system would result in issues when switching away from
continuwuity, so saved for later.
Some TODOs have been left re event visibility and ignored users.
These should be OK for now, though.
2025-06-18 14:39:08 -07:00
Jade Ellis
44497898f7 refactor: Promote handling unsigned data out of timeline
Also fixes:
- Transaction IDs leaking in event route
- Age not being set for event relations or threads
- Both of the above for search results

Notes down concern with relations table
2025-06-18 14:39:08 -07:00
Jade Ellis
6e16a6ef8f
chore: Release announcement
Some checks failed
Documentation / Build and Deploy Documentation (push) Failing after 3s
Rust Checks / Format (push) Failing after 1s
Rust Checks / Clippy (push) Failing after 10s
Rust Checks / Cargo Test (push) Failing after 10s
2025-06-14 22:34:24 +01:00
Jade Ellis
0870c8d647
chore: Release
Some checks failed
Documentation / Build and Deploy Documentation (push) Failing after 3s
Release Docker Image / define-variables (push) Failing after 1s
Release Docker Image / build-image (linux/amd64, linux-amd64) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, linux-arm64) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
Rust Checks / Format (push) Failing after 1s
Rust Checks / Clippy (push) Failing after 10s
Rust Checks / Cargo Test (push) Failing after 8s
2025-06-14 20:53:00 +01:00
Jade Ellis
d0f00e6f5c
feat: Allow mentioning @room in an admin announcement
Some checks failed
Documentation / Build and Deploy Documentation (push) Failing after 3s
Rust Checks / Format (push) Failing after 3s
Rust Checks / Clippy (push) Failing after 9s
Rust Checks / Cargo Test (push) Failing after 10s
Release Docker Image / define-variables (push) Failing after 4s
Release Docker Image / build-image (linux/amd64, linux-amd64) (push) Has been skipped
Release Docker Image / build-image (linux/arm64, linux-arm64) (push) Has been skipped
Release Docker Image / merge (push) Has been skipped
2025-06-14 19:09:54 +01:00
8 changed files with 52 additions and 53 deletions

20
Cargo.lock generated
View file

@ -771,7 +771,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit" name = "conduwuit"
version = "0.5.0-rc.5" version = "0.5.0-rc.6"
dependencies = [ dependencies = [
"clap", "clap",
"conduwuit_admin", "conduwuit_admin",
@ -800,7 +800,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_admin" name = "conduwuit_admin"
version = "0.5.0-rc.5" version = "0.5.0-rc.6"
dependencies = [ dependencies = [
"clap", "clap",
"conduwuit_api", "conduwuit_api",
@ -821,7 +821,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_api" name = "conduwuit_api"
version = "0.5.0-rc.5" version = "0.5.0-rc.6"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"axum", "axum",
@ -853,14 +853,14 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_build_metadata" name = "conduwuit_build_metadata"
version = "0.5.0-rc.5" version = "0.5.0-rc.6"
dependencies = [ dependencies = [
"built 0.8.0", "built 0.8.0",
] ]
[[package]] [[package]]
name = "conduwuit_core" name = "conduwuit_core"
version = "0.5.0-rc.5" version = "0.5.0-rc.6"
dependencies = [ dependencies = [
"argon2", "argon2",
"arrayvec", "arrayvec",
@ -919,7 +919,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_database" name = "conduwuit_database"
version = "0.5.0-rc.5" version = "0.5.0-rc.6"
dependencies = [ dependencies = [
"async-channel", "async-channel",
"conduwuit_core", "conduwuit_core",
@ -937,7 +937,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_macros" name = "conduwuit_macros"
version = "0.5.0-rc.5" version = "0.5.0-rc.6"
dependencies = [ dependencies = [
"itertools 0.14.0", "itertools 0.14.0",
"proc-macro2", "proc-macro2",
@ -947,7 +947,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_router" name = "conduwuit_router"
version = "0.5.0-rc.5" version = "0.5.0-rc.6"
dependencies = [ dependencies = [
"axum", "axum",
"axum-client-ip", "axum-client-ip",
@ -981,7 +981,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_service" name = "conduwuit_service"
version = "0.5.0-rc.5" version = "0.5.0-rc.6"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"base64 0.22.1", "base64 0.22.1",
@ -1018,7 +1018,7 @@ dependencies = [
[[package]] [[package]]
name = "conduwuit_web" name = "conduwuit_web"
version = "0.5.0-rc.5" version = "0.5.0-rc.6"
dependencies = [ dependencies = [
"askama", "askama",
"axum", "axum",

View file

@ -21,7 +21,7 @@ license = "Apache-2.0"
readme = "README.md" readme = "README.md"
repository = "https://forgejo.ellis.link/continuwuation/continuwuity" repository = "https://forgejo.ellis.link/continuwuation/continuwuity"
rust-version = "1.86.0" rust-version = "1.86.0"
version = "0.5.0-rc.5" version = "0.5.0-rc.6"
[workspace.metadata.crane] [workspace.metadata.crane]
name = "conduwuit" name = "conduwuit"

View file

@ -990,7 +990,7 @@
# 3 to 5 = Statistics with possible performance impact. # 3 to 5 = Statistics with possible performance impact.
# 6 = All statistics. # 6 = All statistics.
# #
#rocksdb_stats_level = 1 #rocksdb_stats_level = 3
# This is a password that can be configured that will let you login to the # This is a password that can be configured that will let you login to the
# server bot account (currently `@conduit`) for emergency troubleshooting # server bot account (currently `@conduit`) for emergency troubleshooting
@ -1590,11 +1590,9 @@
#stream_amplification = 1024 #stream_amplification = 1024
# Number of sender task workers; determines sender parallelism. Default is # Number of sender task workers; determines sender parallelism. Default is
# '0' which means the value is determined internally, likely matching the # number of CPU cores. Override by setting a different value.
# number of tokio worker-threads or number of cores, etc. Override by
# setting a non-zero value.
# #
#sender_workers = 0 #sender_workers = 4
# Enables listener sockets; can be set to false to disable listening. This # Enables listener sockets; can be set to false to disable listening. This
# option is intended for developer/diagnostic purposes only. # option is intended for developer/diagnostic purposes only.

View file

@ -4,6 +4,10 @@
{ {
"id": 1, "id": 1,
"message": "Welcome to Continuwuity! Important announcements about the project will appear here." "message": "Welcome to Continuwuity! Important announcements about the project will appear here."
},
{
"id": 2,
"message": "🎉 Continuwuity v0.5.0-rc.6 is now available! This release includes improved knock-restricted room handling, automatic support contact configuration, and a new HTML landing page. Check [the release notes for full details](https://forgejo.ellis.link/continuwuation/continuwuity/releases/tag/v0.5.0-rc.6) and upgrade instructions."
} }
] ]
} }

View file

@ -3,7 +3,7 @@
"$id": "https://continwuity.org/schema/announcements.schema.json", "$id": "https://continwuity.org/schema/announcements.schema.json",
"type": "object", "type": "object",
"properties": { "properties": {
"updates": { "announcements": {
"type": "array", "type": "array",
"items": { "items": {
"type": "object", "type": "object",
@ -16,6 +16,10 @@
}, },
"date": { "date": {
"type": "string" "type": "string"
},
"mention_room": {
"type": "boolean",
"description": "Whether to mention the room (@room) when posting this announcement"
} }
}, },
"required": [ "required": [
@ -26,6 +30,6 @@
} }
}, },
"required": [ "required": [
"updates" "announcements"
] ]
} }

View file

@ -242,12 +242,16 @@ where
} }
*/ */
let (room_create_event, power_levels_event, sender_member_event) = join3( // let (room_create_event, power_levels_event, sender_member_event) = join3(
fetch_state(&StateEventType::RoomCreate, ""), // fetch_state(&StateEventType::RoomCreate, ""),
fetch_state(&StateEventType::RoomPowerLevels, ""), // fetch_state(&StateEventType::RoomPowerLevels, ""),
fetch_state(&StateEventType::RoomMember, sender.as_str()), // fetch_state(&StateEventType::RoomMember, sender.as_str()),
) // )
.await; // .await;
let room_create_event = fetch_state(&StateEventType::RoomCreate, "").await;
let power_levels_event = fetch_state(&StateEventType::RoomPowerLevels, "").await;
let sender_member_event = fetch_state(&StateEventType::RoomMember, sender.as_str()).await;
let room_create_event = match room_create_event { let room_create_event = match room_create_event {
| None => { | None => {

View file

@ -1,6 +1,4 @@
use std::{cmp, convert::TryFrom}; use conduwuit::{Config, Result};
use conduwuit::{Config, Result, utils};
use rocksdb::{Cache, DBRecoveryMode, Env, LogLevel, Options, statistics::StatsLevel}; use rocksdb::{Cache, DBRecoveryMode, Env, LogLevel, Options, statistics::StatsLevel};
use conduwuit::config::{parallelism_scaled_i32, parallelism_scaled_u32}; use conduwuit::config::{parallelism_scaled_i32, parallelism_scaled_u32};
use super::{cf_opts::cache_size_f64, logger::handle as handle_log}; use super::{cf_opts::cache_size_f64, logger::handle as handle_log};
@ -126,15 +124,3 @@ fn set_logging_defaults(opts: &mut Options, config: &Config) {
opts.set_callback_logger(rocksdb_log_level, &handle_log); opts.set_callback_logger(rocksdb_log_level, &handle_log);
} }
} }
fn num_threads<T: TryFrom<usize>>(config: &Config) -> Result<T> {
const MIN_PARALLELISM: usize = 4;
let requested = if config.rocksdb_parallelism_threads != 0 {
config.rocksdb_parallelism_threads
} else {
utils::available_parallelism()
};
utils::math::try_into::<T, usize>(cmp::max(MIN_PARALLELISM, requested))
}

View file

@ -20,7 +20,7 @@ use std::{sync::Arc, time::Duration};
use async_trait::async_trait; use async_trait::async_trait;
use conduwuit::{Result, Server, debug, info, warn}; use conduwuit::{Result, Server, debug, info, warn};
use database::{Deserialized, Map}; use database::{Deserialized, Map};
use ruma::events::room::message::RoomMessageEventContent; use ruma::events::{Mentions, room::message::RoomMessageEventContent};
use serde::Deserialize; use serde::Deserialize;
use tokio::{ use tokio::{
sync::Notify, sync::Notify,
@ -53,6 +53,8 @@ struct CheckForAnnouncementsResponseEntry {
id: u64, id: u64,
date: Option<String>, date: Option<String>,
message: String, message: String,
#[serde(default, skip_serializing_if = "bool::not")]
mention_room: bool,
} }
const CHECK_FOR_ANNOUNCEMENTS_URL: &str = const CHECK_FOR_ANNOUNCEMENTS_URL: &str =
@ -139,19 +141,20 @@ impl Service {
} else { } else {
info!("[announcements] {:#}", announcement.message); info!("[announcements] {:#}", announcement.message);
} }
let mut message = RoomMessageEventContent::text_markdown(format!(
"### New announcement{}\n\n{}",
announcement
.date
.as_ref()
.map_or_else(String::new, |date| format!(" - `{date}`")),
announcement.message
));
self.services if announcement.mention_room {
.admin message = message.add_mentions(Mentions::with_room_mention());
.send_message(RoomMessageEventContent::text_markdown(format!( }
"### New announcement{}\n\n{}",
announcement self.services.admin.send_message(message).await.ok();
.date
.as_ref()
.map_or_else(String::new, |date| format!(" - `{date}`")),
announcement.message
)))
.await
.ok();
} }
#[inline] #[inline]