Skip to content

Commit 78411a1

Browse files
authored
Bump go version to 1.26 and test fix (#125)
1 parent 45f85de commit 78411a1

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN dnf install -y dnf-plugins-core && \
2626
# =============================================================================
2727
# Stage 3: Go builder to compile the application
2828
# =============================================================================
29-
FROM public.ecr.aws/docker/library/golang:1.25.5 AS go-builder
29+
FROM public.ecr.aws/docker/library/golang:1.26.1 AS go-builder
3030

3131
WORKDIR /workspace
3232

@@ -46,10 +46,10 @@ ARG TARGETOS=linux
4646
ARG TARGETARCH
4747
ARG GOBUILDARGS=""
4848

49-
# Build the agent and chroot binaries with CGO enabled (required for systemd) and greenteagc experiment
50-
RUN CGO_ENABLED=1 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOEXPERIMENT=greenteagc \
49+
# Build the agent and chroot binaries with CGO enabled (required for systemd) and goroutine leak profiling
50+
RUN CGO_ENABLED=1 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOEXPERIMENT=goroutineleakprofile \
5151
go build ${GOBUILDARGS} -ldflags="-s -w" -o bin/eks-node-monitoring-agent ./cmd/eks-node-monitoring-agent/
52-
RUN CGO_ENABLED=1 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOEXPERIMENT=greenteagc \
52+
RUN CGO_ENABLED=1 GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOEXPERIMENT=goroutineleakprofile \
5353
go build ${GOBUILDARGS} -ldflags="-s -w" -o bin/chroot ./cmd/chroot/
5454

5555
# =============================================================================

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/aws/eks-node-monitoring-agent
22

3-
go 1.25.5
3+
go 1.26.1
44

55
require (
66
github.com/NVIDIA/go-dcgm v0.0.0-20260214140307-ad5d86fe3d32

monitors/networking/monitor_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,12 @@ func TestNetworkingPeriodic(t *testing.T) {
221221
res: make(chan monitor.Condition, 5),
222222
}
223223
mon.Register(ctx, mockManager)
224+
// First call resets the consistency timer and returns nil
225+
if !assert.NoError(t, mon.checkIPAMD(false)) {
226+
return
227+
}
228+
// Second call sees ipamdNotRunningTime was set recently (within the
229+
// consistency duration), so it fires the notification.
224230
if !assert.NoError(t, mon.checkIPAMD(false)) {
225231
return
226232
}

0 commit comments

Comments
 (0)