Skip to content

Commit af8fb96

Browse files
authored
fix: secrets list pagination (#74)
Fixing secrets pagination only returning 10 secrets.
1 parent eecec05 commit af8fb96

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "tensorlake"
3-
version = "0.1.41"
3+
version = "0.1.42"
44
description = "Tensorlake SDK for Document Ingestion API and Serverless Workflows"
55
authors = ["Tensorlake Inc. <[email protected]>"]
66
homepage = "https://github.com/tensorlakeai/tensorlake"

src/tensorlake/cli/secrets.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import json
21
from datetime import datetime, timezone
32
from typing import Dict, List, Tuple
43

@@ -33,7 +32,7 @@ def list(auth: AuthContext):
3332

3433
table = Table()
3534

36-
table.add_column("Name", justify="right", no_wrap=True)
35+
table.add_column("Name", no_wrap=True)
3736
table.add_column("Created At", style="green")
3837

3938
for secret in secrets:
@@ -98,7 +97,7 @@ def set(auth: AuthContext, secrets: str):
9897
resp.raise_for_status()
9998

10099
if len(upsert_secrets) == 1:
101-
click.echo(f"1 secret set")
100+
click.echo("1 secret set")
102101
else:
103102
click.echo(f"{len(upsert_secrets)} secrets set")
104103

@@ -134,7 +133,7 @@ def unset(auth: AuthContext, secret_names: str):
134133

135134
def _get_all_existing_secrets(auth: AuthContext) -> List[dict]:
136135
resp = auth.client.get(
137-
f"/platform/v1/organizations/{auth.organization_id}/projects/{auth.project_id}/secrets?limit=100"
136+
f"/platform/v1/organizations/{auth.organization_id}/projects/{auth.project_id}/secrets?pageSize=100"
138137
)
139138
resp.raise_for_status()
140139
return resp.json()["items"]

0 commit comments

Comments
 (0)