Skip to content

Commit 7a52b14

Browse files
committed
fix(push): extend _api_put timeout to 60s on the post-remote-push sync
After a successful remote push, the CLI does a platform project sync via PUT /projects/{id}. This uses the default 15 s timeout which was too tight behind slow links or when the backend is warming up. Bump to 60 s for this specific call only; other PUTs keep the default. Made-with: Cursor
1 parent a9712ef commit 7a52b14

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

chipfoundry_cli/main.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,6 +1529,7 @@ def _push_remote(project_root: Optional[str], project_name: Optional[str], dry_r
15291529
_api_put(
15301530
f"/projects/{platform_id}",
15311531
{"cli_project_json": _slim_project_json(pj), "cli_sync_source": "push"},
1532+
timeout=60.0,
15321533
)
15331534
console.print("[green]✓ Platform project synced[/green]")
15341535
except SystemExit:
@@ -4238,11 +4239,17 @@ def _api_post(path: str, json_data: dict, timeout: Optional[float] = None):
42384239
client.close()
42394240

42404241

4241-
def _api_put(path: str, json_data: dict):
4242-
"""Authenticated PUT to the platform API. Returns parsed JSON or raises SystemExit."""
4242+
def _api_put(path: str, json_data: dict, timeout: Optional[float] = None):
4243+
"""Authenticated PUT to the platform API. Returns parsed JSON or raises SystemExit.
4244+
4245+
`timeout` (seconds) overrides the client default for this request only.
4246+
"""
42434247
client, _ = _api_client()
42444248
try:
4245-
resp = client.put(path, json=json_data)
4249+
kwargs = {"json": json_data}
4250+
if timeout is not None:
4251+
kwargs["timeout"] = timeout
4252+
resp = client.put(path, **kwargs)
42464253
if resp.status_code == 401:
42474254
console.print("[red]✗ API key is invalid or expired.[/red] Run [bold]cf login[/bold] to re-authenticate.")
42484255
raise SystemExit(1)

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 = "chipfoundry-cli"
3-
version = "2.3.16"
3+
version = "2.3.17"
44
description = "CLI tool to automate ChipFoundry project submission to SFTP server"
55
authors = ["ChipFoundry <marwan.abbas@chipfoundry.io>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)