Skip to content

fix(coderd/agentapi): reject missing RPC messages (#29150) - #29366

Open
dylanhuff-at-coder wants to merge 1 commit into
release/2.34from
backport/29150-to-2.34
Open

dylanhuff-at-coder wants to merge 1 commit into
release/2.34from
backport/29150-to-2.34

Conversation

@dylanhuff-at-coder

Copy link
Copy Markdown
Contributor

Backport of #29150 to release/2.34.

Reject missing lifecycle, startup, and metadata sub-messages with InvalidArgument instead of panicking. Validate the entire metadata batch before modifying or queuing values.

Backport context

Cherry-picks 9c58283d8e7a036a45820f76da7f05ffcf81d611 without changes. The automatic backport failed while pushing the branch.

Generated by Coder Agents on behalf of @dylanhuff-at-coder.

Reject `UpdateLifecycle`, `UpdateStartup`, and `BatchUpdateMetadata`
requests with a missing sub-message using `InvalidArgument` instead of
panicking. The whole metadata batch is validated before any value is
trimmed or queued.

Adds tests for each handler, a mixed metadata batch, and one DRPC
round-trip confirming the code propagates and the connection stays
usable.

Refs PLAT-596

Reviewed and updated by Coder Agents on behalf of @dylanhuff-at-coder.

(cherry picked from commit 9c58283)
@dylanhuff-at-coder dylanhuff-at-coder added the backport/v2.34 Backport PR targeting release/2.34 label Sep 15, 2026
@dylanhuff-at-coder
dylanhuff-at-coder marked this pull request as ready for review September 15, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/v2.34 Backport PR targeting release/2.34

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants