Skip to content

[build-tools] add worker-side ssh session helper#4030

Draft
gwdp wants to merge 1 commit into
gwdp/eng-24547-eas-build-job-sshfrom
gwdp/eng-24547-build-tools-ssh-session
Draft

[build-tools] add worker-side ssh session helper#4030
gwdp wants to merge 1 commit into
gwdp/eng-24547-eas-build-job-sshfrom
gwdp/eng-24547-build-tools-ssh-session

Conversation

@gwdp

@gwdp gwdp commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Why

The worker needs a piece that starts an SSH session on the build VM and keeps the worker alive while someone is connected.

How

New helper resolves the upterm client vendored in the worker package, dials the relay, reports the connection details back so the CLI can attach, and holds on an idle timer. Redialing is bounded by a shared budget so a flapping relay can't retry forever. Connection secrets are scrubbed from logs.

Test Plan

Unit tests cover the connection parsing, secret redaction, process-liveness detection, the bounded redial budget, and the idle hold. CI passes.

@linear-code

linear-code Bot commented Jul 16, 2026

Copy link
Copy Markdown

ENG-24547

gwdp commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.36306% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (gwdp/eng-24547-eas-build-job-ssh@1277e59). Learn more about missing BASE report.

Files with missing lines Patch % Lines
packages/build-tools/src/utils/upterm.ts 98.92% 1 Missing ⚠️
Additional details and impacted files
@@                         Coverage Diff                         @@
##             gwdp/eng-24547-eas-build-job-ssh    #4030   +/-   ##
===================================================================
  Coverage                                    ?   61.15%           
===================================================================
  Files                                       ?      965           
  Lines                                       ?    42947           
  Branches                                    ?     9060           
===================================================================
  Hits                                        ?    26262           
  Misses                                      ?    16591           
  Partials                                    ?       94           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gwdp
gwdp force-pushed the gwdp/eng-24547-eas-build-job-ssh branch from 72fb902 to 25fb902 Compare July 16, 2026 19:05
@gwdp
gwdp force-pushed the gwdp/eng-24547-build-tools-ssh-session branch 3 times, most recently from a7b6154 to c9e54b9 Compare July 16, 2026 22:20
@gwdp
gwdp force-pushed the gwdp/eng-24547-eas-build-job-ssh branch from 25fb902 to 19047e6 Compare July 16, 2026 22:20
@gwdp
gwdp force-pushed the gwdp/eng-24547-build-tools-ssh-session branch from c9e54b9 to 12f0a14 Compare July 17, 2026 02:37
@gwdp
gwdp force-pushed the gwdp/eng-24547-eas-build-job-ssh branch from 19047e6 to 1277e59 Compare July 21, 2026 02:08
@gwdp
gwdp force-pushed the gwdp/eng-24547-build-tools-ssh-session branch from 12f0a14 to 12feb7a Compare July 21, 2026 02:08
@github-actions

Copy link
Copy Markdown

✅ Thank you for adding the changelog entry!

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.

1 participant