Skip to content

Commit

Permalink
Merge pull request #138 from tigrisdata/main
Browse files Browse the repository at this point in the history
Beta release
  • Loading branch information
efirs authored Oct 5, 2022
2 parents 00dfbb0 + 051779b commit f3a62a2
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 12 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@ on:
push:
branches:
- "release"
- "alpha"
- "beta"
- "main"
pull_request:
workflow_call:
secrets:
API_DEPLOY_KEY:
required: true
jobs:
lint:
runs-on: ubuntu-latest
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ on:
jobs:
lint:
uses: ./.github/workflows/lint.yaml
secrets:
API_DEPLOY_KEY: ${{ secrets.API_DEPLOY_KEY }}

release:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ lint: generate client
! which redocly || redocly lint ${PROTO_DIR}/openapi.yaml \
--extends=recommended \
--skip-rule=operation-4xx-response \
--skip-rule=no-empty-servers \
--skip-rule=tag-description

clean:
Expand Down
8 changes: 4 additions & 4 deletions server/v1/api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ message CreateOrUpdateCollectionRequest {
string collection = 2;
// The schema specifications are same as
// JSON schema specification defined <a href="https://json-schema.org/specification.html" title="here">here</a>.
// The schema of the `documents` collection differs from the schema of `messages` collection as `messages` collection does not
// The schema of the `documents` collection differs from the schema of `topic` collection as `topic` collection does not
// have any concept of `primary_key`. The server recognizes type of the collection by the `collection_type` set in
// the schema.
//<p></p>
Expand All @@ -477,7 +477,7 @@ message CreateOrUpdateCollectionRequest {
// "primary_key": ["id"]
// }`
// <p></p>*Note: The `collection_type` is not set as default is documents.*
// <p></p>Schema example of `messages`:
// <p></p>Schema example of `topic`:
// `{
// "title": "user_events",
// "description": "Topic for user events",
Expand All @@ -496,9 +496,9 @@ message CreateOrUpdateCollectionRequest {
// "type": "string"
// }
// },
// "collection_type": "messages"
// "collection_type": "topic"
// }`
// <p></p> *Note: The `collection_type` is set as "messages".*
// <p></p> *Note: The `collection_type` is set as "topic".*
bytes schema = 3;
// If set to `true` then the update schema request to the collection will fail by returning a conflict with HTTP Status
// code 409. The default is false.
Expand Down
53 changes: 53 additions & 0 deletions server/v1/observability.proto
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,33 @@ message DataPoint {
double value = 2;
}

// Request current namespace quota limits
message QuotaLimitsRequest {
}

// Contains current quota limits
message QuotaLimitsResponse {
// Number of allowed read units per second
int64 ReadUnits = 1;
// Number of allowed write units per second
int64 WriteUnits = 2;
// Maximum number of bytes allowed to store
int64 StorageSize = 3;
}

// Request current namespace quota usage
message QuotaUsageRequest {
}

// Contains current quota usage
message QuotaUsageResponse {
// Number of read units used per second
int64 ReadUnits = 1;
// Number of write units used per second
int64 WriteUnits = 2;
// Number of bytes stored
int64 StorageSize = 3;
}

message GetInfoRequest {
}
Expand All @@ -179,6 +206,32 @@ service Observability {
};
}

// Returns current namespace quota limits
rpc QuotaLimits(QuotaLimitsRequest)
returns (QuotaLimitsResponse) {
option (google.api.http) = {
post : "/v1/observability/quota/limits"
body : "*"
};
option (openapi.v3.operation) = {
summary : "Queries current namespace quota limits"
tags : "Observability"
};
}

// Returns current namespace quota limits
rpc QuotaUsage(QuotaUsageRequest)
returns (QuotaUsageResponse) {
option (google.api.http) = {
post : "/v1/observability/quota/usage"
body : "*"
};
option (openapi.v3.operation) = {
summary : "Queries current namespace quota usage"
tags : "Observability"
};
}

// Provides the information about the server. This information includes returning the server version, etc.
rpc GetInfo(GetInfoRequest) returns
(GetInfoResponse) {
Expand Down
94 changes: 93 additions & 1 deletion server/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,58 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/Status'
/v1/observability/quota/limits:
post:
tags:
- Observability
summary: Queries current namespace quota limits
description: Returns current namespace quota limits
operationId: Observability_QuotaLimits
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/QuotaLimitsRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/QuotaLimitsResponse'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
/v1/observability/quota/usage:
post:
tags:
- Observability
summary: Queries current namespace quota usage
description: Returns current namespace quota limits
operationId: Observability_QuotaUsage
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/QuotaUsageRequest'
required: true
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/QuotaUsageResponse'
default:
description: Default error response
content:
application/json:
schema:
$ref: '#/components/schemas/Status'
components:
schemas:
AdditionalFunction:
Expand Down Expand Up @@ -1244,7 +1296,7 @@ components:
properties:
schema:
type: object
description: 'The schema specifications are same as JSON schema specification defined <a href="https://json-schema.org/specification.html" title="here">here</a>. The schema of the `documents` collection differs from the schema of `messages` collection as `messages` collection does not have any concept of `primary_key`. The server recognizes type of the collection by the `collection_type` set in the schema.<p></p> Schema example of `documents`: `{ "title": "user", "description": "Collection of documents with details of users", "properties": { "id": { "description": "A unique identifier for the user", "type": "integer" }, "name": { "description": "Name of the user", "type": "string", "maxLength": 100 }, "balance": { "description": "User account balance", "type": "number" } }, "primary_key": ["id"] }` <p></p>*Note: The `collection_type` is not set as default is documents.* <p></p>Schema example of `messages`: `{ "title": "user_events", "description": "Topic for user events", "properties": { "event_id": { "description": "A id for the event", "type": "integer" }, "event_type": { "description": "Type of the Event", "type": "string", "maxLength": 100 } "event_details": { "description": "Details about the Event", "type": "string" } }, "collection_type": "messages" }` <p></p> *Note: The `collection_type` is set as "messages".*'
description: 'The schema specifications are same as JSON schema specification defined <a href="https://json-schema.org/specification.html" title="here">here</a>. The schema of the `documents` collection differs from the schema of `topic` collection as `topic` collection does not have any concept of `primary_key`. The server recognizes type of the collection by the `collection_type` set in the schema.<p></p> Schema example of `documents`: `{ "title": "user", "description": "Collection of documents with details of users", "properties": { "id": { "description": "A unique identifier for the user", "type": "integer" }, "name": { "description": "Name of the user", "type": "string", "maxLength": 100 }, "balance": { "description": "User account balance", "type": "number" } }, "primary_key": ["id"] }` <p></p>*Note: The `collection_type` is not set as default is documents.* <p></p>Schema example of `topic`: `{ "title": "user_events", "description": "Topic for user events", "properties": { "event_id": { "description": "A id for the event", "type": "integer" }, "event_type": { "description": "Type of the Event", "type": "string", "maxLength": 100 } "event_details": { "description": "Details about the Event", "type": "string" } }, "collection_type": "topic" }` <p></p> *Note: The `collection_type` is set as "topic".*'
only_create:
type: boolean
description: If set to `true` then the update schema request to the collection will fail by returning a conflict with HTTP Status code 409. The default is false.
Expand Down Expand Up @@ -1780,6 +1832,46 @@ components:
items:
$ref: '#/components/schemas/MetricSeries'
description: QueryTimeSeriesMetric responds with this type.
QuotaLimitsRequest:
type: object
properties: {}
description: Request current namespace quota limits
QuotaLimitsResponse:
type: object
properties:
ReadUnits:
type: integer
description: Number of allowed read units per second
format: int64
WriteUnits:
type: integer
description: Number of allowed write units per second
format: int64
StorageSize:
type: integer
description: Maximum number of bytes allowed to store
format: int64
description: Contains current quota limits
QuotaUsageRequest:
type: object
properties: {}
description: Request current namespace quota usage
QuotaUsageResponse:
type: object
properties:
ReadUnits:
type: integer
description: Number of read units used per second
format: int64
WriteUnits:
type: integer
description: Number of write units used per second
format: int64
StorageSize:
type: integer
description: Number of bytes stored
format: int64
description: Contains current quota usage
ReadRequest:
type: object
properties:
Expand Down

0 comments on commit f3a62a2

Please sign in to comment.