fix: fix slog to always use array of Fields (#21426)

Upgrades to slog v3 which includes a small, but backward incompatible API change to the acceptible call arguments when logging. This change allows us to verify via compile time type checking that arguments are correct and won't cause a panic, as was possible in slog v1, which this replaces (v2 was tagged but never used in coder/coder).

It also updates dependencies that also use slog and were updated.

I've left the `aibridge` dependency as a commit SHA, under the assumption that the team there (cc @pawbana @dannykopping ) will tag and update the dependency soon and on their own schedule.

Other dependencies, I pushed new tags.
This commit is contained in:
Spike Curtis
2026-01-08 10:29:41 +04:00
committed by GitHub
parent d1b0722034
commit 49b34a716a
376 changed files with 789 additions and 546 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ import (
"tailscale.com/ipn/ipnstate"
"tailscale.com/net/speedtest"
"cdr.dev/slog"
"cdr.dev/slog/v3"
"github.com/coder/coder/v2/coderd/tracing"
"github.com/coder/coder/v2/codersdk"
@@ -16,7 +16,7 @@ import (
reflect "reflect"
time "time"
slog "cdr.dev/slog"
slog "cdr.dev/slog/v3"
codersdk "github.com/coder/coder/v2/codersdk"
healthsdk "github.com/coder/coder/v2/codersdk/healthsdk"
workspacesdk "github.com/coder/coder/v2/codersdk/workspacesdk"
+2 -1
View File
@@ -10,7 +10,8 @@ import (
"golang.org/x/xerrors"
"cdr.dev/slog"
"cdr.dev/slog/v3"
"github.com/coder/websocket"
"github.com/coder/coder/v2/buildinfo"
+3 -2
View File
@@ -15,8 +15,9 @@ import (
"go.uber.org/mock/gomock"
"tailscale.com/tailcfg"
"cdr.dev/slog"
"cdr.dev/slog/sloggers/slogtest"
"cdr.dev/slog/v3"
"cdr.dev/slog/v3/sloggers/slogtest"
"github.com/coder/coder/v2/apiversion"
"github.com/coder/coder/v2/coderd/httpapi"
"github.com/coder/coder/v2/codersdk"
+1 -1
View File
@@ -18,7 +18,7 @@ import (
"github.com/google/uuid"
"golang.org/x/xerrors"
"cdr.dev/slog"
"cdr.dev/slog/v3"
"github.com/coder/quartz"
"github.com/coder/websocket"