You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See #46
The issue was that `.TryGet()` can return `ok == true` and
`value == nil` which would crash the whole process.
From `relay.go`, `runToPeer` function:
```go
stream, ok := wv.TryGet()
if !ok {
// some handling
}
// here we assume that `stream != nil`, but due to the bug
// in waitValue, it's not true
stream.Send(...) // <<<< panic
```
Signed-off-by: Andrey Smirnov <[email protected]>
Co-authored-by: Utku Ozdemir <[email protected]>
RUN --mount=type=cache,target=/root/.cache/go-build,id=siderolink/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=siderolink/go/pkg go install golang.org/x/tools/cmd/goimports@v${GOIMPORTS_VERSION}
39
39
RUN mv /go/bin/goimports /bin
40
+
ARG GOMOCK_VERSION
41
+
RUN --mount=type=cache,target=/root/.cache/go-build,id=siderolink/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=siderolink/go/pkg go install go.uber.org/mock/mockgen@v${GOMOCK_VERSION}
42
+
RUN mv /go/bin/mockgen /bin
40
43
ARG PROTOBUF_GO_VERSION
41
44
RUN --mount=type=cache,target=/root/.cache/go-build,id=siderolink/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=siderolink/go/pkg go install google.golang.org/protobuf/cmd/protoc-gen-go@v${PROTOBUF_GO_VERSION}
42
45
RUN mv /go/bin/protoc-gen-go /bin
@@ -53,7 +56,7 @@ ARG DEEPCOPY_VERSION
53
56
RUN --mount=type=cache,target=/root/.cache/go-build,id=siderolink/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=siderolink/go/pkg go install github.com/siderolabs/deep-copy@${DEEPCOPY_VERSION} \
54
57
&& mv /go/bin/deep-copy /bin/deep-copy
55
58
ARG GOLANGCILINT_VERSION
56
-
RUN --mount=type=cache,target=/root/.cache/go-build,id=siderolink/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=siderolink/go/pkg go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCILINT_VERSION} \
59
+
RUN --mount=type=cache,target=/root/.cache/go-build,id=siderolink/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=siderolink/go/pkg go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@${GOLANGCILINT_VERSION} \
57
60
&& mv /go/bin/golangci-lint /bin/golangci-lint
58
61
RUN --mount=type=cache,target=/root/.cache/go-build,id=siderolink/root/.cache/go-build --mount=type=cache,target=/go/pkg,id=siderolink/go/pkg go install golang.org/x/vuln/cmd/govulncheck@latest \
59
62
&& mv /go/bin/govulncheck /bin/govulncheck
@@ -94,7 +97,6 @@ FROM base AS lint-golangci-lint
94
97
WORKDIR /src
95
98
COPY .golangci.yml .
96
99
ENV GOGC=50
97
-
RUN golangci-lint config verify --config .golangci.yml
98
100
RUN --mount=type=cache,target=/root/.cache/go-build,id=siderolink/root/.cache/go-build --mount=type=cache,target=/root/.cache/golangci-lint,id=siderolink/root/.cache/golangci-lint,sharing=locked --mount=type=cache,target=/go/pkg,id=siderolink/go/pkg golangci-lint run --config .golangci.yml
0 commit comments