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

Document atomic nature of batch create/update/delete RPCs #11

Merged
merged 13 commits into from
Nov 9, 2023
3 changes: 3 additions & 0 deletions buf/registry/module/v1beta1/commit_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ service CommitService {
//
// This is used by push and sync.
//
// This operation is atomic. Either all Commits and associated content are created, or an error is returned.
// them are created.
nicksnyder marked this conversation as resolved.
Show resolved Hide resolved
//
// TODO: PushCommits? Something else? This is creating potentially a bunch of resources.
rpc CreateCommits(CreateCommitsRequest) returns (CreateCommitsResponse) {
option idempotency_level = IDEMPOTENT;
Expand Down
6 changes: 6 additions & 0 deletions buf/registry/module/v1beta1/module_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ message CreateModulesRequest {
string release_branch_name = 6 [(buf.validate.field).string.max_len = 250];
}
// The Modules to create.
//
// This operation is atomic. Either all Modules are created, or an error happens and none of them are created.
repeated Value values = 1 [
(buf.validate.field).repeated.min_items = 1,
(buf.validate.field).repeated.max_items = 250
Expand Down Expand Up @@ -156,6 +158,8 @@ message UpdateModulesRequest {
}
}
// The Modules to update.
//
// This operation is atomic. Either all Modules are updated, or an error happens and none of them are updated.
repeated Value values = 1 [
(buf.validate.field).repeated.min_items = 1,
(buf.validate.field).repeated.max_items = 250
Expand All @@ -169,6 +173,8 @@ message UpdateModulesResponse {

message DeleteModulesRequest {
// The Modules to delete.
//
// This operation is atomic. Either all Modules are deleted, or an error happens and none of them are deleted.
repeated ModuleRef module_refs = 1 [
(buf.validate.field).repeated.min_items = 1,
(buf.validate.field).repeated.max_items = 250
Expand Down
4 changes: 4 additions & 0 deletions buf/registry/module/v1beta1/tag_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ message CreateTagsRequest {
];
}
// The Tags to create.
//
// This operation is atomic. Either all Tags are created, or an error happens and none of them are created.
repeated Value values = 1 [
(buf.validate.field).repeated.min_items = 1,
(buf.validate.field).repeated.max_items = 250
Expand All @@ -117,6 +119,8 @@ message CreateTagsResponse {

message DeleteTagsRequest {
// The Tags to delete.
//
// This operation is atomic. Either all Tags are deleted, or an error happens and none of them are deleted.
repeated TagRef tag_refs = 1 [
(buf.validate.field).repeated.min_items = 1,
(buf.validate.field).repeated.max_items = 250
Expand Down
6 changes: 6 additions & 0 deletions buf/registry/owner/v1beta1/organization_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ message CreateOrganizationsRequest {
OrganizationVerificationStatus verification_status = 4 [(buf.validate.field).enum.defined_only = true];
}
// The Organizations to create.
//
// This operation is atomic. Either all Organizations are created, or an error happens and none of them are created.
repeated Value values = 1 [
(buf.validate.field).repeated.min_items = 1,
(buf.validate.field).repeated.max_items = 250
Expand Down Expand Up @@ -132,6 +134,8 @@ message UpdateOrganizationsRequest {
optional OrganizationVerificationStatus verification_status = 4 [(buf.validate.field).enum.defined_only = true];
}
// The Organizations to update.
//
// This operation is atomic. Either all Organizations are updated, or an error happens and none of them are updated.
repeated Value values = 1 [
(buf.validate.field).repeated.min_items = 1,
(buf.validate.field).repeated.max_items = 250
Expand All @@ -145,6 +149,8 @@ message UpdateOrganizationsResponse {

message DeleteOrganizationsRequest {
// The Organizations to delete.
//
// This operation is atomic. Either all Organizations are deleted, or an error happens and none of them are deleted.
repeated OrganizationRef organization_refs = 1 [
(buf.validate.field).repeated.min_items = 1,
(buf.validate.field).repeated.max_items = 250
Expand Down
6 changes: 6 additions & 0 deletions buf/registry/owner/v1beta1/user_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ message CreateUsersRequest {
UserVerificationStatus verification_status = 5 [(buf.validate.field).enum.defined_only = true];
}
// The Users to create.
//
// This operation is atomic. Either all Users are created, or an error happens and none of them are created.
repeated Value values = 1 [
(buf.validate.field).repeated.min_items = 1,
(buf.validate.field).repeated.max_items = 250
Expand Down Expand Up @@ -138,6 +140,8 @@ message UpdateUsersRequest {
optional UserVerificationStatus verification_status = 5 [(buf.validate.field).enum.defined_only = true];
}
// The Users to update.
//
// This operation is atomic. Either all Users are updated, or an error happens and none of them are updated.
repeated Value values = 1 [
(buf.validate.field).repeated.min_items = 1,
(buf.validate.field).repeated.max_items = 250
Expand All @@ -151,6 +155,8 @@ message UpdateUsersResponse {

message DeleteUsersRequest {
// The Users to delete.
//
// This operation is atomic. Either all Users are deleted, or an error happens and none of them are deleted.
repeated UserRef user_refs = 1 [
(buf.validate.field).repeated.min_items = 1,
(buf.validate.field).repeated.max_items = 250
Expand Down
Loading