Repository navigation
fix(task): task run, run-batch and the local runner tear down what a run deployed #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
55ae266
fix(task): task run, run-batch and the local runner tear down what a …
earakely-scale 435b10c
Tear down what finished runs kept when Ctrl-C ends the rest, let a te…
earakely-scale a13f30c
Bound stop()'s wait on a teardown, and keep a kept failed run's own e…
earakely-scale 9827aff
Bound each run's teardown from when it starts, and name the waits
earakely-scale 3ec3b33
Bound stop() for a run that never reaches its teardown
earakely-scale 2a5bfbc
Tear down what a run stop() gives up on has recorded
earakely-scale 7cd0cef
Keep a run stop() gave up on from tearing itself down too, and report…
earakely-scale a14f40d
Let an abandoned run tear down what stop() didn't, once stop()'s clea…
earakely-scale File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| """How a command reports what tearing a run down did.""" | ||
|
|
||
| import click | ||
|
|
||
| from agent_env.task.teardown import TeardownReport, kind | ||
|
|
||
|
|
||
| def echo_teardown(tag: str, report: TeardownReport) -> None: | ||
| prefix = f"{tag} " if tag else "" | ||
| if report.terminated: | ||
| n = len(report.terminated) | ||
| click.echo(click.style(f"{prefix}Tore down {n} sandbox{'es' if n != 1 else ''}", fg="blue")) | ||
| for sandbox, why in report.failed: | ||
| click.echo(click.style(f"{prefix}Couldn't tear down {sandbox.sandbox_id}: {why}", fg="red")) | ||
| for sandbox in report.left: | ||
| click.echo(click.style(f"{prefix}Still up: {sandbox.sandbox_id} ({kind(sandbox)})", fg="red")) |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.