Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo history rewrite #1479

Merged
merged 44 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
580cf1b
logical changes in repo
dholms Aug 15, 2023
89d249f
tests
dholms Aug 15, 2023
7d128ae
tweak commit data
dholms Aug 15, 2023
b1ba19e
building pds
dholms Aug 15, 2023
bc0c193
patching up some tests
dholms Aug 15, 2023
bd74450
tidy + more tests
dholms Aug 16, 2023
19c61b8
patch up bsky
dholms Aug 16, 2023
a8ee771
clean up db
dholms Aug 16, 2023
eda41b7
db migration
dholms Aug 16, 2023
d8b90b2
small patches
dholms Aug 16, 2023
ce14c59
fix up another test
dholms Aug 16, 2023
1ae09b1
merged
dholms Aug 16, 2023
b6e6575
reinclude prevs
dholms Aug 17, 2023
ae40a20
api & lex updates
dholms Aug 17, 2023
c1187e9
add back in deprecated routes
dholms Aug 17, 2023
494cd71
backward compatibility for commit v2
dholms Aug 17, 2023
570c182
merge
dholms Aug 17, 2023
94e2e76
add upgrade repo version root
dholms Aug 17, 2023
f8ee961
move namespace
dholms Aug 17, 2023
3eb2726
migration test
dholms Aug 17, 2023
71869cb
patch up a few more tests
dholms Aug 17, 2023
ae4e749
remove deprecated rebase routes
dholms Aug 17, 2023
0fb19aa
Merge branch 'main' into repo-history-rewrite
dholms Aug 17, 2023
0449413
tweak api
dholms Aug 18, 2023
5a1fe41
sprinkle rev around a few more places
dholms Aug 23, 2023
da11b04
merge main
dholms Aug 23, 2023
c87a4e7
getCurrent -> getLatestCommit
dholms Aug 23, 2023
614ebf4
merge main
dholms Aug 28, 2023
e51f64b
fix test
dholms Aug 28, 2023
c0f44f9
pr feedback & tidy
dholms Aug 28, 2023
7844215
fix up block pagination
dholms Aug 28, 2023
dd25cdc
tidy again
dholms Aug 28, 2023
3b5627d
add in a tets
dholms Aug 28, 2023
ef5f232
add cursor to listBlobs
dholms Aug 28, 2023
ded8db7
getRepo rev -> since
dholms Aug 28, 2023
141af64
clean up proofs test
dholms Aug 28, 2023
627ddb3
dont change getHead
dholms Aug 28, 2023
270fcf0
tweak migrate route
dholms Aug 28, 2023
f3206a3
build branch
dholms Aug 28, 2023
d2000c1
hit index in block range query
dholms Aug 28, 2023
ce31986
check for dupe record refs
dholms Aug 29, 2023
ba5dbc2
tidy
dholms Aug 29, 2023
d331194
set prev to null
dholms Aug 29, 2023
95e3a79
dont build branch
dholms Aug 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 0 additions & 33 deletions lexicons/com/atproto/admin/rebaseRepo.json

This file was deleted.

33 changes: 0 additions & 33 deletions lexicons/com/atproto/repo/rebaseRepo.json

This file was deleted.

7 changes: 1 addition & 6 deletions lexicons/com/atproto/sync/getCheckout.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "query",
"description": "Gets the repo state.",
"description": "DEPRECATED - please use com.atproto.sync.getRepo instead",
"parameters": {
"type": "params",
"required": ["did"],
Expand All @@ -13,11 +13,6 @@
"type": "string",
"format": "did",
"description": "The DID of the repo."
},
"commit": {
"type": "string",
"format": "cid",
"description": "The commit to get the checkout from. Defaults to current HEAD."
}
}
},
Expand Down
44 changes: 0 additions & 44 deletions lexicons/com/atproto/sync/getCommitPath.json

This file was deleted.

