Skip to content

Commit e044bab

Browse files
committed
fix: incorrect non-stream log processing in podman
Signed-off-by: thxCode <[email protected]>
1 parent 896c27d commit e044bab

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

gpustack_runtime/deployer/podman.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,6 +1736,11 @@ def _logs(
17361736
msg = f"Failed to fetch logs for container {container.name} of workload {name}{_detail_api_call_error(e)}"
17371737
raise OperationError(msg) from e
17381738
else:
1739+
if not follow:
1740+
result = bytearray()
1741+
for chunk in output:
1742+
result.extend(chunk)
1743+
return result.decode("utf-8")
17391744
return output
17401745

17411746
@_supported
@@ -1941,6 +1946,11 @@ def _endoscopic_logs(
19411946
msg = f"Failed to fetch logs for self Container {self_container.short_id}{_detail_api_call_error(e)}"
19421947
raise OperationError(msg) from e
19431948
else:
1949+
if not follow:
1950+
result = bytearray()
1951+
for chunk in output:
1952+
result.extend(chunk)
1953+
return result.decode("utf-8")
19441954
return output
19451955

19461956
def _endoscopic_exec(

0 commit comments

Comments
 (0)