Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat: refine sample project instance onboarding (#21233)
p0nye91a1a58ef55
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yamlindex 82084ab932..adba27f889 100644--- a/backend/api/mcp/gen/openapi.yaml+++ b/backend/api/mcp/gen/openapi.yaml@@ -18140,13 +18140,11 @@ components:type: booleantitle: availabledescription: Whether sample setup is currently available.- instances:- type: array- items:- type: string- title: instances+ instance:+ type: string+ title: instancedescription: |-- The provisioned sample instances.+ The provisioned sample instance.Format: instances/{instance}expireTime:title: expire_timediff --git a/backend/api/v1/actuator_service.go b/backend/api/v1/actuator_service.goindex 4f1b3a392a..6a0367436e 100644--- a/backend/api/v1/actuator_service.go+++ b/backend/api/v1/actuator_service.go@@ -125,13 +125,15 @@ func (s *ActuatorService) getServerInfo(ctx context.Context, workspaceID string)if workspaceID != "" {serverInfo.Workspace = common.FormatWorkspace(workspaceID)if s.profile.SaaS {- serverInfo.Sample.Available = s.sampleProjectInstanceManager != nil && s.sampleProjectInstanceManager.Available(ctx)sample, err := s.store.GetSampleProjectInstance(ctx, workspaceID)if err != nil {return nil, connect.NewError(connect.CodeInternal, errors.Wrap(err, "failed to get sample information"))}+ serverInfo.Sample.Available = s.sampleProjectInstanceManager != nil && s.sampleProjectInstanceManager.Available(ctx)+ if sample != nil {+ serverInfo.Sample.Instance = common.FormatInstance(sample.InstanceID)+ }if sample != nil && sample.ExpiresAt != nil && sample.DeletedAt == nil {- serverInfo.Sample.Instances = []string{common.FormatInstance(sample.InstanceID)}serverInfo.Sample.ExpireTime = timestamppb.New(*sample.ExpiresAt)}} else {diff --git a/backend/api/v1/actuator_service_test.go b/backend/api/v1/actuator_service_test.goindex 547d5618e5..88687172e6 100644--- a/backend/api/v1/actuator_service_test.go+++ b/backend/api/v1/actuator_service_test.go@@ -99,6 +99,16 @@ func TestAuthenticationInfoAndActuatorBoundary(t *testing.T) {require.NoError(t, err)authenticatedCtx := context.WithValue(ctx, common.UserContextKey, user)authenticatedCtx = context.WithValue(authenticatedCtx, common.WorkspaceIDContextKey, workspaceID)+ nonSaaSResponse, err := actuatorService.GetActuatorInfo(authenticatedCtx, connect.NewRequest(&v1pb.GetActuatorInfoRequest{}))+ require.NoError(t, err)+ require.False(t, nonSaaSResponse.Msg.Sample.Available)++ profile.SaaS = true++ availableResponse, err := actuatorService.GetActuatorInfo(authenticatedCtx, connect.NewRequest(&v1pb.GetActuatorInfoRequest{}))+ require.NoError(t, err)+ require.True(t, availableResponse.Msg.Sample.Available)+defaultProjectID, err := stores.GetDefaultProjectID(ctx, workspaceID)require.NoError(t, err)reservation, created, err := stores.ReserveSampleProjectInstance(ctx, &store.SampleProjectInstanceMessage{@@ -115,8 +125,6 @@ func TestAuthenticationInfoAndActuatorBoundary(t *testing.T) {activated, err := stores.ActivateSampleProjectInstance(ctx, workspaceID, reservation.InstanceID, reservation.ReplicaID, expiresAt)require.NoError(t, err)require.True(t, activated)- profile.SaaS = true-privateResponse, err := actuatorService.GetActuatorInfo(authenticatedCtx, connect.NewRequest(&v1pb.GetActuatorInfoRequest{}))require.NoError(t, err)require.Equal(t, "9.9.9", privateResponse.Msg.Version)@@ -124,6 +132,23 @@ func TestAuthenticationInfoAndActuatorBoundary(t *testing.T) {require.Equal(t, common.FormatWorkspace(workspaceID), privateResponse.Msg.Workspace)require.NotEmpty(t, privateResponse.Msg.DefaultProject)require.True(t, privateResponse.Msg.Sample.Available)- require.Equal(t, []string{common.FormatInstance(reservation.InstanceID)}, privateResponse.Msg.Sample.Instances)+ require.Equal(t, common.FormatInstance(reservation.InstanceID), privateResponse.Msg.Sample.Instance)require.True(t, expiresAt.Equal(privateResponse.Msg.Sample.ExpireTime.AsTime()))++ cleanupNow := expiresAt.Add(time.Second)+ cleanupResult, err := stores.WithLockedSampleProjectInstanceCleanupRecord(+ ctx,+ cleanupNow,+ cleanupNow.Add(-time.Hour),+ "",+ func(context.Context, *store.SampleProjectInstanceTx, *store.SampleProjectInstanceMessage) error {+ return nil+ },+ )+ require.NoError(t, err)+ require.True(t, cleanupResult.Found)+ deletedResponse, err := actuatorService.GetActuatorInfo(authenticatedCtx, connect.NewRequest(&v1pb.GetActuatorInfoRequest{}))+ require.NoError(t, err)+ require.True(t, deletedResponse.Msg.Sample.Available)+ require.Equal(t, common.FormatInstance(reservation.InstanceID), deletedResponse.Msg.Sample.Instance)}diff --git a/backend/api/v1/audit_redact_inventory_test.go b/backend/api/v1/audit_redact_inventory_test.goindex 94a5cef213..7818c42a53 100644--- a/backend/api/v1/audit_redact_inventory_test.go+++ b/backend/api/v1/audit_redact_inventory_test.go@@ -837,7 +837,7 @@ var auditRecordedFields = []string{"bytebase.v1.SQLReviewRule.NamingRulePayload.format","bytebase.v1.SQLReviewRule.StringArrayRulePayload.list","bytebase.v1.SQLReviewRule.StringRulePayload.value",- "bytebase.v1.SampleInfo.instances",+ "bytebase.v1.SampleInfo.instance","bytebase.v1.SavedQuery.creator","bytebase.v1.SavedQuery.database","bytebase.v1.SavedQuery.folder",diff --git a/backend/generated-go/v1/actuator_service.pb.go b/backend/generated-go/v1/actuator_service.pb.goindex c6470af5c9..fd5a29c518 100644--- a/backend/generated-go/v1/actuator_service.pb.go+++ b/backend/generated-go/v1/actuator_service.pb.go@@ -103,9 +103,9 @@ type SampleInfo struct {state protoimpl.MessageState `protogen:"open.v1"`// Whether sample setup is currently available.Available bool `protobuf:"varint,1,opt,name=available,proto3" json:"available,omitempty"`- // The provisioned sample instances.+ // The provisioned sample instance.// Format: instances/{instance}- Instances []string `protobuf:"bytes,2,rep,name=instances,proto3" json:"instances,omitempty"`+ Instance string `protobuf:"bytes,2,opt,name=instance,proto3" json:"instance,omitempty"`// The time when the provisioned sample resources expire.ExpireTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"`unknownFields protoimpl.UnknownFields@@ -149,11 +149,11 @@ func (x *SampleInfo) GetAvailable() bool {return false}-func (x *SampleInfo) GetInstances() []string {+func (x *SampleInfo) GetInstance() string {if x != nil {- return x.Instances+ return x.Instance}- return nil+ return ""}func (x *SampleInfo) GetExpireTime() *timestamppb.Timestamp {@@ -344,12 +344,12 @@ const file_v1_actuator_service_proto_rawDesc = "" +"\n" +"\x19v1/actuator_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\"\x14\n" +"\x12SetupSampleRequest\"\x18\n" +- "\x16GetActuatorInfoRequest\"\xae\x01\n" ++ "\x16GetActuatorInfoRequest\"\xac\x01\n" +"\n" +"SampleInfo\x12!\n" +- "\tavailable\x18\x01 \x01(\bB\x03\xe0A\x03R\tavailable\x12;\n" +- "\tinstances\x18\x02 \x03(\tB\x1d\xe0A\x03\xfaA\x17\n" +- "\x15bytebase.com/InstanceR\tinstances\x12@\n" ++ "\tavailable\x18\x01 \x01(\bB\x03\xe0A\x03R\tavailable\x129\n" ++ "\binstance\x18\x02 \x01(\tB\x1d\xe0A\x03\xfaA\x17\n" ++ "\x15bytebase.com/InstanceR\binstance\x12@\n" +"\vexpire_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +"expireTime\"\x92\x06\n" +"\fActuatorInfo\x12\x1d\n" +diff --git a/backend/generated-go/v1/actuator_service_equal.pb.go b/backend/generated-go/v1/actuator_service_equal.pb.goindex c3476243ec..aaabf9dc49 100644--- a/backend/generated-go/v1/actuator_service_equal.pb.go+++ b/backend/generated-go/v1/actuator_service_equal.pb.go@@ -33,14 +33,9 @@ func (x *SampleInfo) Equal(y *SampleInfo) bool {if x.Available != y.Available {return false}- if len(x.Instances) != len(y.Instances) {+ if x.Instance != y.Instance {return false}- for i := 0; i < len(x.Instances); i++ {- if x.Instances[i] != y.Instances[i] {- return false- }- }if p, q := x.ExpireTime, y.ExpireTime; (p == nil && q != nil) || (p != nil && (q == nil || p.Seconds != q.Seconds || p.Nanos != q.Nanos)) {return false}diff --git a/frontend/src/components/SampleExpirationAlert.tsx b/frontend/src/components/SampleExpirationAlert.tsxindex 7d647f32f9..349855d8eb 100644--- a/frontend/src/components/SampleExpirationAlert.tsx+++ b/frontend/src/components/SampleExpirationAlert.tsx@@ -18,7 +18,7 @@ export function SampleExpirationAlert({const expireTime = sample?.expireTime;const canonicalInstanceName = `instances/${extractInstanceResourceName(instanceName)}`;- if (!expireTime || !sample.instances.includes(canonicalInstanceName)) {+ if (!expireTime || sample.instance !== canonicalInstanceName) {return null;}diff --git a/frontend/src/components/instance/CreateInstanceView.test.tsx b/frontend/src/components/instance/CreateInstanceView.test.tsxindex bf4c6c575b..de879b53e7 100644--- a/frontend/src/components/instance/CreateInstanceView.test.tsx+++ b/frontend/src/components/instance/CreateInstanceView.test.tsx@@ -15,6 +15,8 @@ const mocks = vi.hoisted(() => ({pushNotification: vi.fn(),isSaaSMode: false,sampleAvailable: true,+ sampleInstance: "",+ totalInstanceCount: 0,instanceCountLimit: 10,activatedInstanceCount: 0,providerProps: undefined as Record<string, unknown> | undefined,@@ -62,7 +64,13 @@ vi.mock("@/stores/app", () => ({<T,>(selector: (state: Record<string, unknown>) => T) =>selector({isSaaSMode: () => mocks.isSaaSMode,- serverInfo: { sample: { available: mocks.sampleAvailable } },+ serverInfo: {+ sample: {+ available: mocks.sampleAvailable,+ instance: mocks.sampleInstance,+ },+ },+ totalInstanceCount: () => mocks.totalInstanceCount,prepareSampleProjectInstance: mocks.prepareSampleProjectInstance,}),{@@ -122,6 +130,8 @@ beforeEach(async () => {vi.clearAllMocks();mocks.isSaaSMode = false;mocks.sampleAvailable = true;+ mocks.sampleInstance = "";+ mocks.totalInstanceCount = 0;mocks.instanceCountLimit = 10;mocks.activatedInstanceCount = 0;mocks.prepareSampleProjectInstance.mockResolvedValue({@@ -368,6 +378,52 @@ describe("CreateInstanceView", () => {});});+ test("hides sample instance creation when a sample was already provisioned", () => {+ mocks.isSaaSMode = true;+ mocks.sampleInstance = "instances/sample";+ const container = document.createElement("div");+ const root = createRoot(container);++ act(() => {+ root.render(+ <CreateInstanceView+ parent="projects/demo"+ onDismiss={mocks.onDismiss}+ onCreated={mocks.onCreated}+ />+ );+ });++ expect(container.textContent).not.toContain("Use sample instance");++ act(() => {+ root.unmount();+ });+ });++ test("hides sample instance creation when the workspace has an instance", () => {+ mocks.isSaaSMode = true;+ mocks.totalInstanceCount = 1;+ const container = document.createElement("div");+ const root = createRoot(container);++ act(() => {+ root.render(+ <CreateInstanceView+ parent="projects/demo"+ onDismiss={mocks.onDismiss}+ onCreated={mocks.onCreated}+ />+ );+ });++ expect(container.textContent).not.toContain("Use sample instance");++ act(() => {+ root.unmount();+ });+ });+test("disables the sample action while preparation is running", async () => {mocks.isSaaSMode = true;let resolvePreparation: (instance: { name: string }) => void;diff --git a/frontend/src/components/instance/CreateInstanceView.tsx b/frontend/src/components/instance/CreateInstanceView.tsxindex 34a888b4a2..f246541ca4 100644--- a/frontend/src/components/instance/CreateInstanceView.tsx+++ b/frontend/src/components/instance/CreateInstanceView.tsx@@ -43,8 +43,17 @@ export function CreateInstanceView({const sampleAvailable = useAppStore((state) => state.serverInfo?.sample?.available ?? false);+ const sampleProvisioned = useAppStore(+ (state) => !!state.serverInfo?.sample?.instance+ );+ const totalInstanceCount = useAppStore((state) => state.totalInstanceCount());const canPrepareSampleProjectInstance =- isSaaSMode && sampleAvailable && !!parent && isValidProjectName(parent);+ isSaaSMode &&+ sampleAvailable &&+ !sampleProvisioned &&+ totalInstanceCount === 0 &&+ !!parent &&+ isValidProjectName(parent);// Check instance limit on mountuseEffect(() => {diff --git a/frontend/src/components/instance/InstanceDetailView.test.tsx b/frontend/src/components/instance/InstanceDetailView.test.tsxindex 151cc0350f..c217b4afa4 100644--- a/frontend/src/components/instance/InstanceDetailView.test.tsx+++ b/frontend/src/components/instance/InstanceDetailView.test.tsx@@ -51,7 +51,7 @@ const mocks = vi.hoisted(() => ({serverInfo: { defaultProject: "projects/default" } as {defaultProject: string;sample?: {- instances: string[];+ instance: string;expireTime?: { seconds: bigint; nanos: number };};},@@ -297,7 +297,7 @@ describe("InstanceDetailView", () => {mocks.serverInfo = {defaultProject: "projects/default",sample: {- instances: ["instances/prod"],+ instance: "instances/prod",expireTime: {seconds: BigInt(Math.floor(Date.now() / 1000) + 7 * 24 * 60 * 60),nanos: 0,@@ -322,7 +322,7 @@ describe("InstanceDetailView", () => {mocks.serverInfo = {defaultProject: "projects/default",sample: {- instances: ["instances/prod"],+ instance: "instances/prod",expireTime: {seconds: BigInt(Math.floor(Date.now() / 1000) - 60),nanos: 0,diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.jsonindex 2a90dbf8d0..a380463ba0 100644--- a/frontend/src/locales/en-US.json+++ b/frontend/src/locales/en-US.json@@ -3470,7 +3470,7 @@"query": "Go to SQL Editor"},"descriptions": {- "database": "Create or transfer a database into a project before querying data.",+ "database": "View an existing database in your project or a sample database, or create or transfer one when needed.","instance": "Connect an instance so Bytebase can sync your databases.","project": "Create a project to organize databases and changes.","sql-editor": "Query data in SQL Editor, or create a governed database change."@@ -3490,7 +3490,7 @@"previous-step-required": "You need to finish the previous step.","self": "Set up Bytebase","steps": {- "database": "Prepare database",+ "database": "Explore databases","instance": "Connect instance","project": "Create project","query": "Query data"diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.jsonindex 445b2d9f9a..1e788f8a02 100644--- a/frontend/src/locales/es-ES.json+++ b/frontend/src/locales/es-ES.json@@ -3470,7 +3470,7 @@"query": "Ir a SQL Editor"},"descriptions": {- "database": "Crea o transfiere una base de datos a un proyecto antes de consultar datos.",+ "database": "Consulta una base de datos existente en tu proyecto o una base de datos de ejemplo, o crea o transfiere una cuando sea necesario.","instance": "Conecta una instancia para que Bytebase pueda sincronizar tus bases de datos.","project": "Crea un proyecto para organizar bases de datos y cambios.","sql-editor": "Consulta datos en SQL Editor o crea un cambio de base de datos gobernado."@@ -3490,7 +3490,7 @@"previous-step-required": "Debes terminar el paso anterior.","self": "Configurar Bytebase","steps": {- "database": "Preparar base de datos",+ "database": "Explorar bases de datos","instance": "Conectar instancia","project": "Crear proyecto","query": "Consultar datos"diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.jsonindex 1d99934aef..6b31427721 100644--- a/frontend/src/locales/ja-JP.json+++ b/frontend/src/locales/ja-JP.json@@ -3470,7 +3470,7 @@"query": "SQL Editor に移動"},"descriptions": {- "database": "データをクエリする前に、データベースを作成するかプロジェクトに転送します。",+ "database": "プロジェクト内またはサンプルの既存データベースを確認できます。必要に応じて、データベースを作成または転送してください。","instance": "インスタンスを接続して、Bytebase がデータベースを同期できるようにします。","project": "データベースと変更を整理するプロジェクトを作成します。","sql-editor": "SQL Editor でデータをクエリするか、ガバナンス付きデータベース変更を作成します。"@@ -3490,7 +3490,7 @@"previous-step-required": "前のステップを先に完了する必要があります。","self": "Bytebase をセットアップ","steps": {- "database": "データベースを準備",+ "database": "データベースを探索","instance": "インスタンスを接続","project": "プロジェクトを作成","query": "データをクエリ"diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.jsonindex 30e86a3d81..319b43dd04 100644--- a/frontend/src/locales/vi-VN.json+++ b/frontend/src/locales/vi-VN.json@@ -3470,7 +3470,7 @@"query": "Đi tới SQL Editor"},"descriptions": {- "database": "Tạo hoặc chuyển cơ sở dữ liệu vào dự án trước khi truy vấn dữ liệu.",+ "database": "Xem cơ sở dữ liệu hiện có trong dự án hoặc cơ sở dữ liệu mẫu, hoặc tạo hay chuyển một cơ sở dữ liệu khi cần.","instance": "Kết nối instance để Bytebase có thể đồng bộ cơ sở dữ liệu của bạn.","project": "Tạo dự án để quản lý cơ sở dữ liệu và thay đổi.","sql-editor": "Truy vấn dữ liệu trong SQL Editor hoặc tạo thay đổi cơ sở dữ liệu được quản trị."@@ -3490,7 +3490,7 @@"previous-step-required": "Bạn cần hoàn thành bước trước đó.","self": "Thiết lập Bytebase","steps": {- "database": "Chuẩn bị cơ sở dữ liệu",+ "database": "Khám phá cơ sở dữ liệu","instance": "Kết nối instance","project": "Tạo dự án","query": "Truy vấn dữ liệu"diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.jsonindex e56ffc145b..1756d8eb08 100644--- a/frontend/src/locales/zh-CN.json+++ b/frontend/src/locales/zh-CN.json@@ -3470,7 +3470,7 @@"query": "前往 SQL Editor"},"descriptions": {- "database": "创建数据库或将数据库转移到项目中,然后查询数据。",+ "database": "查看项目中现有的数据库或示例数据库;如有需要,可创建或转移数据库。","instance": "连接实例,让 Bytebase 可以同步你的数据库。","project": "创建项目来管理数据库和变更。","sql-editor": "在 SQL Editor 中查询数据,或创建受管数据库变更。"@@ -3490,7 +3490,7 @@"previous-step-required": "你需要先完成上一步。","self": "设置 Bytebase","steps": {- "database": "准备数据库",+ "database": "浏览数据库","instance": "连接实例","project": "创建项目","query": "查询数据"diff --git a/frontend/src/routes/project/ProjectDatabaseDetailPage.test.tsx b/frontend/src/routes/project/ProjectDatabaseDetailPage.test.tsxindex a894c24eca..3e0bd145e7 100644--- a/frontend/src/routes/project/ProjectDatabaseDetailPage.test.tsx+++ b/frontend/src/routes/project/ProjectDatabaseDetailPage.test.tsx@@ -180,7 +180,7 @@ const mocks = vi.hoisted(() => {},serverInfo: {} as {sample?: {- instances: string[];+ instance: string;expireTime?: { seconds: bigint; nanos: number };};},@@ -553,7 +553,7 @@ describe("ProjectDatabaseDetailPage", () => {test("shows the sample expiration warning for a sample database", async () => {mocks.serverInfo = {sample: {- instances: ["instances/inst1"],+ instance: "instances/inst1",expireTime: {seconds: BigInt(Math.floor(Date.now() / 1000) + 7 * 24 * 60 * 60),nanos: 0,diff --git a/frontend/src/stores/app/instance.test.ts b/frontend/src/stores/app/instance.test.tsindex 05f74bef84..0ce88c37c1 100644--- a/frontend/src/stores/app/instance.test.ts+++ b/frontend/src/stores/app/instance.test.ts@@ -119,6 +119,7 @@ describe("instance store project parent", () => {expect(mocks.createInstance.mock.calls[0][0]).toMatchObject({parent: "projects/app",});+ expect(mocks.refreshServerInfo).toHaveBeenCalledOnce();});test("refreshes sample metadata after preparing a sample instance", async () => {diff --git a/frontend/src/stores/app/instance.ts b/frontend/src/stores/app/instance.tsindex 6bf0b3ed8a..bee46f72b3 100644--- a/frontend/src/stores/app/instance.ts+++ b/frontend/src/stores/app/instance.ts@@ -201,6 +201,9 @@ export const createInstanceSlice: AppSliceCreator<InstanceSlice> = ();if (!validateOnlyValue) {upsertInstances([response]);+ await get()+ .refreshServerInfo()+ .catch(() => undefined);}return response;},diff --git a/frontend/src/types/proto-es/v1/actuator_service_pb.d.ts b/frontend/src/types/proto-es/v1/actuator_service_pb.d.tsindex 02783fe65e..4c616f9158 100644--- a/frontend/src/types/proto-es/v1/actuator_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/actuator_service_pb.d.ts@@ -53,12 +53,12 @@ export declare type SampleInfo = Message<"bytebase.v1.SampleInfo"> & {available: boolean;/**- * The provisioned sample instances.+ * The provisioned sample instance.* Format: instances/{instance}*- * @generated from field: repeated string instances = 2;+ * @generated from field: string instance = 2;*/- instances: string[];+ instance: string;/*** The time when the provisioned sample resources expire.diff --git a/frontend/src/types/proto-es/v1/actuator_service_pb.js b/frontend/src/types/proto-es/v1/actuator_service_pb.jsindex c678c057e5..5dced538eb 100644--- a/frontend/src/types/proto-es/v1/actuator_service_pb.js+++ b/frontend/src/types/proto-es/v1/actuator_service_pb.js@@ -14,7 +14,7 @@ import { file_v1_annotation } from "./annotation_pb";* Describes the file v1/actuator_service.proto.*/export const file_v1_actuator_service = /*@__PURE__*/- fileDesc("Chl2MS9hY3R1YXRvcl9zZXJ2aWNlLnByb3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MuYnl0ZWJhc2UudjEuR2V0QWN0dWF0b3JJbmZvUmVxdWVzdBoZLmJ5dGViYXNlLnYxLkFjdHVhdG9ySW5mbyIg2kEAoOowAYLT5JMCExIRL3YxL2FjdHVhdG9yL2luZm8SjgEKC1NldHVwU2FtcGxlEh8uYnl0ZWJhc2UudjEuU2V0dXBTYW1wbGVSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5IkaK6jASYmIucHJvamVjdHMuY3JlYXRlkOowAZjqMAGg6jAEqOowCYLT5JMCGiIYL3YxL2FjdHVhdG9yOnNldHVwU2FtcGxlQqoBCg9jb20uYnl0ZWJhc2UudjFCFEFjdHVhdG9yU2VydmljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_timestamp, file_v1_annotation]);+ fileDesc("Chl2MS9hY3R1YXRvcl9zZXJ2aWNlLnByb3RvEgtieXRlYmFzZS52MSIUChJTZXR1cFNhbXBsZVJlcXVlc3QiGAoWR2V0QWN0dWF0b3JJbmZvUmVxdWVzdCKLAQoKU2FtcGxlSW5mbxIWCglhdmFpbGFibGUYASABKAhCA+BBAxIvCghpbnN0YW5jZRgCIAEoCUId4EED+kEXChVieXRlYmFzZS5jb20vSW5zdGFuY2USNAoLZXhwaXJlX3RpbWUYAyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQMisQQKDEFjdHVhdG9ySW5mbxIUCgd2ZXJzaW9uGAEgASgJQgPgQQMSFwoKZ2l0X2NvbW1pdBgCIAEoCUID4EEDEhEKBHNhYXMYBCAB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WNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_timestamp, file_v1_annotation]);/*** Describes the message bytebase.v1.SetupSampleRequest.diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 1d18260fa2..b542612aa1 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -29178,14 +29178,11 @@ components:title: availabledescription: Whether sample setup is currently available.readOnly: true- instances:- type: array- items:- type: string- readOnly: true- title: instances+ instance:+ type: string+ title: instancedescription: |-- The provisioned sample instances.+ The provisioned sample instance.Format: instances/{instance}readOnly: trueexpireTime:diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 32c7b1fece..0266519f83 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -1190,7 +1190,7 @@ SampleInfo describes sample setup availability and provisioned resources.| Field | Type | Label | Description || ----- | ---- | ----- | ----------- || available | [bool](#bool) | | Whether sample setup is currently available. |-| instances | [string](#string) | repeated | The provisioned sample instances. Format: instances/{instance} |+| instance | [string](#string) | | The provisioned sample instance. Format: instances/{instance} || expire_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | The time when the provisioned sample resources expire. |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex e82482d72c..432dd4f0d6 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -4334,10 +4334,10 @@ Format: projects/{id} </p></td></tr><tr>- <td>instances</td>+ <td>instance</td><td><a href="#string">string</a></td>- <td>repeated</td>- <td><p>The provisioned sample instances.+ <td></td>+ <td><p>The provisioned sample instance.Format: instances/{instance} </p></td></tr>diff --git a/proto/v1/v1/actuator_service.proto b/proto/v1/v1/actuator_service.protoindex 94eadf2b72..a3a4c8dead 100644--- a/proto/v1/v1/actuator_service.proto+++ b/proto/v1/v1/actuator_service.proto@@ -49,9 +49,9 @@ message SampleInfo {// Whether sample setup is currently available.bool available = 1 [(google.api.field_behavior) = OUTPUT_ONLY];- // The provisioned sample instances.+ // The provisioned sample instance.// Format: instances/{instance}- repeated string instances = 2 [+ string instance = 2 [(google.api.field_behavior) = OUTPUT_ONLY,(google.api.resource_reference) = {type: "bytebase.com/Instance"}];