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

Commit6e65e46

Browse files
committed
feat: include server agent API version in buildinfo
1 parent53453c0 commit6e65e46

File tree

8 files changed

+32
-14
lines changed

8 files changed

+32
-14
lines changed

‎coderd/apidoc/docs.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/deployment.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,11 @@ func (api *API) deploymentStats(rw http.ResponseWriter, r *http.Request) {
7171
funcbuildInfo(accessURL*url.URL) http.HandlerFunc {
7272
returnfunc(rw http.ResponseWriter,r*http.Request) {
7373
httpapi.Write(r.Context(),rw,http.StatusOK, codersdk.BuildInfoResponse{
74-
ExternalURL:buildinfo.ExternalURL(),
75-
Version:buildinfo.Version(),
76-
DashboardURL:accessURL.String(),
77-
WorkspaceProxy:false,
74+
ExternalURL:buildinfo.ExternalURL(),
75+
Version:buildinfo.Version(),
76+
AgentAPIVersion:AgentAPIVersionREST,
77+
DashboardURL:accessURL.String(),
78+
WorkspaceProxy:false,
7879
})
7980
}
8081
}

‎codersdk/deployment.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,6 +2003,10 @@ type BuildInfoResponse struct {
20032003
DashboardURLstring`json:"dashboard_url"`
20042004

20052005
WorkspaceProxybool`json:"workspace_proxy"`
2006+
2007+
// AgentAPIVersion is the current version of the Agent API (back versions
2008+
// MAY still be supported)
2009+
AgentAPIVersionstring`json:"agent_api_version"`
20062010
}
20072011

20082012
typeWorkspaceProxyBuildInfostruct {

‎docs/api/general.md

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/api/schemas.md

Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎enterprise/wsproxy/wsproxy.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,10 +478,11 @@ func (s *Server) DialCoordinator(ctx context.Context) (tailnet.MultiAgentConn, e
478478

479479
func (s*Server)buildInfo(rw http.ResponseWriter,r*http.Request) {
480480
httpapi.Write(r.Context(),rw,http.StatusOK, codersdk.BuildInfoResponse{
481-
ExternalURL:buildinfo.ExternalURL(),
482-
Version:buildinfo.Version(),
483-
DashboardURL:s.DashboardURL.String(),
484-
WorkspaceProxy:true,
481+
ExternalURL:buildinfo.ExternalURL(),
482+
Version:buildinfo.Version(),
483+
AgentAPIVersion:coderd.AgentAPIVersionREST,
484+
DashboardURL:s.DashboardURL.String(),
485+
WorkspaceProxy:true,
485486
})
486487
}
487488

‎site/src/testHelpers/entities.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ export const MockProxyLatencies: Record<string, ProxyLatencyReport> = {
194194
};
195195

196196
exportconstMockBuildInfo:TypesGen.BuildInfoResponse={
197+
agent_api_version:"2.1",
197198
external_url:"file:///mock-url",
198199
version:"v99.999.9999+c9cdf14",
199200
dashboard_url:"https:///mock-url",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp