Skip to content

fix(enterprise/coderd): check provisionerd API version on connection #12191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 16, 2024
Prev Previous commit
Next Next commit
rename package coderd/util/apiversion -> /apiversion
  • Loading branch information
johnstcn committed Feb 16, 2024
commit c1cae0673f854559bb844cfacd23b5cf12e0a147
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/coder/coder/v2/coderd/util/apiversion"
"github.com/coder/coder/v2/apiversion"
)

func TestAPIVersionValidate(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion coderd/healthcheck/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (

"golang.org/x/mod/semver"

"github.com/coder/coder/v2/apiversion"
"github.com/coder/coder/v2/buildinfo"
"github.com/coder/coder/v2/coderd/database"
"github.com/coder/coder/v2/coderd/database/db2sdk"
"github.com/coder/coder/v2/coderd/database/dbauthz"
"github.com/coder/coder/v2/coderd/database/dbtime"
"github.com/coder/coder/v2/coderd/healthcheck/health"
"github.com/coder/coder/v2/coderd/provisionerdserver"
"github.com/coder/coder/v2/coderd/util/apiversion"
"github.com/coder/coder/v2/coderd/util/ptr"
"github.com/coder/coder/v2/codersdk"
"github.com/coder/coder/v2/provisionersdk"
Expand Down
1 change: 1 addition & 0 deletions codersdk/provisionerdaemons.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"golang.org/x/xerrors"
"nhooyr.io/websocket"

"github.com/coder/coder/v2/apiversion"
"github.com/coder/coder/v2/buildinfo"
"github.com/coder/coder/v2/codersdk/drpc"
"github.com/coder/coder/v2/provisionerd/proto"
Expand Down
2 changes: 1 addition & 1 deletion enterprise/coderd/workspaceproxycoordinate.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/google/uuid"
"nhooyr.io/websocket"

"github.com/coder/coder/v2/apiversion"
"github.com/coder/coder/v2/coderd/httpapi"
"github.com/coder/coder/v2/coderd/util/apiversion"
"github.com/coder/coder/v2/codersdk"
"github.com/coder/coder/v2/tailnet/proto"
)
Expand Down
2 changes: 1 addition & 1 deletion enterprise/tailnet/workspaceproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"tailscale.com/tailcfg"

"cdr.dev/slog"
"github.com/coder/coder/v2/coderd/util/apiversion"
"github.com/coder/coder/v2/apiversion"
"github.com/coder/coder/v2/enterprise/wsproxy/wsproxysdk"
agpl "github.com/coder/coder/v2/tailnet"
)
Expand Down
2 changes: 1 addition & 1 deletion provisionersdk/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (

"cdr.dev/slog"

"github.com/coder/coder/v2/apiversion"
"github.com/coder/coder/v2/coderd/tracing"
"github.com/coder/coder/v2/coderd/util/apiversion"
"github.com/coder/coder/v2/provisionersdk/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion tailnet/proto/version.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package proto

import (
"github.com/coder/coder/v2/coderd/util/apiversion"
"github.com/coder/coder/v2/apiversion"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion tailnet/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"tailscale.com/tailcfg"

"cdr.dev/slog"
"github.com/coder/coder/v2/coderd/util/apiversion"
"github.com/coder/coder/v2/apiversion"
"github.com/coder/coder/v2/tailnet/proto"

"golang.org/x/xerrors"
Expand Down