Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,28 @@ jobs:
uses: actions/checkout@v3

# Install Go!
#
# NOTE: The lint job needs Go 1.25+ explicitly. golangci-lint refuses
# to load a config when the Go version it was built with is lower than
# the targeted Go version (read from go.mod, currently 1.25.9).
# Other jobs can stay on ~1.24 because Go's toolchain directive
# auto-downloads a matching toolchain at build time, but golangci-lint
# is a fixed pre-built binary and does not use the toolchain mechanism.
- uses: actions/setup-go@v3
with:
go-version: "~1.24"
go-version: "~1.25"

# Check for Go linting errors!
#
# install-mode: goinstall makes the action build golangci-lint v1.64.8
# from source using the Go installed above (1.25), instead of downloading
# the official pre-built binary which is built with Go 1.24 and fails
# the build-version check on this module.
- name: Lint Go
uses: golangci/golangci-lint-action@v6.1.1
with:
version: v1.64.8
install-mode: goinstall
args: "--out-${NO_FUTURE}format colored-line-number"

- name: Lint shell scripts
Expand Down
2 changes: 1 addition & 1 deletion background/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/spf13/afero"
"golang.org/x/xerrors"

"cdr.dev/slog"
"cdr.dev/slog/v3"
"github.com/coder/envbox/xio"
"github.com/coder/envbox/xunix"
)
Expand Down
5 changes: 2 additions & 3 deletions buildlog/coder.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"golang.org/x/xerrors"
"storj.io/drpc"

"cdr.dev/slog"
"cdr.dev/slog/v3"
"github.com/coder/coder/v2/agent/proto"
"github.com/coder/coder/v2/codersdk"
"github.com/coder/coder/v2/codersdk/agentsdk"
Expand Down Expand Up @@ -145,8 +145,7 @@ func newAgentClientV2(ctx context.Context, logger slog.Logger, client *agentsdk.
}

func OpenCoderClient(ctx context.Context, logger slog.Logger, accessURL *url.URL, hc *http.Client, token string) (CoderClient, error) {
client := agentsdk.New(accessURL)
client.SetSessionToken(token)
client := agentsdk.New(accessURL, agentsdk.WithFixedToken(token))
client.SDK.HTTPClient = hc

resp, err := client.SDK.BuildInfo(ctx)
Expand Down
4 changes: 2 additions & 2 deletions cli/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import (
"golang.org/x/exp/slices"
"golang.org/x/xerrors"

"cdr.dev/slog"
"cdr.dev/slog/sloggers/slogjson"
"cdr.dev/slog/v3"
"cdr.dev/slog/v3/sloggers/slogjson"
"github.com/coder/envbox/background"
"github.com/coder/envbox/buildlog"
"github.com/coder/envbox/cli/cliflag"
Expand Down
2 changes: 1 addition & 1 deletion dockerutil/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/spf13/afero"
"golang.org/x/xerrors"

"cdr.dev/slog"
"cdr.dev/slog/v3"
"github.com/coder/envbox/xunix"
"github.com/coder/retry"
)
Expand Down
2 changes: 1 addition & 1 deletion dockerutil/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/docker/docker/api/types/image"
"golang.org/x/xerrors"

"cdr.dev/slog"
"cdr.dev/slog/v3"

"github.com/coder/envbox/buildlog"
"github.com/coder/envbox/xunix"
Expand Down
265 changes: 154 additions & 111 deletions go.mod

Large diffs are not rendered by default.

883 changes: 519 additions & 364 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion slogkubeterminate/slogger.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"os"

"cdr.dev/slog"
"cdr.dev/slog/v3"
)

const defaultKubeTerminationLog = "/dev/termination-log"
Expand Down
4 changes: 2 additions & 2 deletions slogkubeterminate/slogger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/coder/envbox/slogkubeterminate"

"cdr.dev/slog"
"cdr.dev/slog/sloggers/sloghuman"
"cdr.dev/slog/v3"
"cdr.dev/slog/v3/sloggers/sloghuman"
)

func TestSlogKubeTerminate(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion xhttp/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"golang.org/x/xerrors"

"cdr.dev/slog"
"cdr.dev/slog/v3"
)

func Client(log slog.Logger, extraCertsPath string) (*http.Client, error) {
Expand Down
2 changes: 1 addition & 1 deletion xunix/gpu.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"golang.org/x/xerrors"
mount "k8s.io/mount-utils"

"cdr.dev/slog"
"cdr.dev/slog/v3"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion xunix/gpu_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/require"
"k8s.io/mount-utils"

"cdr.dev/slog/sloggers/slogtest"
"cdr.dev/slog/v3/sloggers/slogtest"

"github.com/coder/envbox/xunix"
"github.com/coder/envbox/xunix/xunixfake"
Expand Down
2 changes: 1 addition & 1 deletion xunix/sys.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/spf13/afero"
"golang.org/x/xerrors"

"cdr.dev/slog"
"cdr.dev/slog/v3"
)

type CPUQuota struct {
Expand Down
2 changes: 1 addition & 1 deletion xunix/sys_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/spf13/afero"
"github.com/stretchr/testify/require"

"cdr.dev/slog/sloggers/slogtest"
"cdr.dev/slog/v3/sloggers/slogtest"

"github.com/coder/envbox/xunix"
"github.com/coder/envbox/xunix/xunixfake"
Expand Down
Loading