Skip to content

Commit 78cd122

Browse files
author
Toni Reina
committed
Resolve TODO items and address PR feedback
1 parent 507a446 commit 78cd122

9 files changed

Lines changed: 594 additions & 458 deletions

File tree

gen/go/qdrant/cloud/monitoring/v1/monitoring.pb.go

Lines changed: 282 additions & 271 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/openapiv2/qdrant/cloud/monitoring/v1/monitoring.swagger.json

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,6 @@
6464
"required": false,
6565
"type": "string",
6666
"format": "date-time"
67-
},
68-
{
69-
"name": "limit",
70-
"description": "Maximum number of events to return.\nIf omitted, Defaults to 100.",
71-
"in": "query",
72-
"required": false,
73-
"type": "integer",
74-
"format": "int64"
7567
}
7668
],
7769
"tags": [
@@ -111,6 +103,22 @@
111103
"in": "path",
112104
"required": true,
113105
"type": "string"
106+
},
107+
{
108+
"name": "since",
109+
"description": "Optional start time for the logs query.\nIf omitted, defaults to 3 days ago.",
110+
"in": "query",
111+
"required": false,
112+
"type": "string",
113+
"format": "date-time"
114+
},
115+
{
116+
"name": "until",
117+
"description": "Optional end time for the logs query.\nIf omitted, defaults to current time.",
118+
"in": "query",
119+
"required": false,
120+
"type": "string",
121+
"format": "date-time"
114122
}
115123
],
116124
"tags": [
@@ -382,17 +390,13 @@
382390
"v1GetClusterEventsResponse": {
383391
"type": "object",
384392
"properties": {
385-
"status": {
386-
"type": "string",
387-
"description": "TODO do we really need this status? In case it is != success, we could return an error."
388-
},
389393
"items": {
390394
"type": "array",
391395
"items": {
392396
"type": "object",
393397
"$ref": "#/definitions/v1LogEntry"
394398
},
395-
"description": "TODO The current response has more fields that we don't really use, that's why I simplified it to use LogEntry."
399+
"description": "A list of entries representing events that have happened in the cluster."
396400
}
397401
},
398402
"title": "GetClusterEventsRequest is the response from the GetClusterEvents function"
@@ -508,7 +512,7 @@
508512
"properties": {
509513
"interval": {
510514
"type": "string",
511-
"title": "TODO which unit do they represent? minutes? Also, can we change them to int?\ne.g. \"1\", \"5\", \"60\""
515+
"description": "The duration of the interval."
512516
},
513517
"value": {
514518
"type": "number",
@@ -544,7 +548,7 @@
544548
"value": {
545549
"type": "number",
546550
"format": "double",
547-
"description": "Numerical value of the metric at the given timestamp.\n\nTODO can we add a unit or metric type ?"
551+
"description": "Numerical value of the metric at the given timestamp."
548552
}
549553
},
550554
"description": "A single metric data point."
@@ -553,13 +557,13 @@
553557
"type": "object",
554558
"properties": {
555559
"value": {
556-
"type": "string",
557-
"description": "TODO do we want to keep it as string? we could use a double.\nValue of the resource, e.g., \"0.5\"."
560+
"type": "number",
561+
"format": "double",
562+
"description": "Value of the resource, e.g., 0.5."
558563
},
559564
"unit": {
560565
"type": "string",
561-
"description": "e.g., \"vcpu/core\"",
562-
"title": "Unit of the resource value, e.g., \"vcpu/core\".\nTODO we could have an enum with units?"
566+
"description": "Unit of the resource value, e.g., \"vcpu/core\"."
563567
}
564568
},
565569
"description": "ResourceValue represents the total value of a resource along with its unit."

gen/python/qdrant/cloud/monitoring/v1/monitoring_pb2.py

Lines changed: 36 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gen/python/qdrant/cloud/monitoring/v1/monitoring_pb2.pyi

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from buf.validate import validate_pb2 as _validate_pb2
22
from google.api import annotations_pb2 as _annotations_pb2
3+
from google.protobuf import duration_pb2 as _duration_pb2
34
from google.protobuf import timestamp_pb2 as _timestamp_pb2
45
from qdrant.cloud.common.v1 import common_pb2 as _common_pb2
56
from google.protobuf.internal import containers as _containers
@@ -74,12 +75,16 @@ class GetClusterUsageMetricsResponse(_message.Message):
7475
def __init__(self, cpu: _Optional[_Iterable[_Union[Metric, _Mapping]]] = ..., ram: _Optional[_Iterable[_Union[Metric, _Mapping]]] = ..., ram_cache: _Optional[_Iterable[_Union[Metric, _Mapping]]] = ..., ram_rss: _Optional[_Iterable[_Union[Metric, _Mapping]]] = ..., ram_qdrant_rss: _Optional[_Iterable[_Union[Metric, _Mapping]]] = ..., disk: _Optional[_Iterable[_Union[Metric, _Mapping]]] = ..., rps: _Optional[_Iterable[_Union[Metric, _Mapping]]] = ..., latency: _Optional[_Iterable[_Union[Metric, _Mapping]]] = ..., nodes: _Optional[_Iterable[_Union[ClusterNodeUsageMetrics, _Mapping]]] = ...) -> None: ...
7576

7677
class GetClusterLogsRequest(_message.Message):
77-
__slots__ = ("account_id", "cluster_id")
78+
__slots__ = ("account_id", "cluster_id", "since", "until")
7879
ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int]
7980
CLUSTER_ID_FIELD_NUMBER: _ClassVar[int]
81+
SINCE_FIELD_NUMBER: _ClassVar[int]
82+
UNTIL_FIELD_NUMBER: _ClassVar[int]
8083
account_id: str
8184
cluster_id: str
82-
def __init__(self, account_id: _Optional[str] = ..., cluster_id: _Optional[str] = ...) -> None: ...
85+
since: _timestamp_pb2.Timestamp
86+
until: _timestamp_pb2.Timestamp
87+
def __init__(self, account_id: _Optional[str] = ..., cluster_id: _Optional[str] = ..., since: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., until: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
8388

8489
class GetClusterLogsResponse(_message.Message):
8590
__slots__ = ("items",)
@@ -88,26 +93,22 @@ class GetClusterLogsResponse(_message.Message):
8893
def __init__(self, items: _Optional[_Iterable[_Union[LogEntry, _Mapping]]] = ...) -> None: ...
8994

9095
class GetClusterEventsRequest(_message.Message):
91-
__slots__ = ("account_id", "cluster_id", "since", "until", "limit")
96+
__slots__ = ("account_id", "cluster_id", "since", "until")
9297
ACCOUNT_ID_FIELD_NUMBER: _ClassVar[int]
9398
CLUSTER_ID_FIELD_NUMBER: _ClassVar[int]
9499
SINCE_FIELD_NUMBER: _ClassVar[int]
95100
UNTIL_FIELD_NUMBER: _ClassVar[int]
96-
LIMIT_FIELD_NUMBER: _ClassVar[int]
97101
account_id: str
98102
cluster_id: str
99103
since: _timestamp_pb2.Timestamp
100104
until: _timestamp_pb2.Timestamp
101-
limit: int
102-
def __init__(self, account_id: _Optional[str] = ..., cluster_id: _Optional[str] = ..., since: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., until: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., limit: _Optional[int] = ...) -> None: ...
105+
def __init__(self, account_id: _Optional[str] = ..., cluster_id: _Optional[str] = ..., since: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., until: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
103106

104107
class GetClusterEventsResponse(_message.Message):
105-
__slots__ = ("status", "items")
106-
STATUS_FIELD_NUMBER: _ClassVar[int]
108+
__slots__ = ("items",)
107109
ITEMS_FIELD_NUMBER: _ClassVar[int]
108-
status: str
109110
items: _containers.RepeatedCompositeFieldContainer[LogEntry]
110-
def __init__(self, status: _Optional[str] = ..., items: _Optional[_Iterable[_Union[LogEntry, _Mapping]]] = ...) -> None: ...
111+
def __init__(self, items: _Optional[_Iterable[_Union[LogEntry, _Mapping]]] = ...) -> None: ...
111112

112113
class ClusterNodeMetrics(_message.Message):
113114
__slots__ = ("node_id", "cpu", "ram", "ram_cache", "ram_rss", "ram_qdrant_rss", "disk")
@@ -139,17 +140,17 @@ class IntervalAverage(_message.Message):
139140
__slots__ = ("interval", "value")
140141
INTERVAL_FIELD_NUMBER: _ClassVar[int]
141142
VALUE_FIELD_NUMBER: _ClassVar[int]
142-
interval: str
143+
interval: _duration_pb2.Duration
143144
value: float
144-
def __init__(self, interval: _Optional[str] = ..., value: _Optional[float] = ...) -> None: ...
145+
def __init__(self, interval: _Optional[_Union[_duration_pb2.Duration, _Mapping]] = ..., value: _Optional[float] = ...) -> None: ...
145146

146147
class ResourceValue(_message.Message):
147148
__slots__ = ("value", "unit")
148149
VALUE_FIELD_NUMBER: _ClassVar[int]
149150
UNIT_FIELD_NUMBER: _ClassVar[int]
150-
value: str
151+
value: float
151152
unit: str
152-
def __init__(self, value: _Optional[str] = ..., unit: _Optional[str] = ...) -> None: ...
153+
def __init__(self, value: _Optional[float] = ..., unit: _Optional[str] = ...) -> None: ...
153154

154155
class ClusterNodeUsageMetrics(_message.Message):
155156
__slots__ = ("node_id", "cpu", "ram", "ram_cache", "ram_rss", "ram_qdrant_rss", "disk")

0 commit comments

Comments
 (0)