Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sreya committed Jul 3, 2024
1 parent 2db7afb commit 34ee67d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions buildlog/coder.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func OpenCoderClient(ctx context.Context, accessURL *url.URL, logger slog.Logger
return nil, xerrors.Errorf("build info: %w", err)
}

if semver.Compare(resp.Version, "v2.13.0") <= 0 {
if semver.Compare(semver.MajorMinor(resp.Version), "v2.13") < 0 {
return &agentClientV1{
ctx: ctx,
client: client,
Expand All @@ -160,8 +160,9 @@ type CoderLogger struct {
logger slog.Logger
}

func OpenCoderLogger(client CoderClient, log slog.Logger) Logger {
func OpenCoderLogger(ctx context.Context, client CoderClient, log slog.Logger) Logger {
coder := &CoderLogger{
ctx: ctx,
client: client,
logger: log,
}
Expand Down
2 changes: 1 addition & 1 deletion cli/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func dockerCmd() *cobra.Command {
}

blog = buildlog.MultiLogger(
buildlog.OpenCoderLogger(agent, log),
buildlog.OpenCoderLogger(ctx, agent, log),
blog,
)
}
Expand Down

0 comments on commit 34ee67d

Please sign in to comment.