Skip to content

Commit ca70ba0

Browse files
committed
Proceed with backport/rebase when build times out
This is a short term solution, in future we might rather do async builds/skip the builds completely and iterate based on CI.
1 parent ee5d4bf commit ca70ba0

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

agents/backport_agent.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,9 @@ async def run_build_agent(state):
313313
build_result = BuildOutputSchema.model_validate_json(response.last_message.text)
314314
if build_result.success:
315315
return "update_release"
316+
if build_result.is_timeout:
317+
logger.info(f"Build timed out for {state.jira_issue}, proceeding")
318+
return "update_release"
316319
state.attempts_remaining -= 1
317320
if state.attempts_remaining <= 0:
318321
state.backport_result.success = False

agents/build_agent.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ def get_instructions() -> str:
3434
using the `download_artifacts` tool to the current directory. If there are no log files,
3535
just return the error message. Otherwise, start with `builder-live.log` and try to identify
3636
the build failure. If not found, try the same with `root.log`. Summarize the findings
37-
and return them as `error`.
38-
37+
and return them as `error`. If the build failed due to a timeout, set `is_timeout` to `true` in your output.
3938
4039
General instructions:
4140

agents/rebase_agent.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,9 @@ async def run_build_agent(state):
274274
build_result = BuildOutputSchema.model_validate_json(response.last_message.text)
275275
if build_result.success:
276276
return "update_release"
277+
if build_result.is_timeout:
278+
logger.info(f"Build timed out for {state.jira_issue}, proceeding")
279+
return "update_release"
277280
state.attempts_remaining -= 1
278281
if state.attempts_remaining <= 0:
279282
state.rebase_result.success = False

common/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ class BuildOutputSchema(BaseModel):
242242
"""Output schema for the build agent."""
243243
success: bool = Field(description="Whether the build was successfully completed")
244244
error: str | None = Field(description="Specific details about an error")
245+
is_timeout: bool = Field(default=False, description="Whether the build failed due to a timeout")
245246

246247

247248
# ============================================================================

0 commit comments

Comments
 (0)