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
2 changes: 2 additions & 0 deletions buf/registry/module/v1beta1/commit_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ message CreateCommitsRequest {
//
// If there are already VCSCommits on the associated Module with a given hash, this
// will result in an error. Otherwise, a new VCSCommit is created.
//
// This operation is atomic. Either all Commits are created, or an error happens and none of them are created.
nicksnyder marked this conversation as resolved.
Show resolved Hide resolved
repeated AssociatedVCSCommit associated_vcs_commits = 5;
}

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 @@ -112,6 +112,8 @@ message CreateModulesRequest {
string release_branch_name = 6 [(buf.validate.field).string.max_len = 255];
}
// 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];
}

Expand Down Expand Up @@ -148,6 +150,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];
}

Expand All @@ -158,6 +162,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];
}

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 @@ -101,6 +101,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];
}

Expand All @@ -111,6 +113,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];
}

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 @@ -102,6 +102,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];
}

Expand All @@ -126,6 +128,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];
}

Expand All @@ -136,6 +140,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];
}

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 @@ -110,6 +110,8 @@ message CreateUsersRequest {
UserVerificationStatus verification_status = 6 [(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];
}

Expand Down Expand Up @@ -138,6 +140,8 @@ message UpdateUsersRequest {
optional UserVerificationStatus verification_status = 6 [(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];
}

Expand All @@ -148,6 +152,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];
}

Expand Down
Loading