Skip to content

Commit f14e999

Browse files
authored
Fix: TS & Py versions for log pagination (#2505)
* chore: gen ts * chore: python * fix: change default * chore: regen docs
1 parent e82915b commit f14e999

File tree

14 files changed

+321
-117
lines changed

14 files changed

+321
-117
lines changed

frontend/docs/pages/sdks/python/feature-clients/logs.mdx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ List log lines for a given task run.
1919

2020
Parameters:
2121

22-
| Name | Type | Description | Default |
23-
| ------------- | ----- | ---------------------------------------- | ---------- |
24-
| `task_run_id` | `str` | The ID of the task run to list logs for. | _required_ |
22+
| Name | Type | Description | Default |
23+
| ------------- | ------------------ | ------------------------------------------------------ | ---------- |
24+
| `task_run_id` | `str` | The ID of the task run to list logs for. | _required_ |
25+
| `limit` | `int` | Maximum number of log lines to return (default: 1000). | `1000` |
26+
| `since` | `datetime \| None` | The start time to get logs for. | `None` |
27+
| `until` | `datetime \| None` | The end time to get logs for. | `None` |
2528

2629
Returns:
2730

@@ -35,9 +38,12 @@ List log lines for a given task run.
3538

3639
Parameters:
3740

38-
| Name | Type | Description | Default |
39-
| ------------- | ----- | ---------------------------------------- | ---------- |
40-
| `task_run_id` | `str` | The ID of the task run to list logs for. | _required_ |
41+
| Name | Type | Description | Default |
42+
| ------------- | ------------------ | ------------------------------------------------------ | ---------- |
43+
| `task_run_id` | `str` | The ID of the task run to list logs for. | _required_ |
44+
| `limit` | `int` | Maximum number of log lines to return (default: 1000). | `1000` |
45+
| `since` | `datetime \| None` | The start time to get logs for. | `None` |
46+
| `until` | `datetime \| None` | The end time to get logs for. | `None` |
4147

4248
Returns:
4349

sdks/python/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to Hatchet's Python SDK will be documented in this changelog
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.21.1] - 2025-11-08
9+
10+
### Changed
11+
12+
- The `list` methods for the logs client now allow for pagination via the `limit`, `since`, and `until` params.
13+
814
## [1.21.0] - 2025-10-31
915

1016
### Added

sdks/python/hatchet_sdk/features/logs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ def _la(self, client: ApiClient) -> LogApi:
1919
def list(
2020
self,
2121
task_run_id: str,
22-
limit: int = 100,
22+
limit: int = 1000,
2323
since: datetime | None = None,
2424
until: datetime | None = None,
2525
) -> V1LogLineList:
2626
"""
2727
List log lines for a given task run.
2828
2929
:param task_run_id: The ID of the task run to list logs for.
30-
:param limit: Maximum number of log lines to return (default: 100).
30+
:param limit: Maximum number of log lines to return (default: 1000).
3131
:param since: The start time to get logs for.
3232
:param until: The end time to get logs for.
3333
:return: A list of log lines for the specified task run.
@@ -40,15 +40,15 @@ def list(
4040
async def aio_list(
4141
self,
4242
task_run_id: str,
43-
limit: int = 100,
43+
limit: int = 1000,
4444
since: datetime | None = None,
4545
until: datetime | None = None,
4646
) -> V1LogLineList:
4747
"""
4848
List log lines for a given task run.
4949
5050
:param task_run_id: The ID of the task run to list logs for.
51-
:param limit: Maximum number of log lines to return (default: 100).
51+
:param limit: Maximum number of log lines to return (default: 1000).
5252
:param since: The start time to get logs for.
5353
:param until: The end time to get logs for.
5454
:return: A list of log lines for the specified task run.

sdks/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "hatchet-sdk"
3-
version = "1.21.0"
3+
version = "1.21.1"
44
description = "This is the official Python SDK for Hatchet, a distributed, fault-tolerant task queue. The SDK allows you to easily integrate Hatchet's task scheduling and workflow orchestration capabilities into your Python applications."
55
authors = [
66
"Alexander Belanger <[email protected]>",

sdks/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hatchet-dev/typescript-sdk",
3-
"version": "1.10.0",
3+
"version": "1.10.1",
44
"description": "Background task orchestration & visibility for developers",
55
"types": "dist/index.d.ts",
66
"files": [

sdks/typescript/src/clients/rest/generated/Api.ts

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

0 commit comments

Comments
 (0)