Relay sync failures are never retried, relay stays broken indefinitely #34

Closed
opened 2026-04-20 12:04:51 +00:00 by userAdityaa · 1 comment
Contributor

Description

When Caravel fails to sync a relay to Zooid, command::fail_relay_sync writes the error string to relay.sync_error and fires a fail_relay_sync activity. The infra module's should_sync_relay_activity function only triggers a sync for four specific activity types:

fn should_sync_relay_activity(activity_type: &str) -> bool {
    matches!(
        activity_type,
        "create_relay" | "update_relay" | "activate_relay" | "deactivate_relay"
    )
}

fail_relay_sync is not in this list. There is no background retry loop, no scheduled sweep of relays with sync_error != '', and no retry on startup. A relay that fails to provision because Zooid was temporarily unavailable will stay broken forever unless the user manually edits and re-saves the relay to trigger a new update_relay activity.

### Description When Caravel fails to sync a relay to Zooid, `command::fail_relay_sync` writes the error string to `relay.sync_error` and fires a `fail_relay_sync` activity. The infra module's` should_sync_relay_activity` function only triggers a sync for four specific activity types: ```rs fn should_sync_relay_activity(activity_type: &str) -> bool { matches!( activity_type, "create_relay" | "update_relay" | "activate_relay" | "deactivate_relay" ) } ``` `fail_relay_sync` is not in this list. There is no background retry loop, no scheduled sweep of relays with `sync_error != ''`, and no retry on startup. A relay that fails to provision because Zooid was temporarily unavailable will stay broken forever unless the user manually edits and re-saves the relay to trigger a new `update_relay` activity.
Owner

Yes, but be sure to avoid an infinite loop. Re-syncing should be delayed, and if it fails repeatedly it should stop retrying.

Yes, but be sure to avoid an infinite loop. Re-syncing should be delayed, and if it fails repeatedly it should stop retrying.
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coracle/caravel#34