bluesky-social / indigo

Go source code for Bluesky's atproto services.
https://atproto.com
Apache License 2.0
726 stars 101 forks source link

goat feature request: fetch record from appview #794

Open snarfed opened 5 hours ago

snarfed commented 5 hours ago

Hey @bnewbold! Thanks again for goat, it's great! Any chance you could add a flag to get and record * to make it talk to the appview instead of the PDS? I routinely debug cases where a record may or may not have made it all the way through the appview, so I'd love to be able to easily see if a record is on both, or just the PDS, or neither.

Thanks in advance!

bnewbold commented 2 hours ago

oh wow!

https://api.bsky.app/xrpc/com.atproto.repo.getRecord?repo=did:plc:dyyvywontyeuaegemczcushz&collection=app.bsky.feed.post&rkey=3laf6a5r77h2m

I didn't actually realize the appview implemented that endpoint! jeez.

ok, I think the way to do this will be having a "service" argument which allows specifying a specific host to fetch from. That would work with the appview or relay or manually specifying a PDS. does that work for you?

FWIW we should probably have that endpoint return an HTTP header indicating the last processed rev of the repo, which would help with debugging. And then goat would need some way to surface that.

snarfed commented 1 hour ago

--service sgtm, and last processed rev too!