@@ -329,18 +329,11 @@ def build_upgrade_hook_image(build_configuration: ImageBuildConfiguration):
329329
330330
331331def build_agent (build_configuration : ImageBuildConfiguration ):
332- """
333- Build the agent image(s).
334-
335- Requires explicit agent selection via one of:
336- 1. Explicit version: --version and --tools-version
337- 2. All agents: --all-agents flag
338- 3. Currently used agents: --current-agents flag
339- """
332+ """Build the agent image(s). Validation happens in pipeline.py."""
340333 if build_configuration .version and build_configuration .agent_tools_version :
341334 agent_versions_to_build = [(build_configuration .version , build_configuration .agent_tools_version )]
342335 logger .info (
343- f"building explicit agent version: { build_configuration .version } with tools { build_configuration .agent_tools_version } "
336+ f"building agent { build_configuration .version } with tools { build_configuration .agent_tools_version } "
344337 )
345338 elif build_configuration .all_agents :
346339 agent_versions_to_build = get_all_agents_for_rebuild ()
@@ -349,12 +342,7 @@ def build_agent(build_configuration: ImageBuildConfiguration):
349342 agent_versions_to_build = get_currently_used_agents ()
350343 logger .info ("building currently used agents" )
351344 else :
352- raise ValueError (
353- "Agent build requires explicit selection. Use one of:\n "
354- " --version <ver> --agent-tools-version <tools_ver> (for specific agent)\n "
355- " --all-agents (for all agents in release.json)\n "
356- " --current-agents (for currently used agents)"
357- )
345+ raise ValueError ("No agent selection provided - this should be caught by pipeline.py validation" )
358346
359347 if not agent_versions_to_build :
360348 logger .warning ("No agent versions found to build" )
0 commit comments