Agent installation phase separation#44
Open
clkao wants to merge 8 commits intodbt-labs:mainfrom
Open
Conversation
Contributor
Author
|
I've only tested claude, oracle, none agents. |
Collaborator
|
Hey, I actually have some commits to completely remove runtime copying into container entirely, so I don't think these will be compatible. But I'll see what can be pulled from here! |
Contributor
Author
|
@RobertIsmo is that in a PR? i want to get this and #39 in (plugins might need to copy setup script, such as dbt-mcp) so let me know if there's a new api. |
- Parameterized by BASE_IMAGE and AGENT_NAME build args - Copies agent setup script from existing location - Runs installation at build time instead of runtime
- Builds both base and agent images in single compose file - Uses env vars for parameterization (DB_FLAVOR, AGENT_DIR) - Agent service depends on base to ensure build order
Agent installation now happens at Docker build time, not runtime. Only env var setup (API keys) happens at runtime. - Remove: Copy install script to container - Remove: Source install script execution - Keep: Environment variable setup (needed for API keys) - Keep: Agent execution logic This eliminates 30-60s installation overhead per task.
- Accept agent_dir and agent_type parameters - Auto-select docker-compose-agent.yaml for AbstractInstalledAgent - Set T_BENCH_DB_FLAVOR and T_BENCH_AGENT_DIR env vars - Extract db flavor from client_image_name This enables building agent images with correct parameterization.
- Add agent_dir and agent_type parameters to Terminal.__init__ - Add same parameters to spin_up_terminal context manager - Pass through to DockerComposeManager 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Create agent early in _run_trial to detect type - Check if agent is AbstractInstalledAgent subclass - Extract agent directory from module path - Pass agent_dir and agent_type to spin_up_terminal - Remove duplicate agent creation later in method This enables automatic agent image selection for installed agents. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Fix db_flavor extraction by passing it directly from the harness where
we have db_type and project_type, instead of trying to parse it from
the client_image_name which has a task-specific format.
Changes:
- Construct db_flavor as "{db_type}-{project_type}" in harness
- Add db_flavor parameter to spin_up_terminal, Terminal, and DockerComposeManager
- Use db_flavor directly in _get_agent_build_env_vars instead of parsing
This fixes the docker compose build error where it was looking for
Dockerfile.ade-bench__airbnb002__client instead of Dockerfile.duckdb-dbt
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add documentation about: - Installed agents workflow (pre-installed in Docker images) - Agent Docker images and parameterization - Environment variable usage for docker-compose 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Collaborator
|
@clkao I added a couple comments on #39, but once that's in, do we want to use this or @RobertIsmo , do you have another approach that you'd prefer and we'd need to decide between? |
Collaborator
|
@bstancil oh wow I thought I PRed this weeks ago, my bad. give me a sec. |
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.
Key Changes