Skip to content

chore: add timeout for log following of an unresponsive run#197

Merged
socksy merged 1 commit intodevelopfrom
add-timeout-to-log-following
Mar 10, 2026
Merged

chore: add timeout for log following of an unresponsive run#197
socksy merged 1 commit intodevelopfrom
add-timeout-to-log-following

Conversation

@socksy
Copy link
Contributor

@socksy socksy commented Feb 9, 2026

This kept hanging when running the tests with a broken runner, and IMO timing out with an explicit error is better than hanging forever.

Summary by CodeRabbit

  • Bug Fixes
    • Improved run start handling with a 30-second timeout limit. The application will no longer hang indefinitely while waiting for a run to start. If a runner fails to respond within the timeout window, a clear error message is displayed indicating potential runner unavailability.

@socksy socksy changed the base branch from main to develop February 9, 2026 17:23
@tower tower deleted a comment from github-actions bot Feb 9, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 9, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c0b9ca69-e66a-4638-9643-6634f8ecafdd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The changes introduce a 30-second timeout mechanism for waiting for a run to start across multiple modules. When the timeout expires, the system either logs an error and aborts the wait or returns a new RunStartTimeout error variant, replacing unbounded polling with bounded, time-limited waiting.

Changes

Cohort / File(s) Summary
Timeout error variant
crates/tower-cmd/src/error.rs
Added RunStartTimeout variant to the public Error enum with a message indicating timeout while waiting for run to start and potential runner unavailability.
Timeout implementation
crates/tower-cmd/src/run.rs, crates/tower-cmd/src/apps.rs
Introduced RUN_START_TIMEOUT constant (30 seconds) and wrapped polling loops with timeout guards; on timeout, either returns RunStartTimeout error or logs error and aborts wait; preserves early return on successful start detection.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

A rabbit with a stopwatch bright, 🐰⏱️
Counts thirty seconds, left and right,
No endless waits forevermore,
The runner's ready, that's what's for!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a timeout mechanism for log following when a run becomes unresponsive.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-timeout-to-log-following

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Comment @coderabbitai help to get the list of available commands and usage tips.

@socksy socksy force-pushed the add-timeout-to-log-following branch from 901093e to 505558b Compare March 9, 2026 16:17
@socksy socksy merged commit 64f68e5 into develop Mar 10, 2026
30 checks passed
@socksy socksy deleted the add-timeout-to-log-following branch March 10, 2026 10:46
@coderabbitai coderabbitai bot mentioned this pull request Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants