Repository navigation
Run container execute and download over exec sessions - #105
Merged
Merged
Conversation
Mark-Powers
approved these changes
Oct 26, 2026
| return zun().containers.execute(container_ref, command=command, run=True) | ||
| result = zun().containers.execute_run(container_ref, command) | ||
| output = (result.stdout + result.stderr).decode(errors="replace") | ||
| return {"output": output, "exit_code": result.returncode} |
Contributor
There was a problem hiding this comment.
We could also add a default param to split stdout and stderr.
Contributor
Author
There was a problem hiding this comment.
Agreed, I think that's easy to do in a followup with some examples.
msherman64
force-pushed
the
feat/container-exec-sessions
branch
from
October 26, 2026 19:06
5c214ef to
8cdb068
Compare
- execute returned partial output and no exit code for a command that ran longer than 5 s. - download failed after 60 s, and extracted archives without checking where files land. Use chameleon-zunclient's execute_run and copy_from, from 2025.1.2. A downloaded directory now lands in dest/<name>/, as upload puts it, instead of its contents landing directly in dest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
msherman64
force-pushed
the
feat/container-exec-sessions
branch
from
October 26, 2026 19:36
8cdb068 to
9470c0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Run
executeanddownloadover exec sessions, so long commands return all their output and exit code, and downloads aren't cut off at 60 s.Note: to preserve backwards compatibility, this merges stdout and stderr.
A new method / not backwards compatible one would look like:
we would probably also want to call decode() on stdout and stderr, and int() on returncode, so callers don't have to.
but this change still gives the reliability / no timeout benefits without breaking anything.