Skip to content

Commit 8fb84be

Browse files
committed
fix: modify workspacesdk to ask for tailnet API 2.0
1 parent 30c4b4d commit 8fb84be

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

codersdk/workspacesdk/workspacesdk.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"cdr.dev/slog"
2222
"github.com/coder/coder/v2/codersdk"
2323
"github.com/coder/coder/v2/tailnet"
24-
"github.com/coder/coder/v2/tailnet/proto"
2524
)
2625

2726
// AgentIP is a static IPv6 address with the Tailscale prefix that is used to route
@@ -239,7 +238,15 @@ func (c *Client) DialAgent(dialCtx context.Context, agentID uuid.UUID, options *
239238
return nil, xerrors.Errorf("parse url: %w", err)
240239
}
241240
q := coordinateURL.Query()
242-
q.Add("version", proto.CurrentVersion.String())
241+
// TODO (ethanndickson) - the current version includes 2 additions we don't currently use:
242+
//
243+
// 2.1 GetAnnouncementBanners on the Agent API (version locked to Tailnet API)
244+
// 2.2 PostTelemetry on the Tailnet API
245+
//
246+
// So, asking for API 2.2 just makes us incompatible back level servers, for no real benefit.
247+
// As a temporary measure, we'll specifically ask for API version 2.0 until we implement sending
248+
// telemetry.
249+
q.Add("version", "2.0")
243250
coordinateURL.RawQuery = q.Encode()
244251

245252
connector := runTailnetAPIConnector(ctx, options.Logger,

0 commit comments

Comments
 (0)