Commit graph

2731 commits

Author SHA1 Message Date
Jason Volk 47f9c69eff split media related migrations into service dir
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk 73af171830 add config option for pruning missing media
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk dea5fee6a3 abstract duration parsing into utils
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk 4d42a29c51 add thumbnail dimension structure
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk 7b0e830f4c add interface to get file metadata w/ admin command
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk e7b2c14280 tag admin room m.server_notice on grant
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk bb5f2556c3 improve admin command error propagation
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk f047675a63 rename admin/handler to admin/processor
Handler is overused. Handler ought to mean the end-function handling the
command. The command processor is the central dispatcher to the handler.

Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk f4db6292b3 add smoketest-assist execution mode
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk fcb9d04d9e add program argument for functional testing; simplify execute argument
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk ffc41cb01f split admin service startup related into unit
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk e4bcbb8088 propagate errors from reqwest client constructions
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk e4ba34a638 remove zombie globals/client file
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
strawberry d5e7befaa9 move a few MXC parsing logs to trace
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry 1157140657 mark sending ruma matrix version as 1_11
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry fb49e37067 add admin command to delete all remote media from a specific server
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry 8923c9a227 add admin command to redact an individual event from a local user
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry 2b7e0dcb80 add admin command to delete all local media by a local user
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry e790785db8 fix: force argument for delete past remote media wasn't fully functional
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry 6b65a8fc86 add functions to delete media from specific local users
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry a79ae7d1a2 add missing MXC URI prefix bytes
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry 156199a218 add --no_details to list banned rooms command
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry 47ca835c20 initialise default TLS crypto provider with aws_lc_rs manually
we use ring for hashing state and ruma, and reqwest/rustls defaults
to aws_lc_rs, so we have to manually pick which one. there doesn't
seem to be a way to just use one for some reason, so lets just use
the new aws_lc_rs.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
morguldir ddacda9ecf add heroes support to sliding sync responses
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry edd42974e5 bump cargo.lock and deps, add zstd compression to reqwest client
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry 23690fd837 make jemalloc stats an optional feature
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
Jason Volk 50e66a2976 add partial envfilter support for admin log capture; conf item
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk 4d0fc41222 add conf item for federation loopback prevention bypass
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk 152ae705a0 refactor for structured Mxc type
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk 54e6a41404 move remote media fetchers into services
minor error simplification

Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk c3f00f4d15 remove redundant CSP directives which effectively default to the same value
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk 43300ea41e Make axum-dual-protocol a non-feature. Fix build issues.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk 17a54bc4f8 refactor for ruma cow headers; update for ContentDisposition type
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk f540bed61e propagate additional errors from db options
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk 2cf472a69b elide header from command output when no logs captured
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk b2d8da489c add configurable automatic admin command execution after startup
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk 40d53563fc integrate ruma js_int errors into enum
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk 5db816277b add from serde_json error to enum
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk efa70b9e78 add serde de/ser impls for error
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk bac795de5f use transparent thiserror attribute; cleanup error variants
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk f69f4c479c propagate error from database options building
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk 992f725362 allow expression to defer macro
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk 0e56d1c7a2 add math::try_into util
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk b4d5282123 add nullary type_name debug util
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk 15ad7523aa split Destination enum into unit
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
Jason Volk eb6e509ad8 use where clause for long lines
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-29 19:19:20 +00:00
strawberry 4432c06c86 remove local room aliases and unpublish room when banning a room
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry bc5ecb0c72 attempt to recreate server default push rules more if broken/empty content/etc
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry f1b41ce6e3 remove unnecessary alias check on deleting room aliases
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry 826b1d1d62 remove unnecessary "unsupported room version" error on PDU processing to allow custom room versions properly
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry c40ed0c98e add missing remove aliases on room upgrade transferring room aliases
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
Matthias Ahouansou 2d9aab2e79 support timestamped appservice messaging
Co-authored-by: strawberry <strawberry@puppygock.gay>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry 7b8ef3b070 dont apply new_user_displayname_suffix to appservice user registrations
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry 83ef4eecc7 reduce unnecessary logging on URL preview and event, use sensible error code for URL previews
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry 52ccad04a6 apply forbidden_remote_server_names to outbound sending and inbound federation handling
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry 8fe19a6ef0 dont send duplicate membership update events if pfp and display name are same
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry fd96f597cd respect m.room.guest_access on room joins
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
strawberry 982f9eb780 implement MSC4166, returning M_NOT_FOUND if no TURN URIs are set
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-29 19:19:20 +00:00
Matthew Scheffel 28cd784972 paginate_relations_with_filter DRY & flip ordering #504 2024-08-16 22:19:10 -04:00
Jason Volk 9b9a91f6ef add our_modules() for log capture filter convenience
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-08 18:09:21 +00:00
Jason Volk 94b805de0b generalize log capture to all admin commands; simplify handler
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-08 18:09:21 +00:00
Jason Volk eded585f79 rename some command types for consistency
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-08 18:09:21 +00:00
Jason Volk a552321287 add Clap to Error
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-08 18:09:21 +00:00
Jason Volk f98bfbbdcd add string stream convenience util; add ?Sized bounds on log fmt functors
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-08 18:09:21 +00:00
Jason Volk e9ab548445 tweak some tracing log levels
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-08 18:09:21 +00:00
Jason Volk 15184d1a79 Add span scope names array to capture filter data; optimize values visitor vec.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-08 18:09:21 +00:00
Jason Volk 0c6bbde25f fix markdown table formatter for log capture
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-08 18:09:21 +00:00
Jason Volk 13aa353765 add arrayvec as a dependency
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-08 18:09:21 +00:00
Jason Volk ac941a801a add interface to query rocksdb properties w/ admin cmd
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-08 18:09:21 +00:00
Jason Volk f261d44edb add method to iterate opened database columns
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-08 18:09:21 +00:00
Jason Volk 849cfdcdfa add rocksdb stats level option with conf item
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-08 18:09:21 +00:00
strawberry dcaa96a79f sync: always include_redundant_members when using element_hacks feature
see:
- https://github.com/matrix-org/matrix-js-sdk/pull/4329
- 568051c0f0/synapse/handlers/pagination.py (L639)
- https://matrix.to/#/!n8DKU1BeeJilOJXDPr:seirdy.one/$gvGF7GuPrLPR8nHg4UiHvP-ZVwuiMkYS8O6VlsDCW9w?via=awawawawawawawawawawawawawawawawawawawawawawawawawawawawawawaw.gay&via=transfem.dev&via=matrix.org

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-07 12:07:01 -04:00
strawberry 57940f38ea set last_seen_ip on new/initial device creation
this is not automatically updating, but at least have something
useful there instead of nothing

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-07 12:06:19 -04:00
strawberry c896acb729 dont consider presence status changes apart of presence spam
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-07 12:06:01 -04:00
strawberry 12d9e454db display success/failure count in get-remote-pdu-list
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-07 12:04:51 -04:00
strawberry 71ee31a014 add missing newline in banned room list output
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-08-07 12:04:12 -04:00
Jason Volk 2e3e14b045 refactor some additional errors
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-01 10:58:59 +00:00
Jason Volk 5add9a8c34 support field values in err! macro
Signed-off-by: Jason Volk <jason@zemos.net>
2024-08-01 10:58:58 +00:00
Jason Volk 5b1642f641 split server_keys from event_handler into service
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-31 21:10:22 +00:00
Jason Volk eb94aa7079 remove dangling sending/resolve unit
this was probably un-deleted during a rebase conflict resolution,
but remained outside of the mod tree.

Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-31 21:10:22 +00:00
Jason Volk 24884c3b9b move media helpers from api to services
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-31 03:04:17 +00:00
Jason Volk a0a002b17f disable legacy media compat by default; cleanse directory when disabled
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-31 03:04:17 +00:00
Jason Volk f632b06e6d use Services instead of Server for middleware function state
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-31 03:04:17 +00:00
Jason Volk 1f88866612 optimize api state extractor
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-31 03:04:17 +00:00
Jason Volk ccef1a4c8b add formal wrapping for api state
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-28 21:32:43 +00:00
Jason Volk 5c258f41c8 fixes for modules
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-28 05:59:12 -07:00
Jason Volk 15126ee1b2 additional weak references where applicable
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-28 05:59:12 -07:00
Jason Volk e37ac56dba use weak references to break services dependency cycle
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-28 05:59:12 -07:00
Jason Volk a74613be96 improve database repair/shutdown log messages
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-28 05:59:12 -07:00
Jason Volk a95ded167f fix type complexity
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-28 05:59:12 -07:00
Jason Volk 95121b6e05 use single-line codeblock for specific features lists
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-28 05:59:12 -07:00
Jason Volk e6884ef13a fix various nightly incidental lints
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-28 05:59:12 -07:00
Jason Volk 49033db2b8 fix trailing body passed to commands
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-28 05:59:12 -07:00
Jason Volk ddc8c3b46c split presence data object into file; improve service encapsulations
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-28 05:59:12 -07:00
Jason Volk ea95627dce hoist rustc flag string array to global const
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-28 05:59:12 -07:00
Jason Volk 2f85a5c1ac de-global services
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 09:08:51 +00:00
Jason Volk 7e50db4193 de-global services from admin
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 7a3cc3941e parse generics for implement macro
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk ca82b59c6f upgrade to syn 2.x
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 3b5607ecdc add macro for out-of-line definitions
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 96f6a75bc8 add refutable pattern function macro
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 68f42baf73 rename admin Command to CommandInput
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 271959ee27 add debug list-dependencies admin command
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk c423a83656 add cli override for any configuration item
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 4e975887cf add command to list features
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 8bb69eb81d add simple ast dimension diagnostic
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 2100618d47 add rustc build flags reflection
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 936d2915e2 add cargo manifest reflection
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk f014231644 add conf item to disable rocksdb compaction
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 7d487d53d8 de-cycle conduit_macros from conduit_core.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk d7d874f88d start core info module; move version to info
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk ee864bcd9e normalize admin debug command handlers
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 111cbea6fc add debug time command
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 85f734ec74 proc macro
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 2468e0c3de unconditionally derive Debug on subcommand enums
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk f841c2356d preliminary get-signing-keys command
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk c64adbec0e split signing_keys_for from verify_keys_for
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 4458efa2b2 rename signing_keys_for to verify_keys_for
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 5c0bf29122 add util for camel to snake case conversion
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 91b49a7786 add basic exchange util
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 5a17fbccf5 add type_name debug tool
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 5ed95ea357 contextualize handler in object
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk ccfa939bd3 split admin command enum from handler
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 263e338088 add --console program option to automatically spawn
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 2fb43dd38d infra to synthesize program options with config options
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 59efabbbc2 de-global server_is_ours / user_is_local
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 010e4ee35a de-global services for services
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 992c0a1e58 de-global services for admin
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 9b20c6918f add indirection for circular-dependencies between services
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 3dc91525ce fix over-tabulation
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk a88f913a17 enrich interface for inter-service referencing
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk 4343218957 initialize some containers with_capacity
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:42 +00:00
Jason Volk b116984e46 use mutex_map for url preview lock
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:41 +00:00
Jason Volk b0ac5255c8 move sending service impl properly back to mod root
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:41 +00:00
Jason Volk 29fc5b9b52 de-global some services in services
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:41 +00:00
Jason Volk 3ccd9ea326 consolidate all resolution in resolver; split units
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 08:26:41 +00:00
Jason Volk 8a2ae401df convert Client into Service
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 07:54:05 +00:00
Jason Volk f465d77ad3 convert Resolver into a Service.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 07:54:05 +00:00
Jason Volk 2fd6f6b0ff add polymorphism to Services
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 07:54:05 +00:00
Jason Volk 8b6018d77d de-global services() from api
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 07:54:03 +00:00
Jason Volk 463f1a1287 only use graceful shutdown w/ axum-server fixed
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-27 07:53:09 +00:00
strawberry 39c0f4ea3d delete unused bad_signature_ratelimiter rm'd in 67f9553790
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-24 19:12:20 -04:00
strawberry 405167fc3f add harmless check for presence PUT matching sender user
this is already done but we just don't error and always
use the sender user. match synapse behaviour where we check
and error.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-24 01:41:25 -04:00
strawberry b13ea4ff45 fix non-working admin room topic accessor output
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-24 01:41:25 -04:00
strawberry 96f9d64111 add back is_historical check on admin user creations from accidental removal
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-24 01:41:25 -04:00
strawberry 30ad5da5f1 use ruma-identifiers-validation feature from our ruma
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-24 01:41:25 -04:00
Matthew Scheffel 06531993f6
Calculate Age Rather than Hardcoding to 1 (#531) 2024-07-17 21:47:59 -04:00
Jason Volk 739eab46d5 refactor thumbnail math
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-16 02:40:18 +00:00
Jason Volk 923a98eb66 partially revert dc18f89c0b for now
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-16 02:40:18 +00:00
Jason Volk 4430e4dee0 de-global some services()
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-16 02:39:49 +00:00
Jason Volk d67f19a55d cleanup some error callsites
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-16 02:39:49 +00:00
Jason Volk b903b46d16 split thumbnailing related into unit
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-16 02:39:49 +00:00
Jason Volk 167559bb27 rename FileMeta::file to Option<content>
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-16 02:39:49 +00:00
Jason Volk 838e4b9d8d log more details for panic in tower handler
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-16 02:39:49 +00:00
Jason Volk 038b71fc9d add state to router
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-16 02:39:49 +00:00
Jason Volk 720fbd09c2 move routes into api router top level
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-16 02:39:49 +00:00
Jason Volk c42cb90dd3 simplify result handler / 405 error interposition
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-16 02:39:49 +00:00
Jason Volk 5950355348 break from wait loop on empty taskset
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-16 02:39:49 +00:00
strawberry bacffd6174 rename conduit_cache_capacity_modifier to cache_capacity_modifier
this prefix causes you to require setting the environment variable
to `CONDUWUIT_CONDUIT_CACHE_CAPACITY_MODIFIER`

alias this so we dont break any configs

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-14 12:08:15 -04:00
strawberry 7009f56a7a fix user directory publishing access controls
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-07-14 12:06:52 -04:00
Jason Volk e53c2fbc5a fix tracing flame envfilter defaults; remove preprocessed cfgs
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk 95006f7e46 fix unnecessary preprocessing cfgs
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk cce270d938 tokio metrics
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk 5ec49b3f62 split csp into array; integrate error; cleanup type
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk e4dc4a1ba5 fix graceful shutdown on unix socket
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk d2fb6d04c9 cleanup pending transactions before sender worker completes
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk 05efd9b044 elaborate error macro and apply at various callsites
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk b3f2288d07 add constant-expression string utils
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk 084751ae38 refactor globals::updates into a Service
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk aa7a310200 move media startup into service
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk 38c989a07e split service manager into unit
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk 5be679e17b refactor main task stack through service mgr
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk b8baa1223d reduce RoomVersionId patterns
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk b87f1649d4 split error into directory
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk 4a6f089b23 move some config checks into check unit
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk 4600c7f32d move infallible handling into error
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk 4cc92dd175 refactor Error::bad_config
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk 93ec4e579b error macro suite
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk c111d2e395 abstract service worker pattern; restart on panic.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk 03d890cd49 move admin tests into unit; fix
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk a35b6cbfdd use separate configurable jaeger envfilter
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-14 11:31:39 +00:00
Jason Volk 5570220c89 use separate but configurable envfilter for sentry
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk 899b79873e propagate errors from tracing init
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk 57969f9480 fix large stack array exceeding limit
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk d88ab37120 add configuration for sentry to send panics and errors
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk bc58e5002d add interface for current log filter; fix console suppression
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk 160f48043e add selective log handle reload
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk 0023b09f5b make tracing reload handles into a named map
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk db3c718ddc add config for sentry stacktraces
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk e73aa2aa21 log propagated errors in admin service; minor cleanup
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk 61f2a3c68b catch panic from admin commands
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk 0627b46f40 add panic suite to Error
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk f10f5319db elaborate error log functor stack
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk 16e76d45cb improve alloc stats interface; fix admin command formatting
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk 2a304c2b6c add some usage stats output on the mutex maps
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk 271f720286 move mutex maps out of globals into respective service
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk 2d251eb19c cleanup on drop for utils::mutex_map.
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk 01b2928d55 add make user admin command (#136)
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk 50c2d2b801 add command to force join user to room (#136)
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00
Jason Volk 5dcdafe207 take local join branch when remote join would fail
Signed-off-by: Jason Volk <jason@zemos.net>
2024-07-13 21:20:05 +00:00