-
Notifications
You must be signed in to change notification settings - Fork 8
Fix timeout when reusing older Brancher nodes #186
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
Draft
Copilot
wants to merge
7
commits into
master
Choose a base branch
from
copilot/fix-brancher-node-reuse-issue
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
- Extract SSH reachability check into reusable method checkSshReachability() - Add waitForReusedAvailability() method that checks SSH first - Refactor waitForAvailability() to use internal method - Update DeployRunner to use waitForReusedAvailability() for reused Branchers - When reusing old Branchers, SSH is checked first to avoid 404 errors on missing logbook flows Co-authored-by: tdgroot <1165302+tdgroot@users.noreply.github.com>
- Allocate 50% of timeout for initial SSH check to leave time for fallback - Adjust remaining timeout based on time spent on SSH check - Fix time elapsed calculation to use start time instead of incremental approach Co-authored-by: tdgroot <1165302+tdgroot@users.noreply.github.com>
- Remove unnecessary empty line in checkSshReachability loop - Add REUSED_SSH_CHECK_TIMEOUT_RATIO constant for timeout allocation Co-authored-by: tdgroot <1165302+tdgroot@users.noreply.github.com>
- Only sleep if there's enough time remaining for another check - Avoid wasting timeout on unnecessary sleeps near the timeout boundary Co-authored-by: tdgroot <1165302+tdgroot@users.noreply.github.com>
Co-authored-by: tdgroot <1165302+tdgroot@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix reusing older brancher node to prevent errors
Fix timeout when reusing older Brancher nodes
Jan 7, 2026
tdgroot
requested changes
Jan 7, 2026
| ); | ||
|
|
||
| // Allocate a portion of timeout for initial SSH check to leave time for fallback | ||
| $sshCheckTimeout = (int) ($timeout * self::REUSED_SSH_CHECK_TIMEOUT_RATIO); |
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for fancy calculation, just try this for 10 seconds.
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 7e30c4b - simplified to use a fixed 10-second timeout for the initial SSH check.
Replace percentage-based timeout calculation with fixed 10-second timeout for initial SSH check on reused Branchers, as suggested by @tdgroot Co-authored-by: tdgroot <1165302+tdgroot@users.noreply.github.com>
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.
Reused Branchers older than ~1 week no longer have
ensure_app/ensure_copied_appflows in their logbook, causing 404s until timeout.Changes
waitForReusedAvailability()method attempts SSH connectivity before checking logbook flowscheckSshReachability()method consolidates SSH polling logic with proper timeout trackingFlow
Before (all Branchers):
ensure_app/ensure_copied_appflows → 404s on old BranchersAfter (reused Branchers only):
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.