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

Commita31d474

Browse files
committed
feat: include server agent API version in buildinfo
1 parentf0969f9 commita31d474

File tree

9 files changed

+33
-14
lines changed

9 files changed

+33
-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
@@ -475,10 +475,11 @@ func (s *Server) DialCoordinator(ctx context.Context) (tailnet.MultiAgentConn, e
475475

476476
func (s*Server)buildInfo(rw http.ResponseWriter,r*http.Request) {
477477
httpapi.Write(r.Context(),rw,http.StatusOK, codersdk.BuildInfoResponse{
478-
ExternalURL:buildinfo.ExternalURL(),
479-
Version:buildinfo.Version(),
480-
DashboardURL:s.DashboardURL.String(),
481-
WorkspaceProxy:true,
478+
ExternalURL:buildinfo.ExternalURL(),
479+
Version:buildinfo.Version(),
480+
AgentAPIVersion:coderd.AgentAPIVersionREST,
481+
DashboardURL:s.DashboardURL.String(),
482+
WorkspaceProxy:true,
482483
})
483484
}
484485

‎site/src/api/typesGenerated.ts

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

‎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