Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds Dev Tunnels–based remote connectivity for debugger (DAP) jobs by extending the job message contract with tunnel details and updating the worker-side debugger startup to bind to the tunnel-provided port and start a tunnel relay.
Changes:
- Extend
AgentJobRequestMessagewithDebuggerTunnelpayload deserialization (tunnel ID/cluster/token/port) and add theDebuggerTunnelInfocontract type. - Replace
GlobalContext.EnableDebuggerwith a consolidatedDebuggerConfig(enabled + tunnel info) and update debugger enablement checks accordingly. - Update
DapDebuggerto require a valid tunnel config, bind to the tunnel port, and start/stop a Dev Tunnel relay; adjust L0 tests to use the new config model.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Test/L0/Worker/DapDebuggerL0.cs | Updates L0 tests to use tunnel-based debugger config and skips relay during unit tests. |
| src/Test/L0/Sdk/RSWebApi/AgentJobRequestMessageL0.cs | Adds deserialization tests for the new DebuggerTunnel payload. |
| src/Sdk/DTPipelines/Pipelines/DebuggerTunnelInfo.cs | Introduces the tunnel info DataContract used in job messages. |
| src/Sdk/DTPipelines/Pipelines/AgentJobRequestMessage.cs | Adds DebuggerTunnel DataMember to the job request message. |
| src/Runner.Worker/Runner.Worker.csproj | Adds Microsoft.DevTunnels.Connections dependency for relay hosting. |
| src/Runner.Worker/JobRunner.cs | Switches debugger enablement check to Global.Debugger?.Enabled. |
| src/Runner.Worker/GlobalContext.cs | Replaces EnableDebugger with DebuggerConfig Debugger. |
| src/Runner.Worker/ExecutionContext.cs | Populates Global.Debugger from EnableDebugger + DebuggerTunnel in the acquire response. |
| src/Runner.Worker/Dap/DebuggerConfig.cs | Adds consolidated debugger configuration and tunnel validity check. |
| src/Runner.Worker/Dap/DapDebugger.cs | Requires valid tunnel config, binds to tunnel port, and starts/stops Dev Tunnel relay. |
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
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.
This PR adds remote debugger connectivity to the runner via Dev Tunnels. The runner now deserializes the DebuggerTunnel payload (tunnel ID, cluster, host token, port) from the job message, binds the DAP server to the tunnel-provided port, and starts a Dev Tunnel relay so remote DAP clients can connect. The DAP port is now mandated by the backend for two reasons:
Since we're adding more debugger configuration this also changes the previous
EnableDebuggerbool in context with an object carrying that configuration.https://github.com/github/c2c-actions/issues/9831