diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae3875e..0e2a3d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: - name: Run go vet run: go vet ./... - name: Install golangci-lint - run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest + run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.15.0 - name: Run golangci-lint run: golangci-lint run test: diff --git a/Dockerfile b/Dockerfile index d35c4f2..fe1ac3e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build stage -FROM golang:1.26.6-alpine AS builder +FROM golang:1.27.3-alpine AS builder # VERSION is stamped into the binary via -ldflags="-X main.Version=...". # CI passes the release tag (or commit SHA) here so the value reported by diff --git a/go.mod b/go.mod index 60658a4..22eee72 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/warpdotdev/oz-agent-worker -go 1.26.6 +go 1.27.3 require ( github.com/alecthomas/kong v1.13.0 diff --git a/internal/tasktelemetry/tracing/session_test.go b/internal/tasktelemetry/tracing/session_test.go index f94edc7..b892477 100644 --- a/internal/tasktelemetry/tracing/session_test.go +++ b/internal/tasktelemetry/tracing/session_test.go @@ -413,7 +413,9 @@ func TestTaskTraceBoundedShutdown(t *testing.T) { if time.Since(begin) > time.Second { t.Fatal("queue overflow blocked task instrumentation") } - <-flushed + if err := <-flushed; err == nil { + t.Fatal("blocked trace flush succeeded") + } session.End("interrupted", nil) shutdownCtx, stop := context.WithTimeout(t.Context(), 100*time.Millisecond) begin = time.Now() diff --git a/internal/worker/docker_logs.go b/internal/worker/docker_logs.go index 2a455ca..4e3f059 100644 --- a/internal/worker/docker_logs.go +++ b/internal/worker/docker_logs.go @@ -45,7 +45,7 @@ func (b *DockerBackend) followContainerLogs(ctx context.Context, containerID str stderr := reporter.Writer(ctx, "container.stderr", append(attrs, attribute.String("log.iostream", "stderr"))...) defer stdout.Flush() defer stderr.Flush() - if err := copyDockerLogFrames(stream, stdout, stderr); err != nil && !errors.Is(err, io.EOF) && streamCtx.Err() == nil { + if err := copyDockerLogFrames(stream, stdout, stderr); !errors.Is(err, io.EOF) && streamCtx.Err() == nil { log.Warnf(ctx, "Docker task log stream interrupted") } }() diff --git a/internal/worker/worker.go b/internal/worker/worker.go index 3012519..4889601 100644 --- a/internal/worker/worker.go +++ b/internal/worker/worker.go @@ -408,7 +408,9 @@ func (w *Worker) gracefullyCloseConnection( log.Warnf(w.ctx, "Failed to send close message: %v", err) } connectionCancel() - <-groupDone + if err := <-groupDone; err != nil { + log.Warnf(w.ctx, "Connection closed: %v", err) + } } func (w *Worker) readLoop(ctx context.Context, conn *websocket.Conn) error {