docs(api): document Watch limits and revocation, and the commit page depth
- commit
- 6c7e2b344114b6cf2593f905ab14b144c01330c9
- author
- brice · · 2026-10-10 10:57 UTC
- parent
- dca0ed7
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
4 files · +33 -3
M gen/ermite/ermiteconnect/event.connect.go +18 -0
| @@ -50,6 +50,15 @@ type EventServiceClient interface { | |||
| 50 | 50 | // When resume_after is no longer buffered (or unknown), the stream begins | |
| 51 | 51 | // with a Gap event, then continues with the oldest buffered event: the client | |
| 52 | 52 | // must reload its state. Without resume_after, only new events are sent. | |
| 53 | + | // | |
| 54 | + | // The access of the caller is checked again for every event: the stream ends | |
| 55 | + | // with unauthenticated when the token was revoked or has expired (the server | |
| 56 | + | // may take a few seconds to notice). A repository that becomes private | |
| 57 | + | // sends one last repo_updated to the callers who could read it before, with | |
| 58 | + | // the new visibility and nothing else about it; no later event of it | |
| 59 | + | // reaches them. The server limits the watchers: more than 64 topics is | |
| 60 | + | // invalid_argument, and too many concurrent streams, in total or from one | |
| 61 | + | // client, is resource_exhausted. | |
| 53 | 62 | Watch(context.Context, *connect.Request[ermite.WatchRequest]) (*connect.ServerStreamForClient[ermite.WatchResponse], error) | |
| 54 | 63 | } | |
| 55 | 64 | ||
| @@ -94,6 +103,15 @@ type EventServiceHandler interface { | |||
| 94 | 103 | // When resume_after is no longer buffered (or unknown), the stream begins | |
| 95 | 104 | // with a Gap event, then continues with the oldest buffered event: the client | |
| 96 | 105 | // must reload its state. Without resume_after, only new events are sent. | |
| 106 | + | // | |
| 107 | + | // The access of the caller is checked again for every event: the stream ends | |
| 108 | + | // with unauthenticated when the token was revoked or has expired (the server | |
| 109 | + | // may take a few seconds to notice). A repository that becomes private | |
| 110 | + | // sends one last repo_updated to the callers who could read it before, with | |
| 111 | + | // the new visibility and nothing else about it; no later event of it | |
| 112 | + | // reaches them. The server limits the watchers: more than 64 topics is | |
| 113 | + | // invalid_argument, and too many concurrent streams, in total or from one | |
| 114 | + | // client, is resource_exhausted. | |
| 97 | 115 | Watch(context.Context, *connect.Request[ermite.WatchRequest], *connect.ServerStream[ermite.WatchResponse]) error | |
| 98 | 116 | } | |
| 99 | 117 | ||
| @@ -50,6 +50,15 @@ type EventServiceClient interface { | |||||
| 50 | // When resume_after is no longer buffered (or unknown), the stream begins | 50 | // When resume_after is no longer buffered (or unknown), the stream begins | ||
| 51 | // with a Gap event, then continues with the oldest buffered event: the client | 51 | // with a Gap event, then continues with the oldest buffered event: the client | ||
| 52 | // must reload its state. Without resume_after, only new events are sent. | 52 | // must reload its state. Without resume_after, only new events are sent. | ||
| 53 | + | // | |||
| 54 | + | // The access of the caller is checked again for every event: the stream ends | |||
| 55 | + | // with unauthenticated when the token was revoked or has expired (the server | |||
| 56 | + | // may take a few seconds to notice). A repository that becomes private | |||
| 57 | + | // sends one last repo_updated to the callers who could read it before, with | |||
| 58 | + | // the new visibility and nothing else about it; no later event of it | |||
| 59 | + | // reaches them. The server limits the watchers: more than 64 topics is | |||
| 60 | + | // invalid_argument, and too many concurrent streams, in total or from one | |||
| 61 | + | // client, is resource_exhausted. | |||
| 53 | Watch(context.Context, *connect.Request[ermite.WatchRequest]) (*connect.ServerStreamForClient[ermite.WatchResponse], error) | 62 | Watch(context.Context, *connect.Request[ermite.WatchRequest]) (*connect.ServerStreamForClient[ermite.WatchResponse], error) | ||
| 54 | } | 63 | } | ||
| 55 | 64 | ||||
| @@ -94,6 +103,15 @@ type EventServiceHandler interface { | |||||
| 94 | // When resume_after is no longer buffered (or unknown), the stream begins | 103 | // When resume_after is no longer buffered (or unknown), the stream begins | ||
| 95 | // with a Gap event, then continues with the oldest buffered event: the client | 104 | // with a Gap event, then continues with the oldest buffered event: the client | ||
| 96 | // must reload its state. Without resume_after, only new events are sent. | 105 | // must reload its state. Without resume_after, only new events are sent. | ||
| 106 | + | // | |||
| 107 | + | // The access of the caller is checked again for every event: the stream ends | |||
| 108 | + | // with unauthenticated when the token was revoked or has expired (the server | |||
| 109 | + | // may take a few seconds to notice). A repository that becomes private | |||
| 110 | + | // sends one last repo_updated to the callers who could read it before, with | |||
| 111 | + | // the new visibility and nothing else about it; no later event of it | |||
| 112 | + | // reaches them. The server limits the watchers: more than 64 topics is | |||
| 113 | + | // invalid_argument, and too many concurrent streams, in total or from one | |||
| 114 | + | // client, is resource_exhausted. | |||
| 97 | Watch(context.Context, *connect.Request[ermite.WatchRequest], *connect.ServerStream[ermite.WatchResponse]) error | 115 | Watch(context.Context, *connect.Request[ermite.WatchRequest], *connect.ServerStream[ermite.WatchResponse]) error | ||
| 98 | } | 116 | } | ||
| 99 | 117 | ||||
M gen/ermite/ermiteconnect/git.connect.go +4 -2
| @@ -67,7 +67,8 @@ type GitServiceClient interface { | |||
| 67 | 67 | GetBlob(context.Context, *connect.Request[ermite.GetBlobRequest]) (*connect.ServerStreamForClient[ermite.GetBlobResponse], error) | |
| 68 | 68 | // ListCommits lists the history reachable from a revision, newest first | |
| 69 | 69 | // (Git's default order), optionally limited to the commits that touched a | |
| 70 | - | // path. | |
| 70 | + | // path. A page_token that points deeper than 100,000 commits into the | |
| 71 | + | // history is invalid_argument. | |
| 71 | 72 | ListCommits(context.Context, *connect.Request[ermite.ListCommitsRequest]) (*connect.Response[ermite.ListCommitsResponse], error) | |
| 72 | 73 | // GetCommit returns one commit with its statistics and its diff. | |
| 73 | 74 | GetCommit(context.Context, *connect.Request[ermite.GetCommitRequest]) (*connect.Response[ermite.GetCommitResponse], error) | |
| @@ -182,7 +183,8 @@ type GitServiceHandler interface { | |||
| 182 | 183 | GetBlob(context.Context, *connect.Request[ermite.GetBlobRequest], *connect.ServerStream[ermite.GetBlobResponse]) error | |
| 183 | 184 | // ListCommits lists the history reachable from a revision, newest first | |
| 184 | 185 | // (Git's default order), optionally limited to the commits that touched a | |
| 185 | - | // path. | |
| 186 | + | // path. A page_token that points deeper than 100,000 commits into the | |
| 187 | + | // history is invalid_argument. | |
| 186 | 188 | ListCommits(context.Context, *connect.Request[ermite.ListCommitsRequest]) (*connect.Response[ermite.ListCommitsResponse], error) | |
| 187 | 189 | // GetCommit returns one commit with its statistics and its diff. | |
| 188 | 190 | GetCommit(context.Context, *connect.Request[ermite.GetCommitRequest]) (*connect.Response[ermite.GetCommitResponse], error) | |
| @@ -67,7 +67,8 @@ type GitServiceClient interface { | |||||
| 67 | GetBlob(context.Context, *connect.Request[ermite.GetBlobRequest]) (*connect.ServerStreamForClient[ermite.GetBlobResponse], error) | 67 | GetBlob(context.Context, *connect.Request[ermite.GetBlobRequest]) (*connect.ServerStreamForClient[ermite.GetBlobResponse], error) | ||
| 68 | // ListCommits lists the history reachable from a revision, newest first | 68 | // ListCommits lists the history reachable from a revision, newest first | ||
| 69 | // (Git's default order), optionally limited to the commits that touched a | 69 | // (Git's default order), optionally limited to the commits that touched a | ||
| 70 | - | // path. | 70 | + | // path. A page_token that points deeper than 100,000 commits into the |
| 71 | + | // history is invalid_argument. | |||
| 71 | ListCommits(context.Context, *connect.Request[ermite.ListCommitsRequest]) (*connect.Response[ermite.ListCommitsResponse], error) | 72 | ListCommits(context.Context, *connect.Request[ermite.ListCommitsRequest]) (*connect.Response[ermite.ListCommitsResponse], error) | ||
| 72 | // GetCommit returns one commit with its statistics and its diff. | 73 | // GetCommit returns one commit with its statistics and its diff. | ||
| 73 | GetCommit(context.Context, *connect.Request[ermite.GetCommitRequest]) (*connect.Response[ermite.GetCommitResponse], error) | 74 | GetCommit(context.Context, *connect.Request[ermite.GetCommitRequest]) (*connect.Response[ermite.GetCommitResponse], error) | ||
| @@ -182,7 +183,8 @@ type GitServiceHandler interface { | |||||
| 182 | GetBlob(context.Context, *connect.Request[ermite.GetBlobRequest], *connect.ServerStream[ermite.GetBlobResponse]) error | 183 | GetBlob(context.Context, *connect.Request[ermite.GetBlobRequest], *connect.ServerStream[ermite.GetBlobResponse]) error | ||
| 183 | // ListCommits lists the history reachable from a revision, newest first | 184 | // ListCommits lists the history reachable from a revision, newest first | ||
| 184 | // (Git's default order), optionally limited to the commits that touched a | 185 | // (Git's default order), optionally limited to the commits that touched a | ||
| 185 | - | // path. | 186 | + | // path. A page_token that points deeper than 100,000 commits into the |
| 187 | + | // history is invalid_argument. | |||
| 186 | ListCommits(context.Context, *connect.Request[ermite.ListCommitsRequest]) (*connect.Response[ermite.ListCommitsResponse], error) | 188 | ListCommits(context.Context, *connect.Request[ermite.ListCommitsRequest]) (*connect.Response[ermite.ListCommitsResponse], error) | ||
| 187 | // GetCommit returns one commit with its statistics and its diff. | 189 | // GetCommit returns one commit with its statistics and its diff. | ||
| 188 | GetCommit(context.Context, *connect.Request[ermite.GetCommitRequest]) (*connect.Response[ermite.GetCommitResponse], error) | 190 | GetCommit(context.Context, *connect.Request[ermite.GetCommitRequest]) (*connect.Response[ermite.GetCommitResponse], error) | ||
M proto/ermite/event.proto +9 -0
| @@ -18,6 +18,15 @@ service EventService { | |||
| 18 | 18 | // When resume_after is no longer buffered (or unknown), the stream begins | |
| 19 | 19 | // with a Gap event, then continues with the oldest buffered event: the client | |
| 20 | 20 | // must reload its state. Without resume_after, only new events are sent. | |
| 21 | + | // | |
| 22 | + | // The access of the caller is checked again for every event: the stream ends | |
| 23 | + | // with unauthenticated when the token was revoked or has expired (the server | |
| 24 | + | // may take a few seconds to notice). A repository that becomes private | |
| 25 | + | // sends one last repo_updated to the callers who could read it before, with | |
| 26 | + | // the new visibility and nothing else about it; no later event of it | |
| 27 | + | // reaches them. The server limits the watchers: more than 64 topics is | |
| 28 | + | // invalid_argument, and too many concurrent streams, in total or from one | |
| 29 | + | // client, is resource_exhausted. | |
| 21 | 30 | rpc Watch(WatchRequest) returns (stream WatchResponse); | |
| 22 | 31 | } | |
| 23 | 32 | ||
| @@ -18,6 +18,15 @@ service EventService { | |||||
| 18 | // When resume_after is no longer buffered (or unknown), the stream begins | 18 | // When resume_after is no longer buffered (or unknown), the stream begins | ||
| 19 | // with a Gap event, then continues with the oldest buffered event: the client | 19 | // with a Gap event, then continues with the oldest buffered event: the client | ||
| 20 | // must reload its state. Without resume_after, only new events are sent. | 20 | // must reload its state. Without resume_after, only new events are sent. | ||
| 21 | + | // | |||
| 22 | + | // The access of the caller is checked again for every event: the stream ends | |||
| 23 | + | // with unauthenticated when the token was revoked or has expired (the server | |||
| 24 | + | // may take a few seconds to notice). A repository that becomes private | |||
| 25 | + | // sends one last repo_updated to the callers who could read it before, with | |||
| 26 | + | // the new visibility and nothing else about it; no later event of it | |||
| 27 | + | // reaches them. The server limits the watchers: more than 64 topics is | |||
| 28 | + | // invalid_argument, and too many concurrent streams, in total or from one | |||
| 29 | + | // client, is resource_exhausted. | |||
| 21 | rpc Watch(WatchRequest) returns (stream WatchResponse); | 30 | rpc Watch(WatchRequest) returns (stream WatchResponse); | ||
| 22 | } | 31 | } | ||
| 23 | 32 | ||||
M proto/ermite/git.proto +2 -1
| @@ -89,7 +89,8 @@ service GitService { | |||
| 89 | 89 | rpc GetBlob(GetBlobRequest) returns (stream GetBlobResponse); | |
| 90 | 90 | // ListCommits lists the history reachable from a revision, newest first | |
| 91 | 91 | // (Git's default order), optionally limited to the commits that touched a | |
| 92 | - | // path. | |
| 92 | + | // path. A page_token that points deeper than 100,000 commits into the | |
| 93 | + | // history is invalid_argument. | |
| 93 | 94 | rpc ListCommits(ListCommitsRequest) returns (ListCommitsResponse); | |
| 94 | 95 | // GetCommit returns one commit with its statistics and its diff. | |
| 95 | 96 | rpc GetCommit(GetCommitRequest) returns (GetCommitResponse); | |
| @@ -89,7 +89,8 @@ service GitService { | |||||
| 89 | rpc GetBlob(GetBlobRequest) returns (stream GetBlobResponse); | 89 | rpc GetBlob(GetBlobRequest) returns (stream GetBlobResponse); | ||
| 90 | // ListCommits lists the history reachable from a revision, newest first | 90 | // ListCommits lists the history reachable from a revision, newest first | ||
| 91 | // (Git's default order), optionally limited to the commits that touched a | 91 | // (Git's default order), optionally limited to the commits that touched a | ||
| 92 | - | // path. | 92 | + | // path. A page_token that points deeper than 100,000 commits into the |
| 93 | + | // history is invalid_argument. | |||
| 93 | rpc ListCommits(ListCommitsRequest) returns (ListCommitsResponse); | 94 | rpc ListCommits(ListCommitsRequest) returns (ListCommitsResponse); | ||
| 94 | // GetCommit returns one commit with its statistics and its diff. | 95 | // GetCommit returns one commit with its statistics and its diff. | ||
| 95 | rpc GetCommit(GetCommitRequest) returns (GetCommitResponse); | 96 | rpc GetCommit(GetCommitRequest) returns (GetCommitResponse); | ||