fix: add logs to devboxes, smoke tests & examples#755
Merged
Conversation
sid-rl
reviewed
Mar 4, 2026
tests/smoketests/sdk/test_devbox.py
Outdated
| @pytest.mark.timeout(THIRTY_SECOND_TIMEOUT) | ||
| def test_logs_basic(self, shared_devbox: Devbox) -> None: | ||
| """Test retrieving devbox logs returns valid response structure.""" | ||
| # Fetch logs - the API may return empty logs depending on timing |
Contributor
There was a problem hiding this comment.
can we do a basic echo command to ensure that the logs aren't empty?
tests/smoketests/sdk/test_devbox.py
Outdated
Comment on lines
+1072
to
+1073
| execution = shared_devbox.cmd.exec_async('echo "filtered log test"') | ||
| result = execution.result() |
Contributor
Author
There was a problem hiding this comment.
This is a great catch -- this is almost certainly caused by an issue with our agent guidance. I'm going to update this in a few places
| logs = shared_devbox.logs(execution_id=execution.execution_id) | ||
|
|
||
| assert logs is not None | ||
| assert isinstance(logs.logs, list) |
Contributor
There was a problem hiding this comment.
do we need to add hasattr(logs, "logs") protection here as well? also can we check that the actual string we echo'd is in the logs?
| logs = shared_devbox.logs(shell_name=shell_name) | ||
|
|
||
| assert logs is not None | ||
| assert isinstance(logs.logs, list) |
…ide between exec and execAsync
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.
Adds missing oo-sdk devbox
.logsmethod