Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf5dbc71

Browse files
authored
fix: accept agent RPC connection without version query parameter (#11790)
Fixes an issue where Coder v2.7.1 agents connect to /api/v2/workspaceagents/me/rpc without a version query parameter
1 parent13beb04 commitf5dbc71

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎coderd/workspaceagentsrpc.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ func (api *API) workspaceAgentRPC(rw http.ResponseWriter, r *http.Request) {
4040

4141
version:=r.URL.Query().Get("version")
4242
ifversion=="" {
43-
httpapi.Write(ctx,rw,http.StatusBadRequest, codersdk.Response{
44-
Message:"Missing required query parameter:version",
45-
})
46-
return
43+
// The initial version on this HTTP endpoint was 2.0, so assume this version if unspecified.
44+
// Coder v2.7.1 (not to be confused with the Agent APIversion) calls this endpoint without
45+
// a version parameter and wants Agent API version 2.0.
46+
version="2.0"
4747
}
4848
iferr:=proto.CurrentVersion.Validate(version);err!=nil {
4949
httpapi.Write(ctx,rw,http.StatusBadRequest, codersdk.Response{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp