X Tutup
Skip to content

fix: avoid derp-related panic during wsproxy registration (backport release/2.30)#22343

Merged
f0ssel merged 1 commit intorelease/2.30from
release/2.30-backport-22322
Mar 3, 2026
Merged

fix: avoid derp-related panic during wsproxy registration (backport release/2.30)#22343
f0ssel merged 1 commit intorelease/2.30from
release/2.30-backport-22322

Conversation

@rowansmithau
Copy link
Contributor

@rowansmithau rowansmithau commented Feb 26, 2026

Backport of #22322.

If the primary had DERP disabled, workspace proxy registrations would
fail with a panic, as the registration endpoint would attempt to access
the mesh key from the nil DerpServer.

Changes the endpoint to query the database for the key.
@coder-tasks
Copy link
Contributor

coder-tasks bot commented Feb 26, 2026

Documentation Check

No Changes Needed

This is a backport of #22322 — a pure internal bug fix that prevents a nil pointer panic when workspace proxies attempt to register with a Coder server that has the built-in DERP server disabled (DERP.Server.Enable = false). The changes are limited to:

  • Moving DERP mesh key generation outside the built-in DERP server conditional (so it always runs at startup)
  • Reading the mesh key from the database during proxy registration instead of from the (potentially nil) DERP server
  • Test utilities and new test coverage

No user-facing behavior changes, new CLI flags, API changes, or configuration options are introduced.


Automated review via Coder Tasks

@rowansmithau rowansmithau added the cherry-pick/v2.30 Needs to be cherry-picked to the 2.30 release branch label Feb 26, 2026
Copy link
Member

@deansheather deansheather left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Checks are ❌ because the branch has a funky name and is trying to trigger the deploy workflow, but it's NBD

@f0ssel f0ssel merged commit 55da992 into release/2.30 Mar 3, 2026
56 of 58 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cherry-pick/v2.30 Needs to be cherry-picked to the 2.30 release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup