fix: identify RequestError::Transport as infrastructure error - #870
fix: identify RequestError::Transport as infrastructure error#870aintnostressin wants to merge 133 commits into
RequestError::Transport as infrastructure error#870Conversation
…HS from run_all - NexusWatcher::start now spawns 3 parallel tokio tasks: 1. Default homeserver processing (run_default_homeserver) 2. Other homeservers processing (run_all, excluding default HS) 3. Reserved for future use (TODO placeholder) - Added run_default_homeserver to TEventProcessorRunner trait - Modified homeservers_by_priority to exclude the default homeserver - Added Send + Sync bounds to TEventProcessorRunner trait - Updated all tests and rustdocs Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
…match Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
Fix pkarr version mismatch in PubkyId conversion
…s` (#761) * refactor: extract periodic task loop into reusable run_periodic_tasks * Fix periodic task ticks to skip missed intervals Set MissedTickBehavior::Skip on the interval timer in run_periodic_tasks so that if a task takes longer than its tick interval, missed ticks are dropped instead of queuing up a burst of back-to-back invocations. Added tests verifying that slow tasks don't accumulate queued ticks and that fast tasks still tick at the expected cadence. * chore: rename variables for clarity * chore: make task_runner module private * log: NexusWatcher::start logs task outcomes on exit * chore: cargo fmt * chore: limit visibility of Task structs to pub(crate) * fix: correctly set task name for panicking tasks * fix: ensure NexusWatcher::start returns Err if any task panics --------- Co-authored-by: Claude <noreply@anthropic.com>
* ref: runners and indexers * chore: use runner pub function * extract_retry_event_info -> handle_error (#785) * remove get_homeserver_id fn (#784) * Extract common TEventProcessorRunner::run (#789) * Add HsEventProcessor rustdoc * Add KeyBasedEventProcessor rustdoc * Add HsEventProcessorRunner rustdoc * Add KeyBasedEventProcessorRunner rustdoc * Add TODO for KeyBasedEventProcessor::run_internal * Extract no-op default TEventProcessorRunner::post_run fn --------- Co-authored-by: aintnostressin <aintnostressin@proton.me> Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
* ref: runners and indexers * chore: use runner pub function * extract_retry_event_info -> handle_error (#785) * remove get_homeserver_id fn (#784) * TEventProcessor: expand logic of handle_error * Clarify comments * fix: remove InternalError from is_infrastructure * Expand logic for EventProcessorError::is_infrastructure_err * chore: remove unused imports --------- Co-authored-by: tipogi <tipogi@protonmail.com> Co-authored-by: aintnostressin <aintnostressin@proton.me>
Greptile SummaryThis PR fixes a misclassification where
Confidence Score: 5/5Safe to merge — the change is narrowly scoped to transport-layer error classification and does not touch any data path, state mutation, or persistence logic. The two changed files touch only error classification logic. The No files require special attention.
|
| Filename | Overview |
|---|---|
| nexus-common/src/db/connectors/pubky.rs | Adds is_transport: bool field to RequestFailed, sets it true only for RequestError::Transport, and false for Server (non-4xx/5xx), Validation, and DecodeJson variants. |
| nexus-common/src/models/event/errors.rs | Extends is_infrastructure() to handle the PubkyClientError arm, returning true only when RequestFailed { is_transport: true } and false for all other client-error variants; also updates client_error() constructor for the new RequestFailed shape. |
Reviews (4): Last reviewed commit: "treat only transport errors as infra err..." | Re-trigger Greptile
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
|
@greptile review again |
RequestError::Transport as infrastructure error
|
I was testing this locally and it may cause a stall in homeserver indexing process if we process an event line and user doesn't have a PKARR record published |
|
This may indicate a broader problem: If we are acting in the context of the homeserver (processing event lines) we could fetch data directly from that homeserver instead of performing dns resolution |
|
Possible fix for problems described above: #877 |
It should abort homeserver run in case of infrastructure error.
After fix: