Skip to content

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

chore: instances vs active instances (#16556)

Danny Xu6d82dbf0c7cb
diff --git a/backend/enterprise/license.go b/backend/enterprise/license.go
index bf390ab575..9968ad7d7d 100644
--- a/backend/enterprise/license.go
+++ b/backend/enterprise/license.go
@@ -122,7 +122,7 @@ func (s *LicenseService) IsFeatureEnabledForInstance(f v1pb.PlanFeature, instanc
// GetActivatedInstanceLimit returns the activated instance limit for the current subscription.
func (s *LicenseService) GetActivatedInstanceLimit(ctx context.Context) int {
- limit := s.LoadSubscription(ctx).InstanceCount
+ limit := s.LoadSubscription(ctx).ActiveInstances
if limit < 0 {
return math.MaxInt
}
@@ -138,15 +138,12 @@ func (s *LicenseService) GetUserLimit(ctx context.Context) int {
}
// To be compatible with old licenses which don't have seat field set in the claim.
- if subscription.SeatCount == 0 {
- return math.MaxInt
- }
-
// Unlimited seat license.
- if subscription.SeatCount < 0 {
+ if subscription.Seats <= 0 {
return math.MaxInt
}
- return int(subscription.SeatCount)
+
+ return int(subscription.Seats)
}
// GetInstanceLimit gets the instance limit value for the plan.
@@ -154,6 +151,10 @@ func (s *LicenseService) GetInstanceLimit(ctx context.Context) int {
subscription := s.LoadSubscription(ctx)
limit := instanceLimitValues[subscription.Plan]
if limit == -1 {
+ // Enterprise license.
+ if subscription.Instances > 0 {
+ return int(subscription.Instances)
+ }
limit = math.MaxInt
}
return limit
diff --git a/backend/enterprise/plugin/aws/aws.go b/backend/enterprise/plugin/aws/aws.go
index 35139fcc67..51b999da5f 100644
--- a/backend/enterprise/plugin/aws/aws.go
+++ b/backend/enterprise/plugin/aws/aws.go
@@ -102,9 +102,10 @@ func (p *Provider) LoadSubscription(ctx context.Context) *v1pb.Subscription {
}
switch *name {
case "instance":
- subscription.InstanceCount = int32(aws.ToInt64(entitlement.MaxCount))
+ subscription.ActiveInstances = int32(aws.ToInt64(entitlement.MaxCount))
+ subscription.Instances = subscription.ActiveInstances
case "seat":
- subscription.SeatCount = int32(aws.ToInt64(entitlement.MaxCount))
+ subscription.Seats = int32(aws.ToInt64(entitlement.MaxCount))
}
}
diff --git a/backend/enterprise/plugin/hub/hub.go b/backend/enterprise/plugin/hub/hub.go
index 390f5160fd..8f52cea983 100644
--- a/backend/enterprise/plugin/hub/hub.go
+++ b/backend/enterprise/plugin/hub/hub.go
@@ -31,12 +31,13 @@ type Provider struct {
// claims creates a struct that will be encoded to a JWT.
// We add jwt.RegisteredClaims as an embedded type, to provide fields such as name.
type claims struct {
- InstanceCount int `json:"instanceCount"`
- Seat int `json:"seat"`
- Trialing bool `json:"trialing"`
- Plan string `json:"plan"`
- OrgName string `json:"orgName"`
- WorkspaceID string `json:"workspaceId"`
+ ActiveInstances int `json:"instanceCount"`
+ Instances int `json:"instance"`
+ Seats int `json:"seat"`
+ Trialing bool `json:"trialing"`
+ Plan string `json:"plan"`
+ OrgName string `json:"orgName"`
+ WorkspaceID string `json:"workspaceId"`
jwt.RegisteredClaims
}
@@ -163,7 +164,9 @@ func (p *Provider) findEnterpriseLicense(ctx context.Context) (*v1pb.Subscriptio
"Load valid license",
slog.String("plan", license.Plan.String()),
slog.Time("expiresAt", license.ExpiresTime.AsTime()),
- slog.Int("instanceCount", int(license.InstanceCount)),
+ slog.Int("activeInstances", int(license.ActiveInstances)),
+ slog.Int("instances", int(license.Instances)),
+ slog.Int("seats", int(license.Seats)),
)
return license, nil
}
@@ -203,12 +206,13 @@ func (p *Provider) parseClaims(ctx context.Context, claim *claims) (*v1pb.Subscr
}
license := &v1pb.Subscription{
- InstanceCount: int32(claim.InstanceCount),
- SeatCount: int32(claim.Seat),
- ExpiresTime: expiresTime,
- Plan: planType,
- Trialing: claim.Trialing,
- OrgName: claim.OrgName,
+ ActiveInstances: int32(claim.ActiveInstances),
+ Instances: int32(claim.Instances),
+ Seats: int32(claim.Seats),
+ ExpiresTime: expiresTime,
+ Plan: planType,
+ Trialing: claim.Trialing,
+ OrgName: claim.OrgName,
}
return license, nil
diff --git a/frontend/src/store/modules/v1/subscription.ts b/frontend/src/store/modules/v1/subscription.ts
index 6198828650..b9e0f34662 100644
--- a/frontend/src/store/modules/v1/subscription.ts
+++ b/frontend/src/store/modules/v1/subscription.ts
@@ -59,7 +59,7 @@ export const useSubscriptionV1Store = defineStore("subscription_v1", {
case PlanType.FREE:
return limit;
default: {
- const seatCount = state.subscription?.seatCount ?? 0;
+ const seatCount = state.subscription?.seats ?? 0;
if (seatCount < 0) {
return Number.MAX_VALUE;
}
@@ -71,7 +71,7 @@ export const useSubscriptionV1Store = defineStore("subscription_v1", {
}
},
instanceLicenseCount(state): number {
- const count = state.subscription?.instanceCount ?? 0;
+ const count = state.subscription?.activeInstances ?? 0;
if (count < 0) {
return Number.MAX_VALUE;
}
diff --git a/frontend/src/types/proto-es/v1/subscription_service_pb.d.ts b/frontend/src/types/proto-es/v1/subscription_service_pb.d.ts
index 276f79d35e..ef0064969c 100644
--- a/frontend/src/types/proto-es/v1/subscription_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/subscription_service_pb.d.ts
@@ -44,32 +44,37 @@ export declare const UpdateSubscriptionRequestSchema: GenMessage<UpdateSubscript
*/
export declare type Subscription = Message<"bytebase.v1.Subscription"> & {
/**
- * @generated from field: int32 seat_count = 1;
+ * @generated from field: bytebase.v1.PlanType plan = 1;
*/
- seatCount: number;
+ plan: PlanType;
/**
- * @generated from field: int32 instance_count = 2;
+ * @generated from field: int32 seats = 2;
*/
- instanceCount: number;
+ seats: number;
/**
- * @generated from field: google.protobuf.Timestamp expires_time = 3;
+ * @generated from field: int32 instances = 3;
*/
- expiresTime?: Timestamp;
+ instances: number;
/**
- * @generated from field: bytebase.v1.PlanType plan = 4;
+ * @generated from field: int32 active_instances = 4;
*/
- plan: PlanType;
+ activeInstances: number;
+
+ /**
+ * @generated from field: google.protobuf.Timestamp expires_time = 5;
+ */
+ expiresTime?: Timestamp;
/**
- * @generated from field: bool trialing = 5;
+ * @generated from field: bool trialing = 6;
*/
trialing: boolean;
/**
- * @generated from field: string org_name = 6;
+ * @generated from field: string org_name = 7;
*/
orgName: string;
};
diff --git a/frontend/src/types/proto-es/v1/subscription_service_pb.js b/frontend/src/types/proto-es/v1/subscription_service_pb.js
index 90b75d314c..a412559d30 100644
--- a/frontend/src/types/proto-es/v1/subscription_service_pb.js
+++ b/frontend/src/types/proto-es/v1/subscription_service_pb.js
@@ -13,7 +13,7 @@ import { file_v1_annotation } from "./annotation_pb";
* Describes the file v1/subscription_service.proto.
*/
export const file_v1_subscription_service = /*@__PURE__*/
- fileDesc("Ch12MS9zdWJzY3JpcHRpb25fc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiGAoWR2V0U3Vic2NyaXB0aW9uUmVxdWVzdCIsChlVcGRhdGVTdWJzY3JpcHRpb25SZXF1ZXN0Eg8KB2xpY2Vuc2UYASABKAki2QEKDFN1YnNjcmlwdGlvbhIYCgpzZWF0X2NvdW50GAEgASgFQgTiQQEDEhwKDmluc3RhbmNlX2NvdW50GAIgASgFQgTiQQEDEjYKDGV4cGlyZXNfdGltZRgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXBCBOJBAQMSKQoEcGxhbhgEIAEoDjIVLmJ5dGViYXNlLnYxLlBsYW5UeXBlQgTiQQEDEhYKCHRyaWFsaW5nGAUgASgIQgTiQQEDEhYKCG9yZ19uYW1lGAYgASgJQgTiQQEDIm4KClBsYW5Db25maWcSKwoFcGxhbnMYASADKAsyHC5ieXRlYmFzZS52MS5QbGFuTGltaXRDb25maWcSMwoRaW5zdGFuY2VfZmVhdHVyZXMYAiADKA4yGC5ieXRlYmFzZS52MS5QbGFuRmVhdHVyZSKeAQoPUGxhbkxpbWl0Q29uZmlnEiMKBHR5cGUYASABKA4yFS5ieXRlYmFzZS52MS5QbGFuVHlwZRIeChZtYXhpbXVtX2luc3RhbmNlX2NvdW50GAIgASgFEhoKEm1heGltdW1fc2VhdF9jb3VudBgDIAEoBRIqCghmZWF0dXJlcxgEIAMoDjIYLmJ5dGViYXN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VFVSRV9DVVNUT01fTE9HTxBDEhUKEUZFQVRVUkVfV0FURVJNQVJLEEQSIgoeRkVBVFVSRV9ST0FETUFQX1BSSU9SSVRJWkFUSU9OEEUSFgoSRkVBVFVSRV9DVVNUT01fTVNBEEYSHQoZRkVBVFVSRV9DT01NVU5JVFlfU1VQUE9SVBBHEhkKFUZFQVRVUkVfRU1BSUxfU1VQUE9SVBBIEiYKIkZFQVRVUkVfREVESUNBVEVEX1NVUFBPUlRfV0lUSF9TTEEQSTKlAgoTU3Vic2NyaXB0aW9uU2VydmljZRJyCg9HZXRTdWJzY3JpcHRpb24SIy5ieXRlYmFzZS52MS5HZXRTdWJzY3JpcHRpb25SZXF1ZXN0GhkuYnl0ZWJhc2UudjEuU3Vic2NyaXB0aW9uIh/aQQCA6jABgtPkkwISEhAvdjEvc3Vic2NyaXB0aW9uEpkBChJVcGRhdGVTdWJzY3JpcHRpb24SJi5ieXRlYmFzZS52MS5VcGRhdGVTdWJzY3JpcHRpb25SZXF1ZXN0GhkuYnl0ZWJhc2UudjEuU3Vic2NyaXB0aW9uIkDaQQVwYXRjaIrqMA9iYi5zZXR0aW5ncy5zZXSQ6jABgtPkkwIbOgdsaWNlbnNlMhAvdjEvc3Vic2NyaXB0aW9uQjRaMmdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvcHJvdG8vZ2VuZXJhdGVkLWdvL3YxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_protobuf_timestamp, file_v1_annotation]);
+ fileDesc("Ch12MS9zdWJzY3JpcHRpb25fc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiGAoWR2V0U3Vic2NyaXB0aW9uUmVxdWVzdCIsChlVcGRhdGVTdWJzY3JpcHRpb25SZXF1ZXN0Eg8KB2xpY2Vuc2UYASABKAki7wEKDFN1YnNjcmlwdGlvbhIpCgRwbGFuGAEgASgOMhUuYnl0ZWJhc2UudjEuUGxhblR5cGVCBOJBAQMSEwo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9uEiYuYnl0ZWJhc2UudjEuVXBkYXRlU3Vic2NyaXB0aW9uUmVxdWVzdBoZLmJ5dGViYXNlLnYxLlN1YnNjcmlwdGlvbiJA2kEFcGF0Y2iK6jAPYmIuc2V0dGluZ3Muc2V0kOowAYLT5JMCGzoHbGljZW5zZTIQL3YxL3N1YnNjcmlwdGlvbkI0WjJnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL3Byb3RvL2dlbmVyYXRlZC1nby92MWIGcHJvdG8z", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_protobuf_timestamp, file_v1_annotation]);
/**
* Describes the message bytebase.v1.GetSubscriptionRequest.
diff --git a/frontend/src/types/proto/v1/subscription_service.ts b/frontend/src/types/proto/v1/subscription_service.ts
index 28c359fb62..9f1bc346f0 100644
--- a/frontend/src/types/proto/v1/subscription_service.ts
+++ b/frontend/src/types/proto/v1/subscription_service.ts
@@ -706,10 +706,11 @@ export interface UpdateSubscriptionRequest {
}
export interface Subscription {
- seatCount: number;
- instanceCount: number;
- expiresTime: Timestamp | undefined;
plan: PlanType;
+ seats: number;
+ instances: number;
+ activeInstances: number;
+ expiresTime: Timestamp | undefined;
trialing: boolean;
orgName: string;
}
@@ -831,10 +832,11 @@ export const UpdateSubscriptionRequest: MessageFns<UpdateSubscriptionRequest> =
function createBaseSubscription(): Subscription {
return {
- seatCount: 0,
- instanceCount: 0,
- expiresTime: undefined,
plan: PlanType.PLAN_TYPE_UNSPECIFIED,
+ seats: 0,
+ instances: 0,
+ activeInstances: 0,
+ expiresTime: undefined,
trialing: false,
orgName: "",
};
@@ -842,23 +844,26 @@ function createBaseSubscription(): Subscription {
export const Subscription: MessageFns<Subscription> = {
encode(message: Subscription, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
- if (message.seatCount !== 0) {
- writer.uint32(8).int32(message.seatCount);
+ if (message.plan !== PlanType.PLAN_TYPE_UNSPECIFIED) {
+ writer.uint32(8).int32(planTypeToNumber(message.plan));
}
- if (message.instanceCount !== 0) {
- writer.uint32(16).int32(message.instanceCount);
+ if (message.seats !== 0) {
+ writer.uint32(16).int32(message.seats);
}
- if (message.expiresTime !== undefined) {
- Timestamp.encode(message.expiresTime, writer.uint32(26).fork()).join();
+ if (message.instances !== 0) {
+ writer.uint32(24).int32(message.instances);
}
- if (message.plan !== PlanType.PLAN_TYPE_UNSPECIFIED) {
- writer.uint32(32).int32(planTypeToNumber(message.plan));
+ if (message.activeInstances !== 0) {
+ writer.uint32(32).int32(message.activeInstances);
+ }
+ if (message.expiresTime !== undefined) {
+ Timestamp.encode(message.expiresTime, writer.uint32(42).fork()).join();
}
if (message.trialing !== false) {
- writer.uint32(40).bool(message.trialing);
+ writer.uint32(48).bool(message.trialing);
}
if (message.orgName !== "") {
- writer.uint32(50).string(message.orgName);
+ writer.uint32(58).string(message.orgName);
}
return writer;
},
@@ -875,7 +880,7 @@ export const Subscription: MessageFns<Subscription> = {
break;
}
- message.seatCount = reader.int32();
+ message.plan = planTypeFromJSON(reader.int32());
continue;
}
case 2: {
@@ -883,15 +888,15 @@ export const Subscription: MessageFns<Subscription> = {
break;
}
- message.instanceCount = reader.int32();
+ message.seats = reader.int32();
continue;
}
case 3: {
- if (tag !== 26) {
+ if (tag !== 24) {
break;
}
- message.expiresTime = Timestamp.decode(reader, reader.uint32());
+ message.instances = reader.int32();
continue;
}
case 4: {
@@ -899,19 +904,27 @@ export const Subscription: MessageFns<Subscription> = {
break;
}
- message.plan = planTypeFromJSON(reader.int32());
+ message.activeInstances = reader.int32();
continue;
}
case 5: {
- if (tag !== 40) {
+ if (tag !== 42) {
break;
}
- message.trialing = reader.bool();
+ message.expiresTime = Timestamp.decode(reader, reader.uint32());
continue;
}
case 6: {
- if (tag !== 50) {
+ if (tag !== 48) {
+ break;
+ }
+
+ message.trialing = reader.bool();
+ continue;
+ }
+ case 7: {
+ if (tag !== 58) {
break;
}
@@ -929,10 +942,11 @@ export const Subscription: MessageFns<Subscription> = {
fromJSON(object: any): Subscription {
return {
- seatCount: isSet(object.seatCount) ? globalThis.Number(object.seatCount) : 0,
- instanceCount: isSet(object.instanceCount) ? globalThis.Number(object.instanceCount) : 0,
- expiresTime: isSet(object.expiresTime) ? fromJsonTimestamp(object.expiresTime) : undefined,
plan: isSet(object.plan) ? planTypeFromJSON(object.plan) : PlanType.PLAN_TYPE_UNSPECIFIED,
+ seats: isSet(object.seats) ? globalThis.Number(object.seats) : 0,
+ instances: isSet(object.instances) ? globalThis.Number(object.instances) : 0,
+ activeInstances: isSet(object.activeInstances) ? globalThis.Number(object.activeInstances) : 0,
+ expiresTime: isSet(object.expiresTime) ? fromJsonTimestamp(object.expiresTime) : undefined,
trialing: isSet(object.trialing) ? globalThis.Boolean(object.trialing) : false,
orgName: isSet(object.orgName) ? globalThis.String(object.orgName) : "",
};
@@ -940,18 +954,21 @@ export const Subscription: MessageFns<Subscription> = {
toJSON(message: Subscription): unknown {
const obj: any = {};
- if (message.seatCount !== 0) {
- obj.seatCount = Math.round(message.seatCount);
+ if (message.plan !== PlanType.PLAN_TYPE_UNSPECIFIED) {
+ obj.plan = planTypeToJSON(message.plan);
+ }
+ if (message.seats !== 0) {
+ obj.seats = Math.round(message.seats);
}
- if (message.instanceCount !== 0) {
- obj.instanceCount = Math.round(message.instanceCount);
+ if (message.instances !== 0) {
+ obj.instances = Math.round(message.instances);
+ }
+ if (message.activeInstances !== 0) {
+ obj.activeInstances = Math.round(message.activeInstances);
}
if (message.expiresTime !== undefined) {
obj.expiresTime = fromTimestamp(message.expiresTime).toISOString();
}
- if (message.plan !== PlanType.PLAN_TYPE_UNSPECIFIED) {
- obj.plan = planTypeToJSON(message.plan);
- }
if (message.trialing !== false) {
obj.trialing = message.trialing;
}
@@ -966,12 +983,13 @@ export const Subscription: MessageFns<Subscription> = {
},
fromPartial(object: DeepPartial<Subscription>): Subscription {
const message = createBaseSubscription();
- message.seatCount = object.seatCount ?? 0;
- message.instanceCount = object.instanceCount ?? 0;
+ message.plan = object.plan ?? PlanType.PLAN_TYPE_UNSPECIFIED;
+ message.seats = object.seats ?? 0;
+ message.instances = object.instances ?? 0;
+ message.activeInstances = object.activeInstances ?? 0;
message.expiresTime = (object.expiresTime !== undefined && object.expiresTime !== null)
? Timestamp.fromPartial(object.expiresTime)
: undefined;
- message.plan = object.plan ?? PlanType.PLAN_TYPE_UNSPECIFIED;
message.trialing = object.trialing ?? false;
message.orgName = object.orgName ?? "";
return message;
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index b11f6395c2..560cb3aa98 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -13168,11 +13168,24 @@ components:
Subscription:
type: object
properties:
- seatCount:
+ plan:
+ readOnly: true
+ enum:
+ - PLAN_TYPE_UNSPECIFIED
+ - FREE
+ - TEAM
+ - ENTERPRISE
+ type: string
+ format: enum
+ seats:
+ readOnly: true
+ type: integer
+ format: int32
+ instances:
readOnly: true
type: integer
format: int32
- instanceCount:
+ activeInstances:
readOnly: true
type: integer
format: int32
@@ -13180,15 +13193,6 @@ components:
readOnly: true
type: string
format: date-time
- plan:
- readOnly: true
- enum:
- - PLAN_TYPE_UNSPECIFIED
- - FREE
- - TEAM
- - ENTERPRISE
- type: string
- format: enum
trialing:
readOnly: true
type: boolean
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 8c705b883d..beedd047e7 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -10829,10 +10829,11 @@ PlanLimitConfig represents a single plan&#39;s configuration
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| seat_count | [int32](#int32) | | |
-| instance_count | [int32](#int32) | | |
-| expires_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
| plan | [PlanType](#bytebase-v1-PlanType) | | |
+| seats | [int32](#int32) | | |
+| instances | [int32](#int32) | | |
+| active_instances | [int32](#int32) | | |
+| expires_time | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | |
| trialing | [bool](#bool) | | |
| org_name | [string](#string) | | |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index 4eed69b8fb..2e897d27a6 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -29813,29 +29813,36 @@ Only support update the following fields for now:
<tbody>
<tr>
- <td>seat_count</td>
+ <td>plan</td>
+ <td><a href="#bytebase.v1.PlanType">PlanType</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>seats</td>
<td><a href="#int32">int32</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>instance_count</td>
+ <td>instances</td>
<td><a href="#int32">int32</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>expires_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td>active_instances</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
<td><p> </p></td>
</tr>
<tr>
- <td>plan</td>
- <td><a href="#bytebase.v1.PlanType">PlanType</a></td>
+ <td>expires_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
<td><p> </p></td>
</tr>
diff --git a/proto/generated-go/v1/subscription_service.pb.go b/proto/generated-go/v1/subscription_service.pb.go
index 24874fd85a..6887a345a5 100644
--- a/proto/generated-go/v1/subscription_service.pb.go
+++ b/proto/generated-go/v1/subscription_service.pb.go
@@ -423,15 +423,16 @@ func (x *UpdateSubscriptionRequest) GetLicense() string {
}
type Subscription struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- SeatCount int32 `protobuf:"varint,1,opt,name=seat_count,json=seatCount,proto3" json:"seat_count,omitempty"`
- InstanceCount int32 `protobuf:"varint,2,opt,name=instance_count,json=instanceCount,proto3" json:"instance_count,omitempty"`
- ExpiresTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_time,json=expiresTime,proto3" json:"expires_time,omitempty"`
- Plan PlanType `protobuf:"varint,4,opt,name=plan,proto3,enum=bytebase.v1.PlanType" json:"plan,omitempty"`
- Trialing bool `protobuf:"varint,5,opt,name=trialing,proto3" json:"trialing,omitempty"`
- OrgName string `protobuf:"bytes,6,opt,name=org_name,json=orgName,proto3" json:"org_name,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
+ state protoimpl.MessageState `protogen:"open.v1"`
+ Plan PlanType `protobuf:"varint,1,opt,name=plan,proto3,enum=bytebase.v1.PlanType" json:"plan,omitempty"`
+ Seats int32 `protobuf:"varint,2,opt,name=seats,proto3" json:"seats,omitempty"`
+ Instances int32 `protobuf:"varint,3,opt,name=instances,proto3" json:"instances,omitempty"`
+ ActiveInstances int32 `protobuf:"varint,4,opt,name=active_instances,json=activeInstances,proto3" json:"active_instances,omitempty"`
+ ExpiresTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expires_time,json=expiresTime,proto3" json:"expires_time,omitempty"`
+ Trialing bool `protobuf:"varint,6,opt,name=trialing,proto3" json:"trialing,omitempty"`
+ OrgName string `protobuf:"bytes,7,opt,name=org_name,json=orgName,proto3" json:"org_name,omitempty"`
+ unknownFields protoimpl.UnknownFields
+ sizeCache protoimpl.SizeCache
}
func (x *Subscription) Reset() {
@@ -464,32 +465,39 @@ func (*Subscription) Descriptor() ([]byte, []int) {
return file_v1_subscription_service_proto_rawDescGZIP(), []int{2}
}
-func (x *Subscription) GetSeatCount() int32 {
+func (x *Subscription) GetPlan() PlanType {
if x != nil {
- return x.SeatCount
+ return x.Plan
+ }
+ return PlanType_PLAN_TYPE_UNSPECIFIED
+}
+
+func (x *Subscription) GetSeats() int32 {
+ if x != nil {
+ return x.Seats
}
return 0
}
-func (x *Subscription) GetInstanceCount() int32 {
+func (x *Subscription) GetInstances() int32 {
if x != nil {
- return x.InstanceCount
+ return x.Instances
}
return 0
}
-func (x *Subscription) GetExpiresTime() *timestamppb.Timestamp {
+func (x *Subscription) GetActiveInstances() int32 {
if x != nil {
- return x.ExpiresTime
+ return x.ActiveInstances
}
- return nil
+ return 0
}
-func (x *Subscription) GetPlan() PlanType {
+func (x *Subscription) GetExpiresTime() *timestamppb.Timestamp {
if x != nil {
- return x.Plan
+ return x.ExpiresTime
}
- return PlanType_PLAN_TYPE_UNSPECIFIED
+ return nil
}
func (x *Subscription) GetTrialing() bool {
@@ -635,15 +643,15 @@ const file_v1_subscription_service_proto_rawDesc = "" +
"\x1dv1/subscription_service.proto\x12\vbytebase.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x13v1/annotation.proto\"\x18\n" +
"\x16GetSubscriptionRequest\"5\n" +
"\x19UpdateSubscriptionRequest\x12\x18\n" +
- "\alicense\x18\x01 \x01(\tR\alicense\"\x99\x02\n" +
- "\fSubscription\x12#\n" +
- "\n" +
- "seat_count\x18\x01 \x01(\x05B\x04\xe2A\x01\x03R\tseatCount\x12+\n" +
- "\x0einstance_count\x18\x02 \x01(\x05B\x04\xe2A\x01\x03R\rinstanceCount\x12C\n" +
- "\fexpires_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampB\x04\xe2A\x01\x03R\vexpiresTime\x12/\n" +
- "\x04plan\x18\x04 \x01(\x0e2\x15.bytebase.v1.PlanTypeB\x04\xe2A\x01\x03R\x04plan\x12 \n" +
- "\btrialing\x18\x05 \x01(\bB\x04\xe2A\x01\x03R\btrialing\x12\x1f\n" +
- "\borg_name\x18\x06 \x01(\tB\x04\xe2A\x01\x03R\aorgName\"\x87\x01\n" +
+ "\alicense\x18\x01 \x01(\tR\alicense\"\xb8\x02\n" +
+ "\fSubscription\x12/\n" +
+ "\x04plan\x18\x01 \x01(\x0e2\x15.bytebase.v1.PlanTypeB\x04\xe2A\x01\x03R\x04plan\x12\x1a\n" +
+ "\x05seats\x18\x02 \x01(\x05B\x04\xe2A\x01\x03R\x05seats\x12\"\n" +
+ "\tinstances\x18\x03 \x01(\x05B\x04\xe2A\x01\x03R\tinstances\x12/\n" +
+ "\x10active_instances\x18\x04 \x01(\x05B\x04\xe2A\x01\x03R\x0factiveInstances\x12C\n" +
+ "\fexpires_time\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampB\x04\xe2A\x01\x03R\vexpiresTime\x12 \n" +
+ "\btrialing\x18\x06 \x01(\bB\x04\xe2A\x01\x03R\btrialing\x12\x1f\n" +
+ "\borg_name\x18\a \x01(\tB\x04\xe2A\x01\x03R\aorgName\"\x87\x01\n" +
"\n" +
"PlanConfig\x122\n" +
"\x05plans\x18\x01 \x03(\v2\x1c.bytebase.v1.PlanLimitConfigR\x05plans\x12E\n" +
@@ -764,8 +772,8 @@ var file_v1_subscription_service_proto_goTypes = []any{
(*timestamppb.Timestamp)(nil), // 7: google.protobuf.Timestamp
}
var file_v1_subscription_service_proto_depIdxs = []int32{
- 7, // 0: bytebase.v1.Subscription.expires_time:type_name -> google.protobuf.Timestamp
- 0, // 1: bytebase.v1.Subscription.plan:type_name -> bytebase.v1.PlanType
+ 0, // 0: bytebase.v1.Subscription.plan:type_name -> bytebase.v1.PlanType
+ 7, // 1: bytebase.v1.Subscription.expires_time:type_name -> google.protobuf.Timestamp
6, // 2: bytebase.v1.PlanConfig.plans:type_name -> bytebase.v1.PlanLimitConfig
1, // 3: bytebase.v1.PlanConfig.instance_features:type_name -> bytebase.v1.PlanFeature
0, // 4: bytebase.v1.PlanLimitConfig.type:type_name -> bytebase.v1.PlanType
diff --git a/proto/v1/v1/subscription_service.proto b/proto/v1/v1/subscription_service.proto
index 717f344bcd..fd571e5071 100644
--- a/proto/v1/v1/subscription_service.proto
+++ b/proto/v1/v1/subscription_service.proto
@@ -48,17 +48,19 @@ enum PlanType {
}
message Subscription {
- int32 seat_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+ PlanType plan = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
- int32 instance_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+ int32 seats = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
- google.protobuf.Timestamp expires_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+ int32 instances = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
- PlanType plan = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
+ int32 active_instances = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
- bool trialing = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
+ google.protobuf.Timestamp expires_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
- string org_name = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
+ bool trialing = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+ string org_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// PlanFeature represents the available features in Bytebase
diff --git a/scripts/Dockerfile.aws b/scripts/Dockerfile.aws
index cd0579ff3d..2e7c5054ef 100644
--- a/scripts/Dockerfile.aws
+++ b/scripts/Dockerfile.aws
@@ -29,7 +29,7 @@ COPY --from=frontend /frontend-build/frontend/dist ./backend/server/dist
# -ldflags="-w -s" means omit DWARF symbol table and the symbol table and debug information
RUN CC=clang go build \
- --tags "${RELEASE},embed_frontend,docker" \
+ --tags "${RELEASE},embed_frontend,aws" \
-ldflags="-extldflags '-Wl,-z,stack-size=0x1000000' -w -s -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.version=${VERSION}' -X 'github.com/bytebase/bytebase/backend/bin/server/cmd.gitcommit=${GIT_COMMIT}'" \
-o bytebase ./backend/bin/server/main.go