Skip to content

Commit e6741c5

Browse files
authored
Merge pull request #2534 from keboola/mvasko/fix-gotoolchain-and-retry-test
fix: miscellaneous build and test fixes
2 parents 7a0471e + 7dd0b89 commit e6741c5

2 files changed

Lines changed: 14 additions & 9 deletions

File tree

internal/pkg/service/stream/storage/model/retry_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -250,29 +250,29 @@ func TestRetryable_IncrementNonRetryableAttempt(t *testing.T) {
250250
assert.Equal(t, Retryable{
251251
RetryAttempt: 1,
252252
RetryReason: "credential expired",
253-
FirstFailedAt: ptr.Ptr(utctime.MustParse("2000-01-01T00:00:00.000Z")),
254-
LastFailedAt: ptr.Ptr(utctime.MustParse("2000-01-01T00:00:00.000Z")),
255-
RetryAfter: ptr.Ptr(utctime.MustParse("2000-01-01T02:00:00.000Z")), // +2 hours
253+
FirstFailedAt: new(utctime.MustParse("2000-01-01T00:00:00.000Z")),
254+
LastFailedAt: new(utctime.MustParse("2000-01-01T00:00:00.000Z")),
255+
RetryAfter: new(utctime.MustParse("2000-01-01T02:00:00.000Z")), // +2 hours
256256
}, v)
257257

258258
// Second attempt - FirstFailedAt should remain unchanged
259259
v.IncrementNonRetryableAttempt(utctime.MustParse("2000-01-01T02:00:00.000Z").Time(), "credential expired", fixedInterval)
260260
assert.Equal(t, Retryable{
261261
RetryAttempt: 2,
262262
RetryReason: "credential expired",
263-
FirstFailedAt: ptr.Ptr(utctime.MustParse("2000-01-01T00:00:00.000Z")), // unchanged
264-
LastFailedAt: ptr.Ptr(utctime.MustParse("2000-01-01T02:00:00.000Z")),
265-
RetryAfter: ptr.Ptr(utctime.MustParse("2000-01-01T04:00:00.000Z")), // +2 hours (fixed)
263+
FirstFailedAt: new(utctime.MustParse("2000-01-01T00:00:00.000Z")), // unchanged
264+
LastFailedAt: new(utctime.MustParse("2000-01-01T02:00:00.000Z")),
265+
RetryAfter: new(utctime.MustParse("2000-01-01T04:00:00.000Z")), // +2 hours (fixed)
266266
}, v)
267267

268268
// Third attempt - still fixed interval
269269
v.IncrementNonRetryableAttempt(utctime.MustParse("2000-01-01T04:00:00.000Z").Time(), "credential expired", fixedInterval)
270270
assert.Equal(t, Retryable{
271271
RetryAttempt: 3,
272272
RetryReason: "credential expired",
273-
FirstFailedAt: ptr.Ptr(utctime.MustParse("2000-01-01T00:00:00.000Z")), // unchanged
274-
LastFailedAt: ptr.Ptr(utctime.MustParse("2000-01-01T04:00:00.000Z")),
275-
RetryAfter: ptr.Ptr(utctime.MustParse("2000-01-01T06:00:00.000Z")), // +2 hours (fixed)
273+
FirstFailedAt: new(utctime.MustParse("2000-01-01T00:00:00.000Z")), // unchanged
274+
LastFailedAt: new(utctime.MustParse("2000-01-01T04:00:00.000Z")),
275+
RetryAfter: new(utctime.MustParse("2000-01-01T06:00:00.000Z")), // +2 hours (fixed)
276276
}, v)
277277
}
278278

provisioning/stream/docker/k6/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ FROM golang:1.26-alpine AS build
44
# Install necessary packages for building
55
RUN apk add --no-cache git
66

7+
# Prevent Go from attempting toolchain auto-switching (GOTOOLCHAIN=auto default in 1.21+)
8+
# and skip GOSUM database lookups which can fail in Docker network environments
9+
ENV GOTOOLCHAIN=local
10+
ENV GONOSUMDB=go.k6.io,github.com/LeonAdato,github.com/domsolutions
11+
712
# Install xk6
813
RUN go install go.k6.io/xk6/cmd/xk6@latest
914

0 commit comments

Comments
 (0)