Closed skopf closed 1 year ago
Thanks for filing this. You're exactly right that this was not supposed to be cid
formatted. That accidentally stuck around when doing the refactor.
I've put a fix up here & as well as a test to support it: https://github.com/bluesky-social/atproto/pull/1579
Describe the bug
The latest version of the atprotocol spec defines the optional "since" parameter for "com.atproto.sync.getRepo" to take a CID. See here in the lexicon https://github.com/bluesky-social/atproto/blob/main/lexicons/com/atproto/sync/getRepo.json#L17 and here on the website: https://atproto.com/lexicons/com-atproto-sync#comatprotosyncgetrepo
The actual implementation however is expecting this parameter to be a "refkey" and uses it to filter on the "repoRev" column: https://github.com/bluesky-social/atproto/blob/main/packages/pds/src/sql-repo-storage.ts#L292
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Lexicon and implementation match.
Details
If expecting a CID, the implementation first needs to search for this CID, get the repoRev from this record, and then filters based on this repoRev. A potential problem could be that the record with the CID might have been deleted meanwhile. Another option would be to change the protocol spec and expect the RevKey of the commit rather than the CID for the "since" parameter.