4 changes: 2 additions & 2 deletions lexicons/com/atproto/sync/getHead.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "query",
"description": "Gets the current HEAD CID of a repo.",
"description": "DEPRECATED - please use com.atproto.sync.getLatestCommit instead",
"parameters": {
"type": "params",
"required": ["did"],
Expand All @@ -27,7 +27,7 @@
}
},
"errors": [
{"name": "HeadNotFound"}
{"name": "RootNotFound"}
]
}
}
Expand Down
35 changes: 35 additions & 0 deletions lexicons/com/atproto/sync/getLatestCommit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"lexicon": 1,
"id": "com.atproto.sync.getLatestCommit",
"defs": {
"main": {
"type": "query",
"description": "Gets the current commit CID & revision of the repo.",
"parameters": {
"type": "params",
"required": ["did"],
"properties": {
"did": {
"type": "string",
"format": "did",
"description": "The DID of the repo."
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["cid", "rev"],
"properties": {
"cid": {"type": "string", "format": "cid"},
"rev": {"type": "string"}
dholms marked this conversation as resolved.
Show resolved Hide resolved
}
}
},
"errors": [
{"name": "RepoNotFound"}
]
}
}
}
11 changes: 3 additions & 8 deletions lexicons/com/atproto/sync/getRepo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"defs": {
"main": {
"type": "query",
"description": "Gets the repo state.",
"description": "Gets the did's repo, optionally catching up from a specific revision.",
"parameters": {
"type": "params",
"required": ["did"],
Expand All @@ -14,15 +14,10 @@
"format": "did",
"description": "The DID of the repo."
},
"earliest": {
"rev": {
"type": "string",
"format": "cid",
"description": "The earliest commit in the commit range (not inclusive)"
},
"latest": {
"type": "string",
"format": "cid",
"description": "The latest commit in the commit range (inclusive)"
"description": "The revision of the repo to catch up from."
}
}
},
Expand Down
5 changes: 2 additions & 3 deletions lexicons/com/atproto/sync/listBlobs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
"defs": {
"main": {
"type": "query",
"description": "List blob cids for some range of commits",
"description": "List blob cids since some revision",
"parameters": {
"type": "params",
"required": ["did"],
"properties": {
"did": {"type": "string", "format": "did", "description": "The DID of the repo."},
"latest": { "type": "string", "format": "cid", "description": "The most recent commit"},
"earliest": { "type": "string", "format": "cid", "description": "The earliest commit to start from"}
"rev": { "type": "string", "format": "cid", "description": "Optional revision of the repo to list blobs since"}
}
},
"output": {
Expand Down
12 changes: 10 additions & 2 deletions lexicons/com/atproto/sync/subscribeRepos.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,23 @@
},
"commit": {
"type": "object",
"required": ["seq", "rebase", "tooBig", "repo", "commit", "prev", "blocks", "ops", "blobs", "time"],
"nullable": ["prev"],
"required": ["seq", "rebase", "tooBig", "repo", "commit", "rev", "since", "blocks", "ops", "blobs", "time"],
"nullable": ["prev", "since"],
"properties": {
"seq": {"type": "integer"},
"rebase": {"type": "boolean"},
"tooBig": {"type": "boolean"},
"repo": {"type": "string", "format": "did"},
"commit": {"type": "cid-link"},
"prev": {"type": "cid-link"},
dholms marked this conversation as resolved.
Show resolved Hide resolved
"rev": {
"type": "string",
"description": "The rev of the emitted commit"
},
"since": {
"type": "string",
"description": "The rev of the last emitted from this repo"
dholms marked this conversation as resolved.
Show resolved Hide resolved
},
"blocks": {
"type": "bytes",
"description": "CAR file containing relevant blocks",
Expand Down
20 changes: 20 additions & 0 deletions lexicons/com/atproto/temp/upgradeRepoVersion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"lexicon": 1,
"id": "com.atproto.temp.upgradeRepoVersion",
dholms marked this conversation as resolved.
Show resolved Hide resolved
"defs": {
"main": {
"type": "procedure",
"description": "Upgrade a repo to v3",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": ["did"],
"properties": {
"did": { "type": "string", "format": "did" }
}
}
}
}
}
}