Parakeet is a Rust-based Bluesky AppServer aiming to implement most of the functionality required to support the Bluesky client
appview atproto bluesky rust appserver
66
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(consumer): reorder backfill to resolve repo status before handles as it was crashing on deleted accounts.

Mia 852faf6f d93a4443

+17 -14
+17 -14
consumer/src/backfill/mod.rs
··· 149 149 150 150 let pds_url = service.service_endpoint; 151 151 152 - // in theory, we can use com.atproto.identity.resolveHandle against a PDS, but that seems 153 - // like a way to end up with really sus handles. 154 - let Some(handle_did) = inner.resolver.resolve_handle(&handle).await? else { 155 - eyre::bail!("Failed to resolve did for handle {handle}"); 156 - }; 157 - 158 - if handle_did != did { 159 - eyre::bail!("requested DID doesn't match handle"); 160 - } 161 - 162 - // set the handle from above 163 - db::update_handle(conn, did, Some(handle)).await?; 164 - 165 - // check the repo status 152 + // check the repo status before we attempt to resolve the handle. There's a case where we can't 153 + // resolve the handle in the DID doc because the acc is already deleted. 166 154 let Some(repo_status) = check_pds_repo_status(&inner.client, &pds_url, did).await? else { 167 155 // this repo can't be found - set dirty and assume deleted. 168 156 tracing::debug!("repo was deleted"); ··· 178 166 db::update_actor_status(conn, did, status.into(), ActorSyncState::Dirty).await?; 179 167 return Ok(()); 180 168 } 169 + 170 + // at this point, the account will be active and we can attempt to resolve the handle. 171 + 172 + // in theory, we can use com.atproto.identity.resolveHandle against a PDS, but that seems 173 + // like a way to end up with really sus handles. 174 + let Some(handle_did) = inner.resolver.resolve_handle(&handle).await? else { 175 + eyre::bail!("Failed to resolve did for handle {handle}"); 176 + }; 177 + 178 + if handle_did != did { 179 + eyre::bail!("requested DID doesn't match handle"); 180 + } 181 + 182 + // set the handle from above 183 + db::update_handle(conn, did, Some(handle)).await?; 181 184 182 185 // now we can start actually backfilling 183 186 db::update_repo_sync_state(conn, did, ActorSyncState::Processing).await?;