Skip to content

Commit

Permalink
fix: Silent failure of DockerAgent.push_image
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine committed Jul 29, 2024
1 parent 81dcb9a commit d2e8827
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ai/backend/agent/docker/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,13 @@ async def push_image(self, image_ref: ImageRef, registry_conf: ImageRegistry) ->
}

async with closing_async(Docker()) as docker:
await docker.images.push(image_ref.canonical, auth=auth_config)
result = await docker.images.push(image_ref.canonical, auth=auth_config)

# Why is this list? It contradicts the API documentation.
result_ = cast(list, result)

if error := result_[-1].get("error"):
raise RuntimeError(f"Failed to push image: {error}")

async def pull_image(self, image_ref: ImageRef, registry_conf: ImageRegistry) -> None:
auth_config = None
Expand Down

0 comments on commit d2e8827

Please sign in to comment.