Skip to content

Commit 137e766

Browse files
committed
Merge branch 'release/14.7'
2 parents 5d91518 + 39418a3 commit 137e766

16 files changed

Lines changed: 816 additions & 70 deletions

HISTORY.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@ Changelog
22
==========
33

44

5+
14.7.2 (2026-07-13)
6+
-------------------
7+
8+
* Initial release for DSS 14.7.2
9+
10+
14.7.1 (2026-07-13)
11+
-------------------
12+
13+
* Initial release for DSS 14.7.1
14+
15+
14.7.0 (2026-06-18)
16+
-------------------
17+
18+
* Initial release for DSS 14.7.0
19+
20+
14.6.2 (2026-06-15)
21+
-------------------
22+
23+
* Initial release for DSS 14.6.2
24+
25+
14.6.1 (2026-06-05)
26+
-------------------
27+
28+
* Initial release for DSS 14.6.1
29+
530
14.6.0 (2026-05-27)
631
-------------------
732

dataikuapi/dss/admin.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def to_connection(self):
2727
2828
:rtype: :class:`DSSConnection`
2929
"""
30-
return DSSConnection(self.client, self["name"])
30+
return DSSConnection(self.client, self.name)
3131

3232
@property
3333
def name(self):
@@ -36,6 +36,8 @@ def name(self):
3636
3737
:rtype: string
3838
"""
39+
if "name" in self:
40+
return self["name"]
3941
return self["id"]
4042

4143
@property
@@ -46,6 +48,8 @@ def type(self):
4648
:return: a DSS connection type, like PostgreSQL, EC2, Azure, ...
4749
:rtype: string
4850
"""
51+
if "type" in self:
52+
return self["type"]
4953
return self["label"]
5054

5155
class DSSConnectionInfo(dict):
@@ -702,6 +706,11 @@ def get_client_as(self):
702706
extra_headers={"X-DKU-ProxyUser": self.login}, client_certificate=self.client._session.cert)
703707
client_as._session.verify = self.client._session.verify
704708
return client_as
709+
elif self.client.jwt_bearer_token is not None:
710+
client_as = DSSClient(self.client.host, jwt_bearer_token = self.client.jwt_bearer_token,
711+
extra_headers={"X-DKU-ProxyUser": self.login}, client_certificate=self.client._session.cert)
712+
client_as._session.verify = self.client._session.verify
713+
return client_as
705714
else:
706715
raise ValueError("Don't know how to proxy this client")
707716

dataikuapi/dss/agent.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,51 @@ def wake_up(self, version_id=None):
354354
"versionId": version_id
355355
})
356356

357+
def get_metrics_series(self, from_timestamp_ms=None, to_timestamp_ms=None, aggregation="MINUTE", timezone=None):
358+
"""
359+
Get the operational metrics series for this agent.
360+
361+
The returned payload may include the ongoing interval for the requested granularity.
362+
As a consequence, the latest datapoint is temporarily inconsistent and may evolve
363+
as more raw events are flushed and aggregated at read time.
364+
The requested time window is aligned to the bucket boundaries of the selected
365+
aggregation before being read.
366+
367+
:param int from_timestamp_ms: Beginning of the requested window, inclusive, as an
368+
epoch timestamp in milliseconds. The effective lower bound is rounded down
369+
to the start of its bucket. Optional, defaults to the oldest retained
370+
timestamp available for the requested aggregation.
371+
:param int to_timestamp_ms: End of the requested window, exclusive, as an epoch
372+
timestamp in milliseconds. The effective upper bound is rounded up to the
373+
next bucket boundary when it falls inside a bucket.
374+
Optional, defaults to the current time when omitted.
375+
:param str aggregation: Aggregation granularity. Supported values are ``MINUTE``,
376+
``FIVE_MINUTES``, ``HOUR``, ``DAY`` and ``MONTH``.
377+
:param str timezone: Timezone used to align bucket boundaries. Optional,
378+
defaults to ``UTC``. Can be a timezone name like ``Europe/Paris``.
379+
:return: The list of datapoints. Each datapoint contains a ``timestampMs``
380+
expressed as the start timestamp of its bucket in epoch
381+
milliseconds. For example, with ``HOUR`` aggregation, a datapoint
382+
at ``18:00`` represents the interval ``[18:00, 19:00)``.
383+
:rtype: list[dict]
384+
"""
385+
if from_timestamp_ms is not None and not isinstance(from_timestamp_ms, int):
386+
raise TypeError("Expected int for from_timestamp_ms, got %s" % type(from_timestamp_ms).__name__)
387+
if to_timestamp_ms is not None and not isinstance(to_timestamp_ms, int):
388+
raise TypeError("Expected int for to_timestamp_ms, got %s" % type(to_timestamp_ms).__name__)
389+
if timezone is not None and not isinstance(timezone, str):
390+
raise TypeError("Expected str for timezone, got %s" % type(timezone).__name__)
391+
392+
return self.client._perform_json(
393+
"GET", "/projects/%s/agents/%s/operational-metrics/series" % (self.project_key, self.id),
394+
params={
395+
"fromTimestampMs": from_timestamp_ms,
396+
"toTimestampMs": to_timestamp_ms,
397+
"aggregation": aggregation,
398+
"timezone": timezone
399+
}
400+
)
401+
357402

358403
class DSSAgentSettings(DSSTaggableObjectSettings):
359404
"""

0 commit comments

Comments
 (0)