Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat(review): read a review run back (#21596)

h3n4ld0ee25269fed
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yaml
index 5b73c78429..dca801b881 100644
--- a/backend/api/mcp/gen/openapi.yaml
+++ b/backend/api/mcp/gen/openapi.yaml
@@ -3139,6 +3139,49 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.Issue'
+ /bytebase.v1.IssueService/GetReviewRun:
+ post:
+ tags:
+ - bytebase.v1.IssueService
+ summary: GetReviewRun
+ description: |-
+ Gets the current run of one reviewer on an issue. The run carries
+ execution status only; review results are issue comments. A reviewer
+ that has never run on the issue is NOT_FOUND.
+ Permissions required: bb.reviewRuns.get
+ operationId: bytebase.v1.IssueService.GetReviewRun
+ parameters:
+ - name: Connect-Protocol-Version
+ in: header
+ description: Define the version of the Connect protocol
+ schema:
+ $ref: '#/components/schemas/connect-protocol-version'
+ example: 1
+ - name: Connect-Timeout-Ms
+ in: header
+ description: Define the timeout, in ms
+ schema:
+ $ref: '#/components/schemas/connect-timeout-header'
+ example: 1000
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.GetReviewRunRequest'
+ required: true
+ responses:
+ default:
+ description: Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/connect.error'
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ReviewRun'
/bytebase.v1.IssueService/ListIssueComments:
post:
tags:
@@ -3360,9 +3403,9 @@ paths:
Triggers a review run. The slot is reset unconditionally: a RUNNING
execution is superseded (its completion is fenced off), the attempt
number is bumped, and the returned run is AVAILABLE.
- Review results are not returned by this RPC and have no read RPC yet:
- findings will surface as issue comments once the review comment
- integration lands. The returned run carries execution status only.
+ Review results are not returned by this RPC: they are posted as issue
+ comments. The returned run carries execution status only, and
+ GetReviewRun reads it back.
The audit log is the only record of who triggered a run.
Permissions required: bb.reviewRuns.run
operationId: bytebase.v1.IssueService.RunReview
@@ -13990,6 +14033,19 @@ components:
required:
- name
additionalProperties: false
+ bytebase.v1.GetReviewRunRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the review run to retrieve.
+ Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun}
+ title: GetReviewRunRequest
+ required:
+ - name
+ additionalProperties: false
bytebase.v1.GetRevisionRequest:
type: object
properties:
diff --git a/backend/api/v1/audit_redact_inventory_test.go b/backend/api/v1/audit_redact_inventory_test.go
index cee30b5851..20d2ef1ded 100644
--- a/backend/api/v1/audit_redact_inventory_test.go
+++ b/backend/api/v1/audit_redact_inventory_test.go
@@ -511,6 +511,7 @@ var auditRecordedFields = []string{
"bytebase.v1.GetQueryHistoryRequest.name",
"bytebase.v1.GetReleaseRequest.name",
"bytebase.v1.GetReviewConfigRequest.name",
+ "bytebase.v1.GetReviewRunRequest.name",
"bytebase.v1.GetRevisionRequest.name",
"bytebase.v1.GetRoleRequest.name",
"bytebase.v1.GetRolloutRequest.name",
diff --git a/backend/api/v1/issue_service_review_run.go b/backend/api/v1/issue_service_review_run.go
index 29497e5025..35523c83a7 100644
--- a/backend/api/v1/issue_service_review_run.go
+++ b/backend/api/v1/issue_service_review_run.go
@@ -21,6 +21,27 @@ const (
reviewRunIDAI = "ai"
)
+// GetReviewRun returns the run in a review slot as stored.
+func (s *IssueService) GetReviewRun(ctx context.Context, req *connect.Request[v1pb.GetReviewRunRequest]) (*connect.Response[v1pb.ReviewRun], error) {
+ projectID, issueUID, reviewRunID, err := common.GetProjectIDIssueUIDReviewRunID(req.Msg.Name)
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInvalidArgument, err)
+ }
+ reviewType, ok := reviewRunTypeFromID(reviewRunID)
+ if !ok {
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("unknown reviewer type %q", reviewRunID))
+ }
+
+ reviewRun, err := s.store.GetReviewRun(ctx, projectID, issueUID, reviewType)
+ if err != nil {
+ return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to get review run"))
+ }
+ if reviewRun == nil {
+ return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("review run %q not found", req.Msg.Name))
+ }
+ return connect.NewResponse(convertToReviewRun(reviewRun)), nil
+}
+
// RunReview triggers a review run. The slot is reset unconditionally: a
// RUNNING execution is superseded, the attempt number is bumped, and the
// returned run is AVAILABLE.
diff --git a/backend/api/v1/issue_service_review_run_test.go b/backend/api/v1/issue_service_review_run_test.go
index 5aeaab496f..4ca35cf23d 100644
--- a/backend/api/v1/issue_service_review_run_test.go
+++ b/backend/api/v1/issue_service_review_run_test.go
@@ -1,12 +1,14 @@
package v1
import (
+ "context"
"fmt"
"testing"
"connectrpc.com/connect"
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/encoding/protojson"
+ "google.golang.org/protobuf/proto"
"github.com/bytebase/bytebase/backend/common"
storepb "github.com/bytebase/bytebase/backend/generated-go/store"
@@ -44,3 +46,138 @@ func TestRunReviewCreatesRuleRunWithReviewOff(t *testing.T) {
require.Equal(t, v1pb.ReviewRun_RULE, resp.Msg.Type)
require.Equal(t, v1pb.ReviewRun_AVAILABLE, resp.Msg.Status)
}
+
+func TestGetReviewRun(t *testing.T) {
+ t.Parallel()
+ ctx := issueServiceTestContext()
+ stores := setupIssueServiceTestStore(ctx, t)
+ issue := createReviewRunIssue(ctx, t, stores, "project-a")
+ service := newIssueServiceForTest(t, stores)
+ ruleName := fmt.Sprintf("projects/project-a/issues/%d/reviewRuns/rule", issue.UID)
+
+ _, err := getReviewRunForTest(ctx, service, ruleName)
+ require.Equal(t, connect.CodeNotFound, connect.CodeOf(err), "a run that never started")
+
+ run, err := service.RunReview(ctx, connect.NewRequest(&v1pb.RunReviewRequest{Name: ruleName}))
+ require.NoError(t, err)
+ got, err := getReviewRunForTest(ctx, service, ruleName)
+ require.NoError(t, err)
+ require.True(t, proto.Equal(run.Msg, got), "got %v, want %v", got, run.Msg)
+
+ claimed, err := stores.ClaimAvailableReviewRuns(ctx, "replica-1")
+ require.NoError(t, err)
+ require.Len(t, claimed, 1)
+ updated, err := stores.CompleteReviewRun(ctx, claimed[0], "replica-1", storepb.ReviewRun_FAILED, &storepb.ReviewRunPayload{Error: "boom"}, nil)
+ require.NoError(t, err)
+ require.True(t, updated)
+ got, err = getReviewRunForTest(ctx, service, ruleName)
+ require.NoError(t, err)
+ require.Equal(t, ruleName, got.Name)
+ require.Equal(t, v1pb.ReviewRun_RULE, got.Type)
+ require.Equal(t, v1pb.ReviewRun_FAILED, got.Status)
+ require.Equal(t, "boom", got.Error)
+ require.True(t, proto.Equal(run.Msg.CreateTime, got.CreateTime))
+ require.NotNil(t, got.EndTime)
+
+ for _, tc := range []struct {
+ description string
+ name string
+ wantCode connect.Code
+ }{
+ {"slot never created", fmt.Sprintf("projects/project-a/issues/%d/reviewRuns/ai", issue.UID), connect.CodeNotFound},
+ {"issue does not exist", "projects/project-a/issues/999/reviewRuns/rule", connect.CodeNotFound},
+ {"unknown reviewer", fmt.Sprintf("projects/project-a/issues/%d/reviewRuns/guideline", issue.UID), connect.CodeInvalidArgument},
+ {"issue id not a number", "projects/project-a/issues/abc/reviewRuns/rule", connect.CodeInvalidArgument},
+ } {
+ _, err := getReviewRunForTest(ctx, service, tc.name)
+ require.Equal(t, tc.wantCode, connect.CodeOf(err), tc.description)
+ }
+}
+
+func TestGetReviewRunCollidingIssues(t *testing.T) {
+ t.Parallel()
+ ctx := issueServiceTestContext()
+ stores := setupIssueServiceTestStore(ctx, t)
+ _, err := stores.GetDB().ExecContext(ctx, `INSERT INTO project (resource_id, workspace, name) VALUES ('project-b', 'default', 'Project B')`)
+ require.NoError(t, err)
+ issueA := createReviewRunIssue(ctx, t, stores, "project-a")
+ issueB := createReviewRunIssue(ctx, t, stores, "project-b")
+ require.Equal(t, issueA.UID, issueB.UID, "the issue ids must collide")
+ service := newIssueServiceForTest(t, stores)
+ nameA := fmt.Sprintf("projects/project-a/issues/%d/reviewRuns/rule", issueA.UID)
+ nameB := fmt.Sprintf("projects/project-b/issues/%d/reviewRuns/rule", issueB.UID)
+
+ runB, err := service.RunReview(ctx, connect.NewRequest(&v1pb.RunReviewRequest{Name: nameB}))
+ require.NoError(t, err)
+ _, err = getReviewRunForTest(ctx, service, nameA)
+ require.Equal(t, connect.CodeNotFound, connect.CodeOf(err), "project B's run is not project A's")
+
+ // A fails while B stays RUNNING.
+ _, err = service.RunReview(ctx, connect.NewRequest(&v1pb.RunReviewRequest{Name: nameA}))
+ require.NoError(t, err)
+ claimed, err := stores.ClaimAvailableReviewRuns(ctx, "replica-1")
+ require.NoError(t, err)
+ require.Len(t, claimed, 2)
+ for _, c := range claimed {
+ if c.ProjectID != "project-a" {
+ continue
+ }
+ updated, err := stores.CompleteReviewRun(ctx, c, "replica-1", storepb.ReviewRun_FAILED, &storepb.ReviewRunPayload{Error: "boom"}, nil)
+ require.NoError(t, err)
+ require.True(t, updated)
+ }
+
+ gotA, err := getReviewRunForTest(ctx, service, nameA)
+ require.NoError(t, err)
+ require.Equal(t, nameA, gotA.Name)
+ require.Equal(t, v1pb.ReviewRun_FAILED, gotA.Status)
+ require.Equal(t, "boom", gotA.Error)
+ gotB, err := getReviewRunForTest(ctx, service, nameB)
+ require.NoError(t, err)
+ require.Equal(t, nameB, gotB.Name)
+ require.Equal(t, v1pb.ReviewRun_RUNNING, gotB.Status)
+ require.Empty(t, gotB.Error)
+ require.Nil(t, gotB.EndTime)
+ require.True(t, proto.Equal(runB.Msg.CreateTime, gotB.CreateTime))
+}
+
+func getReviewRunForTest(ctx context.Context, service *IssueService, name string) (*v1pb.ReviewRun, error) {
+ resp, err := service.GetReviewRun(ctx, connect.NewRequest(&v1pb.GetReviewRunRequest{Name: name}))
+ if err != nil {
+ return nil, err
+ }
+ return resp.Msg, nil
+}
+
+// createReviewRunIssue creates an open issue whose plan has one reviewable
+// spec.
+func createReviewRunIssue(ctx context.Context, t *testing.T, stores *store.Store, projectID string) *store.IssueMessage {
+ t.Helper()
+ plan, err := stores.CreatePlan(ctx, &store.PlanMessage{
+ ProjectID: projectID,
+ Name: "plan",
+ Config: &storepb.PlanConfig{
+ Specs: []*storepb.PlanConfig_Spec{
+ {
+ Id: "spec-1",
+ Config: &storepb.PlanConfig_Spec_ChangeDatabaseConfig{
+ ChangeDatabaseConfig: &storepb.PlanConfig_ChangeDatabaseConfig{
+ Targets: []string{"instances/prod/databases/app"},
+ },
+ },
+ },
+ },
+ },
+ require.NoError(t, err)
+ issue, err := stores.CreateIssue(ctx, &store.IssueMessage{
+ ProjectID: projectID,
+ CreatorEmail: "[email protected]",
+ Title: "issue",
+ Type: storepb.Issue_DATABASE_CHANGE,
+ Payload: &storepb.Issue{},
+ PlanUID: &plan.UID,
+ })
+ require.NoError(t, err)
+ return issue
+}
diff --git a/backend/api/v1/testdata/mcp_method_classification.md b/backend/api/v1/testdata/mcp_method_classification.md
index 809a17672b..a6f0d7c38a 100644
--- a/backend/api/v1/testdata/mcp_method_classification.md
+++ b/backend/api/v1/testdata/mcp_method_classification.md
@@ -16,12 +16,12 @@ served by no ceiling.
| Class | Methods | Meaning |
|---|---|---|
-| READ | 56 | served to a read-only session and above |
+| READ | 57 | served to a read-only session and above |
| WRITE | 37 | served to a read-write session only |
| EXCLUDED | 89 | served by no ceiling this phase ships |
| FORBIDDEN | 36 | never served, whatever the ceiling |
| MCP_METHOD_CLASS_UNSPECIFIED | 0 | unclassified — CI rejects this, and the gate refuses it |
-| **total** | **218** | |
+| **total** | **219** | |
| Method | Class | Reason | Permission |
|---|---|---|---|
@@ -101,6 +101,7 @@ served by no ceiling.
| IssueService/CreateIssue | WRITE | — | bb.issues.create |
| IssueService/CreateIssueComment | WRITE | — | bb.issueComments.create |
| IssueService/GetIssue | READ | — | bb.issues.get |
+| IssueService/GetReviewRun | READ | — | bb.reviewRuns.get |
| IssueService/ListIssueComments | READ | — | bb.issueComments.list |
| IssueService/ListIssues | READ | — | bb.issues.list |
| IssueService/RejectIssue | FORBIDDEN | DRIVES_THE_APPROVAL_DECISION | — |
diff --git a/backend/common/permission/permission.go b/backend/common/permission/permission.go
index c037321621..c87e4297ca 100644
--- a/backend/common/permission/permission.go
+++ b/backend/common/permission/permission.go
@@ -96,6 +96,7 @@ const (
ReviewConfigsGet Permission = "bb.reviewConfigs.get"
ReviewConfigsList Permission = "bb.reviewConfigs.list"
ReviewConfigsUpdate Permission = "bb.reviewConfigs.update"
+ ReviewRunsGet Permission = "bb.reviewRuns.get"
ReviewRunsRun Permission = "bb.reviewRuns.run"
RevisionsCreate Permission = "bb.revisions.create"
RevisionsDelete Permission = "bb.revisions.delete"
diff --git a/backend/common/permission/permission.yaml b/backend/common/permission/permission.yaml
index befed0e857..d25a358c40 100644
--- a/backend/common/permission/permission.yaml
+++ b/backend/common/permission/permission.yaml
@@ -88,6 +88,7 @@ permissions:
- bb.reviewConfigs.get
- bb.reviewConfigs.list
- bb.reviewConfigs.update
+ - bb.reviewRuns.get
- bb.reviewRuns.run
- bb.revisions.create
- bb.revisions.delete
diff --git a/backend/generated-go/v1/issue_service.pb.go b/backend/generated-go/v1/issue_service.pb.go
index ccf411274e..f355f831a9 100644
--- a/backend/generated-go/v1/issue_service.pb.go
+++ b/backend/generated-go/v1/issue_service.pb.go
@@ -2286,6 +2286,52 @@ func (x *ReviewRun) GetError() string {
return ""
}
+type GetReviewRunRequest struct {
+ state protoimpl.MessageState `protogen:"open.v1"`
+ // The name of the review run to retrieve.
+ // Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun}
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
+}
+
+func (x *GetReviewRunRequest) Reset() {
+ *x = GetReviewRunRequest{}
+ mi := &file_v1_issue_service_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+}
+
+func (x *GetReviewRunRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetReviewRunRequest) ProtoMessage() {}
+
+func (x *GetReviewRunRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_v1_issue_service_proto_msgTypes[24]
+ if x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetReviewRunRequest.ProtoReflect.Descriptor instead.
+func (*GetReviewRunRequest) Descriptor() ([]byte, []int) {
+ return file_v1_issue_service_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *GetReviewRunRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
type RunReviewRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun}
@@ -2296,7 +2342,7 @@ type RunReviewRequest struct {
func (x *RunReviewRequest) Reset() {
*x = RunReviewRequest{}
- mi := &file_v1_issue_service_proto_msgTypes[24]
+ mi := &file_v1_issue_service_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2308,7 +2354,7 @@ func (x *RunReviewRequest) String() string {
func (*RunReviewRequest) ProtoMessage() {}
func (x *RunReviewRequest) ProtoReflect() protoreflect.Message {
- mi := &file_v1_issue_service_proto_msgTypes[24]
+ mi := &file_v1_issue_service_proto_msgTypes[25]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2321,7 +2367,7 @@ func (x *RunReviewRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use RunReviewRequest.ProtoReflect.Descriptor instead.
func (*RunReviewRequest) Descriptor() ([]byte, []int) {
- return file_v1_issue_service_proto_rawDescGZIP(), []int{24}
+ return file_v1_issue_service_proto_rawDescGZIP(), []int{25}
}
func (x *RunReviewRequest) GetName() string {
@@ -2344,7 +2390,7 @@ type Issue_Approver struct {
func (x *Issue_Approver) Reset() {
*x = Issue_Approver{}
- mi := &file_v1_issue_service_proto_msgTypes[25]
+ mi := &file_v1_issue_service_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2356,7 +2402,7 @@ func (x *Issue_Approver) String() string {
func (*Issue_Approver) ProtoMessage() {}
func (x *Issue_Approver) ProtoReflect() protoreflect.Message {
- mi := &file_v1_issue_service_proto_msgTypes[25]
+ mi := &file_v1_issue_service_proto_msgTypes[26]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2403,7 +2449,7 @@ type IssueComment_ReviewMetadata struct {
func (x *IssueComment_ReviewMetadata) Reset() {
*x = IssueComment_ReviewMetadata{}
- mi := &file_v1_issue_service_proto_msgTypes[26]
+ mi := &file_v1_issue_service_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2415,7 +2461,7 @@ func (x *IssueComment_ReviewMetadata) String() string {
func (*IssueComment_ReviewMetadata) ProtoMessage() {}
func (x *IssueComment_ReviewMetadata) ProtoReflect() protoreflect.Message {
- mi := &file_v1_issue_service_proto_msgTypes[26]
+ mi := &file_v1_issue_service_proto_msgTypes[27]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2470,7 +2516,7 @@ type IssueComment_Approval struct {
func (x *IssueComment_Approval) Reset() {
*x = IssueComment_Approval{}
- mi := &file_v1_issue_service_proto_msgTypes[27]
+ mi := &file_v1_issue_service_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2482,7 +2528,7 @@ func (x *IssueComment_Approval) String() string {
func (*IssueComment_Approval) ProtoMessage() {}
func (x *IssueComment_Approval) ProtoReflect() protoreflect.Message {
- mi := &file_v1_issue_service_proto_msgTypes[27]
+ mi := &file_v1_issue_service_proto_msgTypes[28]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2522,7 +2568,7 @@ type IssueComment_IssueUpdate struct {
func (x *IssueComment_IssueUpdate) Reset() {
*x = IssueComment_IssueUpdate{}
- mi := &file_v1_issue_service_proto_msgTypes[28]
+ mi := &file_v1_issue_service_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2534,7 +2580,7 @@ func (x *IssueComment_IssueUpdate) String() string {
func (*IssueComment_IssueUpdate) ProtoMessage() {}
func (x *IssueComment_IssueUpdate) ProtoReflect() protoreflect.Message {
- mi := &file_v1_issue_service_proto_msgTypes[28]
+ mi := &file_v1_issue_service_proto_msgTypes[29]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2615,7 +2661,7 @@ type IssueComment_ReviewSubmission struct {
func (x *IssueComment_ReviewSubmission) Reset() {
*x = IssueComment_ReviewSubmission{}
- mi := &file_v1_issue_service_proto_msgTypes[29]
+ mi := &file_v1_issue_service_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2627,7 +2673,7 @@ func (x *IssueComment_ReviewSubmission) String() string {
func (*IssueComment_ReviewSubmission) ProtoMessage() {}
func (x *IssueComment_ReviewSubmission) ProtoReflect() protoreflect.Message {
- mi := &file_v1_issue_service_proto_msgTypes[29]
+ mi := &file_v1_issue_service_proto_msgTypes[30]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2655,7 +2701,7 @@ type IssueComment_PlanUpdate struct {
func (x *IssueComment_PlanUpdate) Reset() {
*x = IssueComment_PlanUpdate{}
- mi := &file_v1_issue_service_proto_msgTypes[30]
+ mi := &file_v1_issue_service_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -2667,7 +2713,7 @@ func (x *IssueComment_PlanUpdate) String() string {
func (*IssueComment_PlanUpdate) ProtoMessage() {}
func (x *IssueComment_PlanUpdate) ProtoReflect() protoreflect.Message {
- mi := &file_v1_issue_service_proto_msgTypes[30]
+ mi := &file_v1_issue_service_proto_msgTypes[31]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -2925,10 +2971,13 @@ const file_v1_issue_service_proto_rawDesc = "" +
"\x04DONE\x10\x03\x12\n" +
"\n" +
"\x06FAILED\x10\x04:U\xeaAR\n" +
- "\x16bytebase.com/ReviewRun\x128projects/{project}/issues/{issue}/reviewRuns/{reviewRun}\"F\n" +
+ "\x16bytebase.com/ReviewRun\x128projects/{project}/issues/{issue}/reviewRuns/{reviewRun}\"I\n" +
+ "\x13GetReviewRunRequest\x122\n" +
+ "\x04name\x18\x01 \x01(\tB\x1e\xe0A\x02\xfaA\x18\n" +
+ "\x16bytebase.com/ReviewRunR\x04name\"F\n" +
"\x10RunReviewRequest\x122\n" +
"\x04name\x18\x01 \x01(\tB\x1e\xe0A\x02\xfaA\x18\n" +
- "\x16bytebase.com/ReviewRunR\x04name2\xd8\x12\n" +
+ "\x16bytebase.com/ReviewRunR\x04name2\xfc\x13\n" +
"\fIssueService\x12\x84\x01\n" +
"\bGetIssue\x12\x1c.bytebase.v1.GetIssueRequest\x1a\x12.bytebase.v1.Issue\"F\xdaA\x04name\x8a\xea0\rbb.issues.get\x90\xea0\x01\xa0\xea0\x01\x82\xd3\xe4\x93\x02 \x12\x1e/v1/{name=projects/*/issues/*}\x12\xa0\x01\n" +
"\vCreateIssue\x12\x1f.bytebase.v1.CreateIssueRequest\x1a\x12.bytebase.v1.Issue\"\\\xdaA\fparent,issue\x8a\xea0\x10bb.issues.create\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x02\x82\xd3\xe4\x93\x02':\x05issue\"\x1e/v1/{parent=projects/*}/issues\x12\x98\x01\n" +
@@ -2943,7 +2992,8 @@ const file_v1_issue_service_proto_rawDesc = "" +
"\fApproveIssue\x12 .bytebase.v1.ApproveIssueRequest\x1a\x12.bytebase.v1.Issue\"A\x90\xea0\x02\x98\xea0\x01\xa0\xea0\x03\xa8\xea0\b\x82\xd3\xe4\x93\x02+:\x01*\"&/v1/{name=projects/*/issues/*}:approve\x12\x84\x01\n" +
"\vRejectIssue\x12\x1f.bytebase.v1.RejectIssueRequest\x1a\x12.bytebase.v1.Issue\"@\x90\xea0\x02\x98\xea0\x01\xa0\xea0\x03\xa8\xea0\b\x82\xd3\xe4\x93\x02*:\x01*\"%/v1/{name=projects/*/issues/*}:reject\x12\x83\x01\n" +
"\fRequestIssue\x12 .bytebase.v1.RequestIssueRequest\x1a\x12.bytebase.v1.Issue\"=\x90\xea0\x02\x98\xea0\x01\xa0\xea0\x02\x82\xd3\xe4\x93\x02+:\x01*\"&/v1/{name=projects/*/issues/*}:request\x12\x99\x01\n" +
- "\x12RetryIssueApproval\x12&.bytebase.v1.RetryIssueApprovalRequest\x1a\x12.bytebase.v1.Issue\"G\x90\xea0\x02\x98\xea0\x01\xa0\xea0\x03\xa8\xea0\b\x82\xd3\xe4\x93\x021:\x01*\",/v1/{name=projects/*/issues/*}:retryApproval\x12\xa6\x01\n" +
+ "\x12RetryIssueApproval\x12&.bytebase.v1.RetryIssueApprovalRequest\x1a\x12.bytebase.v1.Issue\"G\x90\xea0\x02\x98\xea0\x01\xa0\xea0\x03\xa8\xea0\b\x82\xd3\xe4\x93\x021:\x01*\",/v1/{name=projects/*/issues/*}:retryApproval\x12\xa1\x01\n" +
+ "\fGetReviewRun\x12 .bytebase.v1.GetReviewRunRequest\x1a\x16.bytebase.v1.ReviewRun\"W\xdaA\x04name\x8a\xea0\x11bb.reviewRuns.get\x90\xea0\x01\xa0\xea0\x01\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/issues/*/reviewRuns/*}\x12\xa6\x01\n" +
"\tRunReview\x12\x1d.bytebase.v1.RunReviewRequest\x1a\x16.bytebase.v1.ReviewRun\"b\xdaA\x04name\x8a\xea0\x11bb.reviewRuns.run\x90\xea0\x01\x98\xea0\x01\xa0\xea0\x02\x82\xd3\xe4\x93\x024:\x01*\"//v1/{name=projects/*/issues/*/reviewRuns/*}:runB\xa7\x01\n" +
"\x0fcom.bytebase.v1B\x11IssueServiceProtoP\x01Z4github.com/bytebase/bytebase/backend/generated-go/v1\xa2\x02\x03BXX\xaa\x02\vBytebase.V1\xca\x02\vBytebase\\V1\xe2\x02\x17Bytebase\\V1\\GPBMetadata\xea\x02\fBytebase::V1b\x06proto3"
@@ -2960,7 +3010,7 @@ func file_v1_issue_service_proto_rawDescGZIP() []byte {
}
var file_v1_issue_service_proto_enumTypes = make([]protoimpl.EnumInfo, 7)
-var file_v1_issue_service_proto_msgTypes = make([]protoimpl.MessageInfo, 31)
+var file_v1_issue_service_proto_msgTypes = make([]protoimpl.MessageInfo, 32)
var file_v1_issue_service_proto_goTypes = []any{
(Issue_Type)(0), // 0: bytebase.v1.Issue.Type
(Issue_Approver_Status)(0), // 1: bytebase.v1.Issue.Approver.Status
@@ -2993,71 +3043,72 @@ var file_v1_issue_service_proto_goTypes = []any{
(*IssueComment)(nil), // 28: bytebase.v1.IssueComment
(*StatementAnchor)(nil), // 29: bytebase.v1.StatementAnchor
(*ReviewRun)(nil), // 30: bytebase.v1.ReviewRun
- (*RunReviewRequest)(nil), // 31: bytebase.v1.RunReviewRequest
- (*Issue_Approver)(nil), // 32: bytebase.v1.Issue.Approver
- (*IssueComment_ReviewMetadata)(nil), // 33: bytebase.v1.IssueComment.ReviewMetadata
- (*IssueComment_Approval)(nil), // 34: bytebase.v1.IssueComment.Approval
- (*IssueComment_IssueUpdate)(nil), // 35: bytebase.v1.IssueComment.IssueUpdate
- (*IssueComment_ReviewSubmission)(nil), // 36: bytebase.v1.IssueComment.ReviewSubmission
- (*IssueComment_PlanUpdate)(nil), // 37: bytebase.v1.IssueComment.PlanUpdate
- (*fieldmaskpb.FieldMask)(nil), // 38: google.protobuf.FieldMask
- (IssueStatus)(0), // 39: bytebase.v1.IssueStatus
- (*timestamppb.Timestamp)(nil), // 40: google.protobuf.Timestamp
- (RiskLevel)(0), // 41: bytebase.v1.RiskLevel
- (ApprovalStatus)(0), // 42: bytebase.v1.ApprovalStatus
- (*expr.Expr)(nil), // 43: google.type.Expr
- (*durationpb.Duration)(nil), // 44: google.protobuf.Duration
- (*Position)(nil), // 45: bytebase.v1.Position
- (ReviewRuleType)(0), // 46: bytebase.v1.ReviewRuleType
- (*Plan_Spec)(nil), // 47: bytebase.v1.Plan.Spec
+ (*GetReviewRunRequest)(nil), // 31: bytebase.v1.GetReviewRunRequest
+ (*RunReviewRequest)(nil), // 32: bytebase.v1.RunReviewRequest
+ (*Issue_Approver)(nil), // 33: bytebase.v1.Issue.Approver
+ (*IssueComment_ReviewMetadata)(nil), // 34: bytebase.v1.IssueComment.ReviewMetadata
+ (*IssueComment_Approval)(nil), // 35: bytebase.v1.IssueComment.Approval
+ (*IssueComment_IssueUpdate)(nil), // 36: bytebase.v1.IssueComment.IssueUpdate
+ (*IssueComment_ReviewSubmission)(nil), // 37: bytebase.v1.IssueComment.ReviewSubmission
+ (*IssueComment_PlanUpdate)(nil), // 38: bytebase.v1.IssueComment.PlanUpdate
+ (*fieldmaskpb.FieldMask)(nil), // 39: google.protobuf.FieldMask
+ (IssueStatus)(0), // 40: bytebase.v1.IssueStatus
+ (*timestamppb.Timestamp)(nil), // 41: google.protobuf.Timestamp
+ (RiskLevel)(0), // 42: bytebase.v1.RiskLevel
+ (ApprovalStatus)(0), // 43: bytebase.v1.ApprovalStatus
+ (*expr.Expr)(nil), // 44: google.type.Expr
+ (*durationpb.Duration)(nil), // 45: google.protobuf.Duration
+ (*Position)(nil), // 46: bytebase.v1.Position
+ (ReviewRuleType)(0), // 47: bytebase.v1.ReviewRuleType
+ (*Plan_Spec)(nil), // 48: bytebase.v1.Plan.Spec
}
var file_v1_issue_service_proto_depIdxs = []int32{
20, // 0: bytebase.v1.CreateIssueRequest.issue:type_name -> bytebase.v1.Issue
20, // 1: bytebase.v1.ListIssuesResponse.issues:type_name -> bytebase.v1.Issue
20, // 2: bytebase.v1.SearchIssuesResponse.issues:type_name -> bytebase.v1.Issue
20, // 3: bytebase.v1.UpdateIssueRequest.issue:type_name -> bytebase.v1.Issue
- 38, // 4: bytebase.v1.UpdateIssueRequest.update_mask:type_name -> google.protobuf.FieldMask
- 39, // 5: bytebase.v1.BatchUpdateIssuesStatusRequest.status:type_name -> bytebase.v1.IssueStatus
+ 39, // 4: bytebase.v1.UpdateIssueRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 40, // 5: bytebase.v1.BatchUpdateIssuesStatusRequest.status:type_name -> bytebase.v1.IssueStatus
0, // 6: bytebase.v1.Issue.type:type_name -> bytebase.v1.Issue.Type
- 39, // 7: bytebase.v1.Issue.status:type_name -> bytebase.v1.IssueStatus
- 32, // 8: bytebase.v1.Issue.approvers:type_name -> bytebase.v1.Issue.Approver
+ 40, // 7: bytebase.v1.Issue.status:type_name -> bytebase.v1.IssueStatus
+ 33, // 8: bytebase.v1.Issue.approvers:type_name -> bytebase.v1.Issue.Approver
22, // 9: bytebase.v1.Issue.approval_template:type_name -> bytebase.v1.ApprovalTemplate
- 40, // 10: bytebase.v1.Issue.create_time:type_name -> google.protobuf.Timestamp
- 40, // 11: bytebase.v1.Issue.update_time:type_name -> google.protobuf.Timestamp
+ 41, // 10: bytebase.v1.Issue.create_time:type_name -> google.protobuf.Timestamp
+ 41, // 11: bytebase.v1.Issue.update_time:type_name -> google.protobuf.Timestamp
21, // 12: bytebase.v1.Issue.role_grant:type_name -> bytebase.v1.RoleGrant
- 41, // 13: bytebase.v1.Issue.risk_level:type_name -> bytebase.v1.RiskLevel
- 42, // 14: bytebase.v1.Issue.approval_status:type_name -> bytebase.v1.ApprovalStatus
- 43, // 15: bytebase.v1.RoleGrant.condition:type_name -> google.type.Expr
- 44, // 16: bytebase.v1.RoleGrant.expiration:type_name -> google.protobuf.Duration
+ 42, // 13: bytebase.v1.Issue.risk_level:type_name -> bytebase.v1.RiskLevel
+ 43, // 14: bytebase.v1.Issue.approval_status:type_name -> bytebase.v1.ApprovalStatus
+ 44, // 15: bytebase.v1.RoleGrant.condition:type_name -> google.type.Expr
+ 45, // 16: bytebase.v1.RoleGrant.expiration:type_name -> google.protobuf.Duration
23, // 17: bytebase.v1.ApprovalTemplate.flow:type_name -> bytebase.v1.ApprovalFlow
28, // 18: bytebase.v1.ListIssueCommentsResponse.issue_comments:type_name -> bytebase.v1.IssueComment
28, // 19: bytebase.v1.CreateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment
28, // 20: bytebase.v1.UpdateIssueCommentRequest.issue_comment:type_name -> bytebase.v1.IssueComment
- 38, // 21: bytebase.v1.UpdateIssueCommentRequest.update_mask:type_name -> google.protobuf.FieldMask
- 40, // 22: bytebase.v1.IssueComment.create_time:type_name -> google.protobuf.Timestamp
- 40, // 23: bytebase.v1.IssueComment.update_time:type_name -> google.protobuf.Timestamp
+ 39, // 21: bytebase.v1.UpdateIssueCommentRequest.update_mask:type_name -> google.protobuf.FieldMask
+ 41, // 22: bytebase.v1.IssueComment.create_time:type_name -> google.protobuf.Timestamp
+ 41, // 23: bytebase.v1.IssueComment.update_time:type_name -> google.protobuf.Timestamp
2, // 24: bytebase.v1.IssueComment.thread_state:type_name -> bytebase.v1.IssueComment.ThreadState
29, // 25: bytebase.v1.IssueComment.statement_anchor:type_name -> bytebase.v1.StatementAnchor
- 33, // 26: bytebase.v1.IssueComment.review_metadata:type_name -> bytebase.v1.IssueComment.ReviewMetadata
- 34, // 27: bytebase.v1.IssueComment.approval:type_name -> bytebase.v1.IssueComment.Approval
- 35, // 28: bytebase.v1.IssueComment.issue_update:type_name -> bytebase.v1.IssueComment.IssueUpdate
- 37, // 29: bytebase.v1.IssueComment.plan_update:type_name -> bytebase.v1.IssueComment.PlanUpdate
- 36, // 30: bytebase.v1.IssueComment.review_submission:type_name -> bytebase.v1.IssueComment.ReviewSubmission
- 45, // 31: bytebase.v1.StatementAnchor.start_position:type_name -> bytebase.v1.Position
- 45, // 32: bytebase.v1.StatementAnchor.end_position:type_name -> bytebase.v1.Position
+ 34, // 26: bytebase.v1.IssueComment.review_metadata:type_name -> bytebase.v1.IssueComment.ReviewMetadata
+ 35, // 27: bytebase.v1.IssueComment.approval:type_name -> bytebase.v1.IssueComment.Approval
+ 36, // 28: bytebase.v1.IssueComment.issue_update:type_name -> bytebase.v1.IssueComment.IssueUpdate
+ 38, // 29: bytebase.v1.IssueComment.plan_update:type_name -> bytebase.v1.IssueComment.PlanUpdate
+ 37, // 30: bytebase.v1.IssueComment.review_submission:type_name -> bytebase.v1.IssueComment.ReviewSubmission
+ 46, // 31: bytebase.v1.StatementAnchor.start_position:type_name -> bytebase.v1.Position
+ 46, // 32: bytebase.v1.StatementAnchor.end_position:type_name -> bytebase.v1.Position
5, // 33: bytebase.v1.ReviewRun.type:type_name -> bytebase.v1.ReviewRun.Type
6, // 34: bytebase.v1.ReviewRun.status:type_name -> bytebase.v1.ReviewRun.Status
- 40, // 35: bytebase.v1.ReviewRun.create_time:type_name -> google.protobuf.Timestamp
- 40, // 36: bytebase.v1.ReviewRun.end_time:type_name -> google.protobuf.Timestamp
+ 41, // 35: bytebase.v1.ReviewRun.create_time:type_name -> google.protobuf.Timestamp
+ 41, // 36: bytebase.v1.ReviewRun.end_time:type_name -> google.protobuf.Timestamp
1, // 37: bytebase.v1.Issue.Approver.status:type_name -> bytebase.v1.Issue.Approver.Status
5, // 38: bytebase.v1.IssueComment.ReviewMetadata.run_type:type_name -> bytebase.v1.ReviewRun.Type
- 46, // 39: bytebase.v1.IssueComment.ReviewMetadata.rule_type:type_name -> bytebase.v1.ReviewRuleType
+ 47, // 39: bytebase.v1.IssueComment.ReviewMetadata.rule_type:type_name -> bytebase.v1.ReviewRuleType
3, // 40: bytebase.v1.IssueComment.ReviewMetadata.priority:type_name -> bytebase.v1.IssueComment.ReviewMetadata.Priority
4, // 41: bytebase.v1.IssueComment.Approval.status:type_name -> bytebase.v1.IssueComment.Approval.Status
- 39, // 42: bytebase.v1.IssueComment.IssueUpdate.from_status:type_name -> bytebase.v1.IssueStatus
- 39, // 43: bytebase.v1.IssueComment.IssueUpdate.to_status:type_name -> bytebase.v1.IssueStatus
- 47, // 44: bytebase.v1.IssueComment.PlanUpdate.from_specs:type_name -> bytebase.v1.Plan.Spec
- 47, // 45: bytebase.v1.IssueComment.PlanUpdate.to_specs:type_name -> bytebase.v1.Plan.Spec
+ 40, // 42: bytebase.v1.IssueComment.IssueUpdate.from_status:type_name -> bytebase.v1.IssueStatus
+ 40, // 43: bytebase.v1.IssueComment.IssueUpdate.to_status:type_name -> bytebase.v1.IssueStatus
+ 48, // 44: bytebase.v1.IssueComment.PlanUpdate.from_specs:type_name -> bytebase.v1.Plan.Spec
+ 48, // 45: bytebase.v1.IssueComment.PlanUpdate.to_specs:type_name -> bytebase.v1.Plan.Spec
7, // 46: bytebase.v1.IssueService.GetIssue:input_type -> bytebase.v1.GetIssueRequest
8, // 47: bytebase.v1.IssueService.CreateIssue:input_type -> bytebase.v1.CreateIssueRequest
9, // 48: bytebase.v1.IssueService.ListIssues:input_type -> bytebase.v1.ListIssuesRequest
@@ -3071,23 +3122,25 @@ var file_v1_issue_service_proto_depIdxs = []int32{
17, // 56: bytebase.v1.IssueService.RejectIssue:input_type -> bytebase.v1.RejectIssueRequest
18, // 57: bytebase.v1.IssueService.RequestIssue:input_type -> bytebase.v1.RequestIssueRequest
19, // 58: bytebase.v1.IssueService.RetryIssueApproval:input_type -> bytebase.v1.RetryIssueApprovalRequest
- 31, // 59: bytebase.v1.IssueService.RunReview:input_type -> bytebase.v1.RunReviewRequest
- 20, // 60: bytebase.v1.IssueService.GetIssue:output_type -> bytebase.v1.Issue
- 20, // 61: bytebase.v1.IssueService.CreateIssue:output_type -> bytebase.v1.Issue
- 10, // 62: bytebase.v1.IssueService.ListIssues:output_type -> bytebase.v1.ListIssuesResponse
- 12, // 63: bytebase.v1.IssueService.SearchIssues:output_type -> bytebase.v1.SearchIssuesResponse
- 20, // 64: bytebase.v1.IssueService.UpdateIssue:output_type -> bytebase.v1.Issue
- 25, // 65: bytebase.v1.IssueService.ListIssueComments:output_type -> bytebase.v1.ListIssueCommentsResponse
- 28, // 66: bytebase.v1.IssueService.CreateIssueComment:output_type -> bytebase.v1.IssueComment
- 28, // 67: bytebase.v1.IssueService.UpdateIssueComment:output_type -> bytebase.v1.IssueComment
- 15, // 68: bytebase.v1.IssueService.BatchUpdateIssuesStatus:output_type -> bytebase.v1.BatchUpdateIssuesStatusResponse
- 20, // 69: bytebase.v1.IssueService.ApproveIssue:output_type -> bytebase.v1.Issue
- 20, // 70: bytebase.v1.IssueService.RejectIssue:output_type -> bytebase.v1.Issue
- 20, // 71: bytebase.v1.IssueService.RequestIssue:output_type -> bytebase.v1.Issue
- 20, // 72: bytebase.v1.IssueService.RetryIssueApproval:output_type -> bytebase.v1.Issue
- 30, // 73: bytebase.v1.IssueService.RunReview:output_type -> bytebase.v1.ReviewRun
- 60, // [60:74] is the sub-list for method output_type
- 46, // [46:60] is the sub-list for method input_type
+ 31, // 59: bytebase.v1.IssueService.GetReviewRun:input_type -> bytebase.v1.GetReviewRunRequest
+ 32, // 60: bytebase.v1.IssueService.RunReview:input_type -> bytebase.v1.RunReviewRequest
+ 20, // 61: bytebase.v1.IssueService.GetIssue:output_type -> bytebase.v1.Issue
+ 20, // 62: bytebase.v1.IssueService.CreateIssue:output_type -> bytebase.v1.Issue
+ 10, // 63: bytebase.v1.IssueService.ListIssues:output_type -> bytebase.v1.ListIssuesResponse
+ 12, // 64: bytebase.v1.IssueService.SearchIssues:output_type -> bytebase.v1.SearchIssuesResponse
+ 20, // 65: bytebase.v1.IssueService.UpdateIssue:output_type -> bytebase.v1.Issue
+ 25, // 66: bytebase.v1.IssueService.ListIssueComments:output_type -> bytebase.v1.ListIssueCommentsResponse
+ 28, // 67: bytebase.v1.IssueService.CreateIssueComment:output_type -> bytebase.v1.IssueComment
+ 28, // 68: bytebase.v1.IssueService.UpdateIssueComment:output_type -> bytebase.v1.IssueComment
+ 15, // 69: bytebase.v1.IssueService.BatchUpdateIssuesStatus:output_type -> bytebase.v1.BatchUpdateIssuesStatusResponse
+ 20, // 70: bytebase.v1.IssueService.ApproveIssue:output_type -> bytebase.v1.Issue
+ 20, // 71: bytebase.v1.IssueService.RejectIssue:output_type -> bytebase.v1.Issue
+ 20, // 72: bytebase.v1.IssueService.RequestIssue:output_type -> bytebase.v1.Issue
+ 20, // 73: bytebase.v1.IssueService.RetryIssueApproval:output_type -> bytebase.v1.Issue
+ 30, // 74: bytebase.v1.IssueService.GetReviewRun:output_type -> bytebase.v1.ReviewRun
+ 30, // 75: bytebase.v1.IssueService.RunReview:output_type -> bytebase.v1.ReviewRun
+ 61, // [61:76] is the sub-list for method output_type
+ 46, // [46:61] is the sub-list for method input_type
46, // [46:46] is the sub-list for extension type_name
46, // [46:46] is the sub-list for extension extendee
0, // [0:46] is the sub-list for field type_name
@@ -3108,14 +3161,14 @@ func file_v1_issue_service_proto_init() {
(*IssueComment_PlanUpdate_)(nil),
(*IssueComment_ReviewSubmission_)(nil),
}
- file_v1_issue_service_proto_msgTypes[28].OneofWrappers = []any{}
+ file_v1_issue_service_proto_msgTypes[29].OneofWrappers = []any{}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_issue_service_proto_rawDesc), len(file_v1_issue_service_proto_rawDesc)),
NumEnums: 7,
- NumMessages: 31,
+ NumMessages: 32,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/backend/generated-go/v1/issue_service.pb.gw.go b/backend/generated-go/v1/issue_service.pb.gw.go
index ba7321d850..068ea06e6f 100644
--- a/backend/generated-go/v1/issue_service.pb.gw.go
+++ b/backend/generated-go/v1/issue_service.pb.gw.go
@@ -716,6 +716,45 @@ func local_request_IssueService_RetryIssueApproval_0(ctx context.Context, marsha
return msg, metadata, err
}
+func request_IssueService_GetReviewRun_0(ctx context.Context, marshaler runtime.Marshaler, client IssueServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq GetReviewRunRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ val, ok := pathParams["name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
+ }
+ protoReq.Name, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
+ }
+ if req.Body != nil {
+ _, _ = io.Copy(io.Discard, req.Body)
+ }
+ msg, err := client.GetReviewRun(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+}
+
+func local_request_IssueService_GetReviewRun_0(ctx context.Context, marshaler runtime.Marshaler, server IssueServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var (
+ protoReq GetReviewRunRequest
+ metadata runtime.ServerMetadata
+ err error
+ )
+ val, ok := pathParams["name"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
+ }
+ protoReq.Name, err = runtime.String(val)
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
+ }
+ msg, err := server.GetReviewRun(ctx, &protoReq)
+ return msg, metadata, err
+}
+
func request_IssueService_RunReview_0(ctx context.Context, marshaler runtime.Marshaler, client IssueServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var (
protoReq RunReviewRequest
@@ -1027,6 +1066,26 @@ func RegisterIssueServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
}
forward_IssueService_RetryIssueApproval_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
+ mux.Handle(http.MethodGet, pattern_IssueService_GetReviewRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ var stream runtime.ServerTransportStream
+ ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/bytebase.v1.IssueService/GetReviewRun", runtime.WithHTTPPathPattern("/v1/{name=projects/*/issues/*/reviewRuns/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_IssueService_GetReviewRun_0(annotatedContext, inboundMarshaler, server, req, pathParams)
+ md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_IssueService_GetReviewRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
mux.Handle(http.MethodPost, pattern_IssueService_RunReview_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1308,6 +1367,23 @@ func RegisterIssueServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
}
forward_IssueService_RetryIssueApproval_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
+ mux.Handle(http.MethodGet, pattern_IssueService_GetReviewRun_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ annotatedContext, err := runtime.AnnotateContext(ctx, mux, req, "/bytebase.v1.IssueService/GetReviewRun", runtime.WithHTTPPathPattern("/v1/{name=projects/*/issues/*/reviewRuns/*}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_IssueService_GetReviewRun_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ forward_IssueService_GetReviewRun_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+ })
mux.Handle(http.MethodPost, pattern_IssueService_RunReview_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -1342,6 +1418,7 @@ var (
pattern_IssueService_RejectIssue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "issues", "name"}, "reject"))
pattern_IssueService_RequestIssue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "issues", "name"}, "request"))
pattern_IssueService_RetryIssueApproval_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 4, 4, 5, 3}, []string{"v1", "projects", "issues", "name"}, "retryApproval"))
+ pattern_IssueService_GetReviewRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "projects", "issues", "reviewRuns", "name"}, ""))
pattern_IssueService_RunReview_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 2, 2, 1, 0, 2, 3, 1, 0, 4, 6, 5, 4}, []string{"v1", "projects", "issues", "reviewRuns", "name"}, "run"))
)
@@ -1359,5 +1436,6 @@ var (
forward_IssueService_RejectIssue_0 = runtime.ForwardResponseMessage
forward_IssueService_RequestIssue_0 = runtime.ForwardResponseMessage
forward_IssueService_RetryIssueApproval_0 = runtime.ForwardResponseMessage
+ forward_IssueService_GetReviewRun_0 = runtime.ForwardResponseMessage
forward_IssueService_RunReview_0 = runtime.ForwardResponseMessage
)
diff --git a/backend/generated-go/v1/issue_service_equal.pb.go b/backend/generated-go/v1/issue_service_equal.pb.go
index e560fb1b16..1dd641789f 100644
--- a/backend/generated-go/v1/issue_service_equal.pb.go
+++ b/backend/generated-go/v1/issue_service_equal.pb.go
@@ -715,6 +715,19 @@ func (x *ReviewRun) Equal(y *ReviewRun) bool {
return true
}
+func (x *GetReviewRunRequest) Equal(y *GetReviewRunRequest) bool {
+ if x == y {
+ return true
+ }
+ if x == nil || y == nil {
+ return x == nil && y == nil
+ }
+ if x.Name != y.Name {
+ return false
+ }
+ return true
+}
+
func (x *RunReviewRequest) Equal(y *RunReviewRequest) bool {
if x == y {
return true
diff --git a/backend/generated-go/v1/issue_service_grpc.pb.go b/backend/generated-go/v1/issue_service_grpc.pb.go
index cb86090008..e6b1fa794e 100644
--- a/backend/generated-go/v1/issue_service_grpc.pb.go
+++ b/backend/generated-go/v1/issue_service_grpc.pb.go
@@ -32,6 +32,7 @@ const (
IssueService_RejectIssue_FullMethodName = "/bytebase.v1.IssueService/RejectIssue"
IssueService_RequestIssue_FullMethodName = "/bytebase.v1.IssueService/RequestIssue"
IssueService_RetryIssueApproval_FullMethodName = "/bytebase.v1.IssueService/RetryIssueApproval"
+ IssueService_GetReviewRun_FullMethodName = "/bytebase.v1.IssueService/GetReviewRun"
IssueService_RunReview_FullMethodName = "/bytebase.v1.IssueService/RunReview"
)
@@ -87,12 +88,17 @@ type IssueServiceClient interface {
// Permissions required: None (caller must be the issue creator;
// mirrors RequestIssue's authorization model).
RetryIssueApproval(ctx context.Context, in *RetryIssueApprovalRequest, opts ...grpc.CallOption) (*Issue, error)
+ // Gets the current run of one reviewer on an issue. The run carries
+ // execution status only; review results are issue comments. A reviewer
+ // that has never run on the issue is NOT_FOUND.
+ // Permissions required: bb.reviewRuns.get
+ GetReviewRun(ctx context.Context, in *GetReviewRunRequest, opts ...grpc.CallOption) (*ReviewRun, error)
// Triggers a review run. The slot is reset unconditionally: a RUNNING
// execution is superseded (its completion is fenced off), the attempt
// number is bumped, and the returned run is AVAILABLE.
- // Review results are not returned by this RPC and have no read RPC yet:
- // findings will surface as issue comments once the review comment
- // integration lands. The returned run carries execution status only.
+ // Review results are not returned by this RPC: they are posted as issue
+ // comments. The returned run carries execution status only, and
+ // GetReviewRun reads it back.
// The audit log is the only record of who triggered a run.
// Permissions required: bb.reviewRuns.run
RunReview(ctx context.Context, in *RunReviewRequest, opts ...grpc.CallOption) (*ReviewRun, error)
@@ -236,6 +242,16 @@ func (c *issueServiceClient) RetryIssueApproval(ctx context.Context, in *RetryIs
return out, nil
}
+func (c *issueServiceClient) GetReviewRun(ctx context.Context, in *GetReviewRunRequest, opts ...grpc.CallOption) (*ReviewRun, error) {
+ cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
+ out := new(ReviewRun)
+ err := c.cc.Invoke(ctx, IssueService_GetReviewRun_FullMethodName, in, out, cOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
func (c *issueServiceClient) RunReview(ctx context.Context, in *RunReviewRequest, opts ...grpc.CallOption) (*ReviewRun, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ReviewRun)
@@ -298,12 +314,17 @@ type IssueServiceServer interface {
// Permissions required: None (caller must be the issue creator;
// mirrors RequestIssue's authorization model).
RetryIssueApproval(context.Context, *RetryIssueApprovalRequest) (*Issue, error)
+ // Gets the current run of one reviewer on an issue. The run carries
+ // execution status only; review results are issue comments. A reviewer
+ // that has never run on the issue is NOT_FOUND.
+ // Permissions required: bb.reviewRuns.get
+ GetReviewRun(context.Context, *GetReviewRunRequest) (*ReviewRun, error)
// Triggers a review run. The slot is reset unconditionally: a RUNNING
// execution is superseded (its completion is fenced off), the attempt
// number is bumped, and the returned run is AVAILABLE.
- // Review results are not returned by this RPC and have no read RPC yet:
- // findings will surface as issue comments once the review comment
- // integration lands. The returned run carries execution status only.
+ // Review results are not returned by this RPC: they are posted as issue
+ // comments. The returned run carries execution status only, and
+ // GetReviewRun reads it back.
// The audit log is the only record of who triggered a run.
// Permissions required: bb.reviewRuns.run
RunReview(context.Context, *RunReviewRequest) (*ReviewRun, error)
@@ -356,6 +377,9 @@ func (UnimplementedIssueServiceServer) RequestIssue(context.Context, *RequestIss
func (UnimplementedIssueServiceServer) RetryIssueApproval(context.Context, *RetryIssueApprovalRequest) (*Issue, error) {
return nil, status.Error(codes.Unimplemented, "method RetryIssueApproval not implemented")
}
+func (UnimplementedIssueServiceServer) GetReviewRun(context.Context, *GetReviewRunRequest) (*ReviewRun, error) {
+ return nil, status.Error(codes.Unimplemented, "method GetReviewRun not implemented")
+}
func (UnimplementedIssueServiceServer) RunReview(context.Context, *RunReviewRequest) (*ReviewRun, error) {
return nil, status.Error(codes.Unimplemented, "method RunReview not implemented")
}
@@ -614,6 +638,24 @@ func _IssueService_RetryIssueApproval_Handler(srv interface{}, ctx context.Conte
return interceptor(ctx, in, info, handler)
}
+func _IssueService_GetReviewRun_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetReviewRunRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(IssueServiceServer).GetReviewRun(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: IssueService_GetReviewRun_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(IssueServiceServer).GetReviewRun(ctx, req.(*GetReviewRunRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _IssueService_RunReview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RunReviewRequest)
if err := dec(in); err != nil {
@@ -691,6 +733,10 @@ var IssueService_ServiceDesc = grpc.ServiceDesc{
MethodName: "RetryIssueApproval",
Handler: _IssueService_RetryIssueApproval_Handler,
},
+ {
+ MethodName: "GetReviewRun",
+ Handler: _IssueService_GetReviewRun_Handler,
+ },
{
MethodName: "RunReview",
Handler: _IssueService_RunReview_Handler,
diff --git a/backend/generated-go/v1/v1connect/issue_service.connect.go b/backend/generated-go/v1/v1connect/issue_service.connect.go
index 20d7c99c34..73b1eef131 100644
--- a/backend/generated-go/v1/v1connect/issue_service.connect.go
+++ b/backend/generated-go/v1/v1connect/issue_service.connect.go
@@ -70,6 +70,9 @@ const (
// IssueServiceRetryIssueApprovalProcedure is the fully-qualified name of the IssueService's
// RetryIssueApproval RPC.
IssueServiceRetryIssueApprovalProcedure = "/bytebase.v1.IssueService/RetryIssueApproval"
+ // IssueServiceGetReviewRunProcedure is the fully-qualified name of the IssueService's GetReviewRun
+ // RPC.
+ IssueServiceGetReviewRunProcedure = "/bytebase.v1.IssueService/GetReviewRun"
// IssueServiceRunReviewProcedure is the fully-qualified name of the IssueService's RunReview RPC.
IssueServiceRunReviewProcedure = "/bytebase.v1.IssueService/RunReview"
)
@@ -122,12 +125,17 @@ type IssueServiceClient interface {
// Permissions required: None (caller must be the issue creator;
// mirrors RequestIssue's authorization model).
RetryIssueApproval(context.Context, *connect.Request[v1.RetryIssueApprovalRequest]) (*connect.Response[v1.Issue], error)
+ // Gets the current run of one reviewer on an issue. The run carries
+ // execution status only; review results are issue comments. A reviewer
+ // that has never run on the issue is NOT_FOUND.
+ // Permissions required: bb.reviewRuns.get
+ GetReviewRun(context.Context, *connect.Request[v1.GetReviewRunRequest]) (*connect.Response[v1.ReviewRun], error)
// Triggers a review run. The slot is reset unconditionally: a RUNNING
// execution is superseded (its completion is fenced off), the attempt
// number is bumped, and the returned run is AVAILABLE.
- // Review results are not returned by this RPC and have no read RPC yet:
- // findings will surface as issue comments once the review comment
- // integration lands. The returned run carries execution status only.
+ // Review results are not returned by this RPC: they are posted as issue
+ // comments. The returned run carries execution status only, and
+ // GetReviewRun reads it back.
// The audit log is the only record of who triggered a run.
// Permissions required: bb.reviewRuns.run
RunReview(context.Context, *connect.Request[v1.RunReviewRequest]) (*connect.Response[v1.ReviewRun], error)
@@ -222,6 +230,12 @@ func NewIssueServiceClient(httpClient connect.HTTPClient, baseURL string, opts .
connect.WithSchema(issueServiceMethods.ByName("RetryIssueApproval")),
connect.WithClientOptions(opts...),
),
+ getReviewRun: connect.NewClient[v1.GetReviewRunRequest, v1.ReviewRun](
+ httpClient,
+ baseURL+IssueServiceGetReviewRunProcedure,
+ connect.WithSchema(issueServiceMethods.ByName("GetReviewRun")),
+ connect.WithClientOptions(opts...),
+ ),
runReview: connect.NewClient[v1.RunReviewRequest, v1.ReviewRun](
httpClient,
baseURL+IssueServiceRunReviewProcedure,
@@ -246,6 +260,7 @@ type issueServiceClient struct {
rejectIssue *connect.Client[v1.RejectIssueRequest, v1.Issue]
requestIssue *connect.Client[v1.RequestIssueRequest, v1.Issue]
retryIssueApproval *connect.Client[v1.RetryIssueApprovalRequest, v1.Issue]
+ getReviewRun *connect.Client[v1.GetReviewRunRequest, v1.ReviewRun]
runReview *connect.Client[v1.RunReviewRequest, v1.ReviewRun]
}
@@ -314,6 +329,11 @@ func (c *issueServiceClient) RetryIssueApproval(ctx context.Context, req *connec
return c.retryIssueApproval.CallUnary(ctx, req)
}
+// GetReviewRun calls bytebase.v1.IssueService.GetReviewRun.
+func (c *issueServiceClient) GetReviewRun(ctx context.Context, req *connect.Request[v1.GetReviewRunRequest]) (*connect.Response[v1.ReviewRun], error) {
+ return c.getReviewRun.CallUnary(ctx, req)
+}
+
// RunReview calls bytebase.v1.IssueService.RunReview.
func (c *issueServiceClient) RunReview(ctx context.Context, req *connect.Request[v1.RunReviewRequest]) (*connect.Response[v1.ReviewRun], error) {
return c.runReview.CallUnary(ctx, req)
@@ -367,12 +387,17 @@ type IssueServiceHandler interface {
// Permissions required: None (caller must be the issue creator;
// mirrors RequestIssue's authorization model).
RetryIssueApproval(context.Context, *connect.Request[v1.RetryIssueApprovalRequest]) (*connect.Response[v1.Issue], error)
+ // Gets the current run of one reviewer on an issue. The run carries
+ // execution status only; review results are issue comments. A reviewer
+ // that has never run on the issue is NOT_FOUND.
+ // Permissions required: bb.reviewRuns.get
+ GetReviewRun(context.Context, *connect.Request[v1.GetReviewRunRequest]) (*connect.Response[v1.ReviewRun], error)
// Triggers a review run. The slot is reset unconditionally: a RUNNING
// execution is superseded (its completion is fenced off), the attempt
// number is bumped, and the returned run is AVAILABLE.
- // Review results are not returned by this RPC and have no read RPC yet:
- // findings will surface as issue comments once the review comment
- // integration lands. The returned run carries execution status only.
+ // Review results are not returned by this RPC: they are posted as issue
+ // comments. The returned run carries execution status only, and
+ // GetReviewRun reads it back.
// The audit log is the only record of who triggered a run.
// Permissions required: bb.reviewRuns.run
RunReview(context.Context, *connect.Request[v1.RunReviewRequest]) (*connect.Response[v1.ReviewRun], error)
@@ -463,6 +488,12 @@ func NewIssueServiceHandler(svc IssueServiceHandler, opts ...connect.HandlerOpti
connect.WithSchema(issueServiceMethods.ByName("RetryIssueApproval")),
connect.WithHandlerOptions(opts...),
)
+ issueServiceGetReviewRunHandler := connect.NewUnaryHandler(
+ IssueServiceGetReviewRunProcedure,
+ svc.GetReviewRun,
+ connect.WithSchema(issueServiceMethods.ByName("GetReviewRun")),
+ connect.WithHandlerOptions(opts...),
+ )
issueServiceRunReviewHandler := connect.NewUnaryHandler(
IssueServiceRunReviewProcedure,
svc.RunReview,
@@ -497,6 +528,8 @@ func NewIssueServiceHandler(svc IssueServiceHandler, opts ...connect.HandlerOpti
issueServiceRequestIssueHandler.ServeHTTP(w, r)
case IssueServiceRetryIssueApprovalProcedure:
issueServiceRetryIssueApprovalHandler.ServeHTTP(w, r)
+ case IssueServiceGetReviewRunProcedure:
+ issueServiceGetReviewRunHandler.ServeHTTP(w, r)
case IssueServiceRunReviewProcedure:
issueServiceRunReviewHandler.ServeHTTP(w, r)
default:
@@ -560,6 +593,10 @@ func (UnimplementedIssueServiceHandler) RetryIssueApproval(context.Context, *con
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.IssueService.RetryIssueApproval is not implemented"))
}
+func (UnimplementedIssueServiceHandler) GetReviewRun(context.Context, *connect.Request[v1.GetReviewRunRequest]) (*connect.Response[v1.ReviewRun], error) {
+ return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.IssueService.GetReviewRun is not implemented"))
+}
+
func (UnimplementedIssueServiceHandler) RunReview(context.Context, *connect.Request[v1.RunReviewRequest]) (*connect.Response[v1.ReviewRun], error) {
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("bytebase.v1.IssueService.RunReview is not implemented"))
}
diff --git a/backend/store/predefined_roles.go b/backend/store/predefined_roles.go
index 002e79c3d0..5a2c9a4edd 100644
--- a/backend/store/predefined_roles.go
+++ b/backend/store/predefined_roles.go
@@ -115,6 +115,7 @@ var PredefinedRoles = []*RoleMessage{
permission.ReviewConfigsGet,
permission.ReviewConfigsList,
permission.ReviewConfigsUpdate,
+ permission.ReviewRunsGet,
permission.ReviewRunsRun,
permission.RevisionsCreate,
permission.RevisionsDelete,
@@ -267,6 +268,7 @@ var PredefinedRoles = []*RoleMessage{
permission.ReviewConfigsGet,
permission.ReviewConfigsList,
permission.ReviewConfigsUpdate,
+ permission.ReviewRunsGet,
permission.ReviewRunsRun,
permission.RevisionsCreate,
permission.RevisionsDelete,
@@ -415,6 +417,7 @@ var PredefinedRoles = []*RoleMessage{
permission.ReleasesList,
permission.ReleasesUndelete,
permission.ReleasesUpdate,
+ permission.ReviewRunsGet,
permission.ReviewRunsRun,
permission.RevisionsCreate,
permission.RevisionsDelete,
@@ -489,6 +492,7 @@ var PredefinedRoles = []*RoleMessage{
permission.ReleasesCheck,
permission.ReleasesGet,
permission.ReleasesList,
+ permission.ReviewRunsGet,
permission.ReviewRunsRun,
permission.RevisionsGet,
permission.RevisionsList,
@@ -573,6 +577,7 @@ var PredefinedRoles = []*RoleMessage{
permission.ProjectsGetIAMPolicy,
permission.ReleasesGet,
permission.ReleasesList,
+ permission.ReviewRunsGet,
permission.ReviewRunsRun,
permission.RevisionsGet,
permission.RevisionsList,
diff --git a/backend/store/review_run.go b/backend/store/review_run.go
index f7609b4953..41391a031a 100644
--- a/backend/store/review_run.go
+++ b/backend/store/review_run.go
@@ -96,6 +96,51 @@ func (s *Store) CreateReviewRun(ctx context.Context, projectID string, issueUID
return reviewRun, nil
}
+// GetReviewRun returns the run in the (issue, reviewer type) slot as stored,
+// or nil when the slot was never created.
+func (s *Store) GetReviewRun(ctx context.Context, projectID string, issueUID int64, reviewType string) (*ReviewRunMessage, error) {
+ q := qb.Q().Space(`
+ SELECT attempt, status, payload, created_at, updated_at
+ FROM review_run
+ WHERE project = ? AND issue_id = ? AND type = ?
+ `, projectID, issueUID, reviewType)
+
+ query, args, err := q.ToSQL()
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to build sql")
+ }
+
+ reviewRun := &ReviewRunMessage{
+ ProjectID: projectID,
+ IssueUID: issueUID,
+ Type: reviewType,
+ Payload: &storepb.ReviewRunPayload{},
+ }
+ var statusString string
+ var payload []byte
+ if err := s.GetDB().QueryRowContext(ctx, query, args...).Scan(
+ &reviewRun.Attempt,
+ &statusString,
+ &payload,
+ &reviewRun.CreatedAt,
+ &reviewRun.UpdatedAt,
+ ); err != nil {
+ if errors.Is(err, sql.ErrNoRows) {
+ return nil, nil
+ }
+ return nil, errors.Wrapf(err, "failed to get review run")
+ }
+ statusValue, ok := storepb.ReviewRun_Status_value[statusString]
+ if !ok {
+ return nil, errors.Errorf("invalid review run status %q", statusString)
+ }
+ reviewRun.Status = storepb.ReviewRun_Status(statusValue)
+ if err := common.ProtojsonUnmarshaler.Unmarshal(payload, reviewRun.Payload); err != nil {
+ return nil, errors.Wrapf(err, "failed to unmarshal review run payload")
+ }
+ return reviewRun, nil
+}
+
// ClaimedReviewRun identifies a claimed review run slot and carries the claim
// fence (attempt).
type ClaimedReviewRun struct {
diff --git a/backend/store/review_run_test.go b/backend/store/review_run_test.go
index 6d69fdb719..4da9e7bd7c 100644
--- a/backend/store/review_run_test.go
+++ b/backend/store/review_run_test.go
@@ -117,3 +117,80 @@ func TestReviewRunStoreLifecycle(t *testing.T) {
require.NoError(t, err)
require.Equal(t, int64(0), rowsAffected)
}
+
+func TestGetReviewRunCollidingIssues(t *testing.T) {
+ t.Parallel()
+ fixture := newStorePostgresFixture(t, `
+ INSERT INTO project (resource_id, workspace, name) VALUES ('other', 'default', 'Other');
+ INSERT INTO issue (id, creator, project, name, status, type)
+ VALUES (201, '[email protected]', 'default', 'Issue Default', 'OPEN', 'DATABASE_CHANGE');
+ INSERT INTO issue (id, creator, project, name, status, type)
+ VALUES (201, '[email protected]', 'other', 'Issue Other', 'OPEN', 'DATABASE_CHANGE');
+ `)
+ ctx, db, s := fixture.ctx, fixture.db, fixture.store
+
+ got, err := s.GetReviewRun(ctx, "default", 201, store.ReviewRunTypeRule)
+ require.NoError(t, err)
+ require.Nil(t, got, "a slot that was never created")
+
+ // default: FAILED at attempt 0. other: AVAILABLE at attempt 1.
+ _, err = s.CreateReviewRun(ctx, "default", 201, store.ReviewRunTypeRule)
+ require.NoError(t, err)
+ claimed, err := s.ClaimAvailableReviewRuns(ctx, "replica-1")
+ require.NoError(t, err)
+ require.Len(t, claimed, 1)
+ updated, err := s.CompleteReviewRun(ctx, claimed[0], "replica-1", storepb.ReviewRun_FAILED, &storepb.ReviewRunPayload{Error: "boom"}, nil)
+ require.NoError(t, err)
+ require.True(t, updated)
+ for range 2 {
+ _, err = s.CreateReviewRun(ctx, "other", 201, store.ReviewRunTypeRule)
+ require.NoError(t, err)
+ }
+
+ type slotRow struct {
+ Attempt int64
+ Status string
+ CreatedAt time.Time
+ UpdatedAt time.Time
+ }
+ readRaw := func(projectID string) slotRow {
+ var row slotRow
+ require.NoError(t, db.QueryRowContext(ctx, `
+ SELECT attempt, status, created_at, updated_at FROM review_run
+ WHERE project = $1 AND issue_id = 201 AND type = 'RULE'
+ `, projectID).Scan(&row.Attempt, &row.Status, &row.CreatedAt, &row.UpdatedAt))
+ return row
+ }
+ rawDefault, rawOther := readRaw("default"), readRaw("other")
+ require.NotEqual(t, rawDefault.Status, rawOther.Status, "the two slots must differ to tell them apart")
+
+ got, err = s.GetReviewRun(ctx, "default", 201, store.ReviewRunTypeRule)
+ require.NoError(t, err)
+ require.NotNil(t, got)
+ require.Equal(t, "default", got.ProjectID)
+ require.Equal(t, int64(201), got.IssueUID)
+ require.Equal(t, store.ReviewRunTypeRule, got.Type)
+ require.Equal(t, int64(0), got.Attempt)
+ require.Equal(t, storepb.ReviewRun_FAILED, got.Status)
+ require.Equal(t, "boom", got.Payload.GetError())
+ require.True(t, got.CreatedAt.Equal(rawDefault.CreatedAt))
+ require.True(t, got.UpdatedAt.Equal(rawDefault.UpdatedAt))
+
+ got, err = s.GetReviewRun(ctx, "other", 201, store.ReviewRunTypeRule)
+ require.NoError(t, err)
+ require.NotNil(t, got)
+ require.Equal(t, "other", got.ProjectID)
+ require.Equal(t, int64(1), got.Attempt)
+ require.Equal(t, storepb.ReviewRun_AVAILABLE, got.Status)
+ require.Empty(t, got.Payload.GetError())
+ require.True(t, got.CreatedAt.Equal(rawOther.CreatedAt))
+ require.True(t, got.UpdatedAt.Equal(rawOther.UpdatedAt))
+
+ // The reviewer type is part of the key, and so is the issue.
+ got, err = s.GetReviewRun(ctx, "default", 201, store.ReviewRunTypeAI)
+ require.NoError(t, err)
+ require.Nil(t, got)
+ got, err = s.GetReviewRun(ctx, "default", 999, store.ReviewRunTypeRule)
+ require.NoError(t, err)
+ require.Nil(t, got)
+}
diff --git a/docs/design/mcp-capability-ladder.md b/docs/design/mcp-capability-ladder.md
index 74f3b60bc9..68ce6b80a5 100644
--- a/docs/design/mcp-capability-ladder.md
+++ b/docs/design/mcp-capability-ladder.md
@@ -68,15 +68,15 @@ the product.
|---|---|---|---|
| read | Read schemas and metadata | Schemas · Databases and instances · Projects and database groups · Catalogs, changelogs and revisions · SQL review configs · Your own session and workspace facts | 31 READ methods: `DatabaseService` reads, projects, instances, database groups, catalogs, changelogs, revisions, review configs, session facts |
| read | Read data by running queries | Run read-only queries · Under Read-only, a request is refused whole unless every statement is shown to be a read that returns data; how deeply that can be checked varies by engine, and on some engines no statement can be shown to be a read at all · Your own query history · Saved queries and sheets you have access to | 9 READ methods: `SQLService/Query`, query history (4), saved-query reads (3), `GetSheet` |
-| read | Read the change workflow | Issues and comments · Plans and plan checks · Rollouts, task runs and logs · Releases · Rollback previews | 16 READ methods: issue, plan, rollout and release reads |
-| — | *Read-only stops here* | | 56 methods |
+| read | Read the change workflow | Issues and comments · Plans and plan checks · Rollouts, task runs and logs · Releases · Rollback previews | 17 READ methods: issue, plan, rollout and release reads |
+| — | *Read-only stops here* | | 57 methods |
| write | Propose changes | Create sheets · Create and edit plans and issues · Run plan checks and reviews · Create, delete and restore releases · Create and delete revisions · Generate schema diffs. An agent never approves its own change; the project's approval policy decides whether a human must | 22 WRITE methods: sheet, plan, issue, release and revision writes, `RequestIssue`, `RunReview`, `DiffSchema`, `DiffMetadata` |
| write | Request access grants | Ask for a time-boxed grant to run a specific statement, optionally with results unmasked or exported; the statement must be a read as far as the engine can check it · The grant starts only after a person approves it, and a request that would need no one's approval is refused · A grant applies only where the project allows access grants | 1 WRITE method: `AccessGrantService/CreateAccessGrant` |
| write | Run rollouts and tasks | Create a rollout · Run, skip or cancel its tasks, under the project's approval policy | 4 WRITE methods: `CreateRollout`, `BatchRunTasks`, `BatchSkipTasks`, `BatchCancelTaskRuns` |
| write | Run DML and DDL statements | INSERT, UPDATE, DELETE, CREATE, ALTER, DROP through queries, as far as the engine and the user's own permissions allow | Not a method: the statement clamp in `mcp_sql_clamp.go`, which Read-write lifts |
| write | Export query results | Download results as a file. Data leaves Bytebase | 1 WRITE method: `SQLService/Export` |
| write | Manage database housekeeping | Sync instances and databases · Saved queries | 9 WRITE methods: sync, saved-query writes |
-| — | *Read-write stops here* | | 93 methods |
+| — | *Read-write stops here* | | 94 methods |
| floor | Never, in any mode: approve issues, administer the workspace, handle credentials, open an Admin mode session, or read anyone else's query history. | | 125 methods: 36 FORBIDDEN, 89 EXCLUDED |
Every row is displayed under every mode — served, or muted with a `—` — and against every engine a
diff --git a/frontend/src/types/iam/permission-generated.ts b/frontend/src/types/iam/permission-generated.ts
index 8c51a9b79d..eeb00940f6 100644
--- a/frontend/src/types/iam/permission-generated.ts
+++ b/frontend/src/types/iam/permission-generated.ts
@@ -91,6 +91,7 @@ export type Permission =
| "bb.reviewConfigs.get"
| "bb.reviewConfigs.list"
| "bb.reviewConfigs.update"
+ | "bb.reviewRuns.get"
| "bb.reviewRuns.run"
| "bb.revisions.create"
| "bb.revisions.delete"
diff --git a/frontend/src/types/proto-es/v1/issue_service_pb.d.ts b/frontend/src/types/proto-es/v1/issue_service_pb.d.ts
index 257b73e02b..4385049cc6 100644
--- a/frontend/src/types/proto-es/v1/issue_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/issue_service_pb.d.ts
@@ -1489,6 +1489,25 @@ export enum ReviewRun_Status {
*/
export declare const ReviewRun_StatusSchema: GenEnum<ReviewRun_Status>;
+/**
+ * @generated from message bytebase.v1.GetReviewRunRequest
+ */
+export declare type GetReviewRunRequest = Message<"bytebase.v1.GetReviewRunRequest"> & {
+ /**
+ * The name of the review run to retrieve.
+ * Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun}
+ *
+ * @generated from field: string name = 1;
+ */
+ name: string;
+};
+
+/**
+ * Describes the message bytebase.v1.GetReviewRunRequest.
+ * Use `create(GetReviewRunRequestSchema)` to create a new message.
+ */
+export declare const GetReviewRunRequestSchema: GenMessage<GetReviewRunRequest>;
+
/**
* @generated from message bytebase.v1.RunReviewRequest
*/
@@ -1663,13 +1682,26 @@ export declare const IssueService: GenService<{
input: typeof RetryIssueApprovalRequestSchema;
output: typeof IssueSchema;
},
+ /**
+ * Gets the current run of one reviewer on an issue. The run carries
+ * execution status only; review results are issue comments. A reviewer
+ * that has never run on the issue is NOT_FOUND.
+ * Permissions required: bb.reviewRuns.get
+ *
+ * @generated from rpc bytebase.v1.IssueService.GetReviewRun
+ */
+ getReviewRun: {
+ methodKind: "unary";
+ input: typeof GetReviewRunRequestSchema;
+ output: typeof ReviewRunSchema;
+ },
/**
* Triggers a review run. The slot is reset unconditionally: a RUNNING
* execution is superseded (its completion is fenced off), the attempt
* number is bumped, and the returned run is AVAILABLE.
- * Review results are not returned by this RPC and have no read RPC yet:
- * findings will surface as issue comments once the review comment
- * integration lands. The returned run carries execution status only.
+ * Review results are not returned by this RPC: they are posted as issue
+ * comments. The returned run carries execution status only, and
+ * GetReviewRun reads it back.
* The audit log is the only record of who triggered a run.
* Permissions required: bb.reviewRuns.run
*
diff --git a/frontend/src/types/proto-es/v1/issue_service_pb.js b/frontend/src/types/proto-es/v1/issue_service_pb.js
index 76bb16975d..2a66f96cbc 100644
--- a/frontend/src/types/proto-es/v1/issue_service_pb.js
+++ b/frontend/src/types/proto-es/v1/issue_service_pb.js
@@ -19,7 +19,7 @@ import { file_v1_review_rule } from "./review_rule_pb";
* Describes the file v1/issue_service.proto.
*/
export const file_v1_issue_service = /*@__PURE__*/
- fileDesc("ChZ2MS9pc3N1ZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJKCg9HZXRJc3N1ZVJlcXVlc3QSKAoEbmFtZRgBIAEoCUIa4EE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JNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_google_type_expr, file_v1_annotation, file_v1_common, file_v1_plan_service, file_v1_review_rule]);
+ fileDesc("ChZ2MS9pc3N1ZV9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSJKCg9HZXRJc3N1ZVJlcXVlc3QSKAoEbmFtZRgBIAEoCUIa4EEC+kEUChJieXRlYmFzZS5jb20vSXNzdWUSDQoFZm9yY2UYAiABKAgiagoSQ3JlYXRlSXNzdWVSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBImCgVpc3N1ZRgCIAEoCzISLmJ5dGViYXNlLnYxLklzc3VlQgPgQQIimQEKEUxpc3RJc3N1ZXNSZXF1ZXN0EiwKBnBhcmVudBgBIAEoCUIc4EEC+kEWChRieXRlYmFzZS5jb20vUHJvamVjdBIRCglwYWdlX3NpemUYAiABKAUSEgoKcGFnZV90b2tlbhgDIAEoCRIOCgZmaWx0ZXIYBCABKAkSDQoFcXVlcnkYBSABKAkSEAoIb3JkZXJfYnkYBiABKAkiUQoSTGlzdElzc3Vlc1Jlc3BvbnNlEiIKBmlzc3VlcxgBIAMoCzISLmJ5dGViYXNlLnYxLklzc3VlEhcKD25leHRfcGFnZV90b2tlbhgCIAEoCSKCAQoTU2VhcmNoSXNzdWVzUmVxdWVzdBITCgZwYXJlbnQYASABKAlCA+BBAhIRCglwYWdlX3NpemUYAiABKAUSEgoKcGFnZV90b2tlbhgDIAEoCRIOCgZmaWx0ZXIYBCABKAkSDQoFcXVlcnkYBSABKAkSEAoIb3JkZXJfYnkYBiABKAkiUwoUU2VhcmNoSXNzdWVzUmVzcG9uc2USIgoGaXNzdWVzGAEgAygLMhIuYnl0ZWJhc2UudjEuSXNzd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0ZWJhc2UudjEuR2V0UmV2aWV3UnVuUmVxdWVzdBoWLmJ5dGViYXNlLnYxLlJldmlld1J1biJX2kEEbmFtZYrqMBFiYi5yZXZpZXdSdW5zLmdldJDqMAGg6jABgtPkkwItEisvdjEve25hbWU9cHJvamVjdHMvKi9pc3N1ZXMvKi9yZXZpZXdSdW5zLyp9EqYBCglSdW5SZXZpZXcSHS5ieXRlYmFzZS52MS5SdW5SZXZpZXdSZXF1ZXN0GhYuYnl0ZWJhc2UudjEuUmV2aWV3UnVuImLaQQRuYW1liuowEWJiLnJldmlld1J1bnMucnVukOowAZjqMAGg6jACgtPkkwI0OgEqIi8vdjEve25hbWU9cHJvamVjdHMvKi9pc3N1ZXMvKi9yZXZpZXdSdW5zLyp9OnJ1bkKnAQoPY29tLmJ5dGViYXNlLnYxQhFJc3N1ZVNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_duration, file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_google_type_expr, file_v1_annotation, file_v1_common, file_v1_plan_service, file_v1_review_rule]);
/**
* Describes the message bytebase.v1.GetIssueRequest.
@@ -328,12 +328,19 @@ export const ReviewRun_StatusSchema = /*@__PURE__*/
export const ReviewRun_Status = /*@__PURE__*/
tsEnum(ReviewRun_StatusSchema);
+/**
+ * Describes the message bytebase.v1.GetReviewRunRequest.
+ * Use `create(GetReviewRunRequestSchema)` to create a new message.
+ */
+export const GetReviewRunRequestSchema = /*@__PURE__*/
+ messageDesc(file_v1_issue_service, 24);
+
/**
* Describes the message bytebase.v1.RunReviewRequest.
* Use `create(RunReviewRequestSchema)` to create a new message.
*/
export const RunReviewRequestSchema = /*@__PURE__*/
- messageDesc(file_v1_issue_service, 24);
+ messageDesc(file_v1_issue_service, 25);
/**
* IssueService manages issues for tracking database changes and tasks.
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index d61500bd6b..2ff6f8755f 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -11106,6 +11106,43 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/bytebase.v1.ListIssueCommentsResponse'
+ /v1/projects/{project}/issues/{issue}/reviewRuns/{reviewRun}:
+ get:
+ tags:
+ - IssueService
+ summary: GetReviewRun
+ description: |-
+ Gets the current run of one reviewer on an issue. The run carries
+ execution status only; review results are issue comments. A reviewer
+ that has never run on the issue is NOT_FOUND.
+ Permissions required: bb.reviewRuns.get
+ operationId: IssueService_GetReviewRun
+ parameters:
+ - name: project
+ in: path
+ description: The project id.
+ required: true
+ schema:
+ type: string
+ - name: issue
+ in: path
+ description: The issue id.
+ required: true
+ schema:
+ type: string
+ - name: reviewRun
+ in: path
+ description: The reviewRun id.
+ required: true
+ schema:
+ type: string
+ responses:
+ "200":
+ description: Success
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/bytebase.v1.ReviewRun'
/v1/projects/{project}/issues/{issue}/reviewRuns/{reviewRun}:run:
post:
tags:
@@ -11115,9 +11152,9 @@ paths:
Triggers a review run. The slot is reset unconditionally: a RUNNING
execution is superseded (its completion is fenced off), the attempt
number is bumped, and the returned run is AVAILABLE.
- Review results are not returned by this RPC and have no read RPC yet:
- findings will surface as issue comments once the review comment
- integration lands. The returned run carries execution status only.
+ Review results are not returned by this RPC: they are posted as issue
+ comments. The returned run carries execution status only, and
+ GetReviewRun reads it back.
The audit log is the only record of who triggered a run.
Permissions required: bb.reviewRuns.run
operationId: IssueService_RunReview
@@ -21494,6 +21531,19 @@ components:
required:
- name
additionalProperties: false
+ bytebase.v1.GetReviewRunRequest:
+ type: object
+ properties:
+ name:
+ type: string
+ title: name
+ description: |-
+ The name of the review run to retrieve.
+ Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun}
+ title: GetReviewRunRequest
+ required:
+ - name
+ additionalProperties: false
bytebase.v1.GetRevisionRequest:
type: object
properties:
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 2a9f118091..6912731c60 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -182,6 +182,7 @@
- [CreateIssueCommentRequest](#bytebase-v1-CreateIssueCommentRequest)
- [CreateIssueRequest](#bytebase-v1-CreateIssueRequest)
- [GetIssueRequest](#bytebase-v1-GetIssueRequest)
+ - [GetReviewRunRequest](#bytebase-v1-GetReviewRunRequest)
- [Issue](#bytebase-v1-Issue)
- [Issue.Approver](#bytebase-v1-Issue-Approver)
- [IssueComment](#bytebase-v1-IssueComment)
@@ -3530,6 +3531,21 @@ needs a person&#39;s acceptance, not that it is forbidden.
+<a name="bytebase-v1-GetReviewRunRequest"></a>
+
+### GetReviewRunRequest
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | The name of the review run to retrieve. Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun} |
+
+
+
+
+
+
<a name="bytebase-v1-Issue"></a>
### Issue
@@ -4086,7 +4102,8 @@ IssueService manages issues for tracking database changes and tasks.
| RejectIssue | [RejectIssueRequest](#bytebase-v1-RejectIssueRequest) | [Issue](#bytebase-v1-Issue) | Rejects an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow) |
| RequestIssue | [RequestIssueRequest](#bytebase-v1-RequestIssueRequest) | [Issue](#bytebase-v1-Issue) | Requests changes on an issue. Access determined by approval flow configuration - caller must be a designated approver for the current approval step. Permissions required: None (determined by approval flow) |
| RetryIssueApproval | [RetryIssueApprovalRequest](#bytebase-v1-RetryIssueApprovalRequest) | [Issue](#bytebase-v1-Issue) | Re-runs approval-template finding for an issue stuck in CHECKING. Useful when the synchronous post-create finding errored (e.g. against a malformed workspace approval rule) and the operator has since corrected it — without this, the issue would remain in CHECKING indefinitely because there is no other retry path for non-DATABASE_CHANGE issue types. Idempotent: returns the existing issue unchanged when approval-finding has already completed. Permissions required: None (caller must be the issue creator; mirrors RequestIssue&#39;s authorization model). |
-| RunReview | [RunReviewRequest](#bytebase-v1-RunReviewRequest) | [ReviewRun](#bytebase-v1-ReviewRun) | Triggers a review run. The slot is reset unconditionally: a RUNNING execution is superseded (its completion is fenced off), the attempt number is bumped, and the returned run is AVAILABLE. Review results are not returned by this RPC and have no read RPC yet: findings will surface as issue comments once the review comment integration lands. The returned run carries execution status only. The audit log is the only record of who triggered a run. Permissions required: bb.reviewRuns.run |
+| GetReviewRun | [GetReviewRunRequest](#bytebase-v1-GetReviewRunRequest) | [ReviewRun](#bytebase-v1-ReviewRun) | Gets the current run of one reviewer on an issue. The run carries execution status only; review results are issue comments. A reviewer that has never run on the issue is NOT_FOUND. Permissions required: bb.reviewRuns.get |
+| RunReview | [RunReviewRequest](#bytebase-v1-RunReviewRequest) | [ReviewRun](#bytebase-v1-ReviewRun) | Triggers a review run. The slot is reset unconditionally: a RUNNING execution is superseded (its completion is fenced off), the attempt number is bumped, and the returned run is AVAILABLE. Review results are not returned by this RPC: they are posted as issue comments. The returned run carries execution status only, and GetReviewRun reads it back. The audit log is the only record of who triggered a run. Permissions required: bb.reviewRuns.run |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 20312737f5..462cedc4d6 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -866,6 +866,10 @@
<a href="#bytebase.v1.GetIssueRequest"><span class="badge">M</span>GetIssueRequest</a>
</li>
+ <li>
+ <a href="#bytebase.v1.GetReviewRunRequest"><span class="badge">M</span>GetReviewRunRequest</a>
+ </li>
+
<li>
<a href="#bytebase.v1.Issue"><span class="badge">M</span>Issue</a>
</li>
@@ -10704,6 +10708,31 @@ Format: projects/{project}/issues/{issue} </p></td>
+ <h3 id="bytebase.v1.GetReviewRunRequest">GetReviewRunRequest</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the review run to retrieve.
+Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun} </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
<h3 id="bytebase.v1.Issue">Issue</h3>
<p></p>
@@ -12228,6 +12257,16 @@ Permissions required: None (caller must be the issue creator;
mirrors RequestIssue&#39;s authorization model).</p></td>
</tr>
+ <tr>
+ <td>GetReviewRun</td>
+ <td><a href="#bytebase.v1.GetReviewRunRequest">GetReviewRunRequest</a></td>
+ <td><a href="#bytebase.v1.ReviewRun">ReviewRun</a></td>
+ <td><p>Gets the current run of one reviewer on an issue. The run carries
+execution status only; review results are issue comments. A reviewer
+that has never run on the issue is NOT_FOUND.
+Permissions required: bb.reviewRuns.get</p></td>
+ </tr>
+
<tr>
<td>RunReview</td>
<td><a href="#bytebase.v1.RunReviewRequest">RunReviewRequest</a></td>
@@ -12235,9 +12274,9 @@ mirrors RequestIssue&#39;s authorization model).</p></td>
<td><p>Triggers a review run. The slot is reset unconditionally: a RUNNING
execution is superseded (its completion is fenced off), the attempt
number is bumped, and the returned run is AVAILABLE.
-Review results are not returned by this RPC and have no read RPC yet:
-findings will surface as issue comments once the review comment
-integration lands. The returned run carries execution status only.
+Review results are not returned by this RPC: they are posted as issue
+comments. The returned run carries execution status only, and
+GetReviewRun reads it back.
The audit log is the only record of who triggered a run.
Permissions required: bb.reviewRuns.run</p></td>
</tr>
@@ -12392,6 +12431,16 @@ Permissions required: bb.reviewRuns.run</p></td>
+ <tr>
+ <td>GetReviewRun</td>
+ <td>GET</td>
+ <td>/v1/{name=projects/*/issues/*/reviewRuns/*}</td>
+ <td></td>
+ </tr>
+
+
+
+
<tr>
<td>RunReview</td>
<td>POST</td>
diff --git a/proto/v1/v1/issue_service.proto b/proto/v1/v1/issue_service.proto
index 9d8bdf3fcc..ce972523a6 100644
--- a/proto/v1/v1/issue_service.proto
+++ b/proto/v1/v1/issue_service.proto
@@ -212,12 +212,24 @@ service IssueService {
option (bytebase.v1.mcp_denial_reason) = DRIVES_THE_APPROVAL_DECISION;
}
+ // Gets the current run of one reviewer on an issue. The run carries
+ // execution status only; review results are issue comments. A reviewer
+ // that has never run on the issue is NOT_FOUND.
+ // Permissions required: bb.reviewRuns.get
+ rpc GetReviewRun(GetReviewRunRequest) returns (ReviewRun) {
+ option (google.api.http) = {get: "/v1/{name=projects/*/issues/*/reviewRuns/*}"};
+ option (google.api.method_signature) = "name";
+ option (bytebase.v1.permission) = "bb.reviewRuns.get";
+ option (bytebase.v1.auth_method) = IAM;
+ option (bytebase.v1.mcp_method_class) = READ;
+ }
+
// Triggers a review run. The slot is reset unconditionally: a RUNNING
// execution is superseded (its completion is fenced off), the attempt
// number is bumped, and the returned run is AVAILABLE.
- // Review results are not returned by this RPC and have no read RPC yet:
- // findings will surface as issue comments once the review comment
- // integration lands. The returned run carries execution status only.
+ // Review results are not returned by this RPC: they are posted as issue
+ // comments. The returned run carries execution status only, and
+ // GetReviewRun reads it back.
// The audit log is the only record of who triggered a run.
// Permissions required: bb.reviewRuns.run
rpc RunReview(RunReviewRequest) returns (ReviewRun) {
@@ -831,6 +843,15 @@ message ReviewRun {
string error = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
}
+message GetReviewRunRequest {
+ // The name of the review run to retrieve.
+ // Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun}
+ string name = 1 [
+ (google.api.field_behavior) = REQUIRED,
+ (google.api.resource_reference) = {type: "bytebase.com/ReviewRun"}
+ ];
+}
+
message RunReviewRequest {
// Format: projects/{project}/issues/{issue}/reviewRuns/{reviewRun}
string name = 1 [