Skip to content

Commit

Permalink
NEOS-1634: Fixes AnonymizeSingle nil pointer exception on error (#2975)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickzelei authored Nov 21, 2024
1 parent a6e80c7 commit de249f9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/dev/build/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get update \
apt-get install --no-install-recommends -y \
build-essential

RUN go install github.com/air-verse/air@latest
RUN go install github.com/air-verse/air@v1.52.3

# Copy the Go Modules manifests
COPY go.mod go.sum ./
Expand Down
4 changes: 4 additions & 0 deletions backend/internal/cmds/mgmt/serve/connect/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ func serve(ctx context.Context) error {
}
slogger.Debug(fmt.Sprintf("ee license enabled: %t", eelicense.IsValid()))

if getIsNeosyncCloud() {
slogger.Debug("neosync cloud is enabled")
}

mux := http.NewServeMux()

services := []string{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ func (s *Service) AnonymizeSingle(

outputData, err := anonymizer.AnonymizeJSONObject(req.Msg.InputData)
if err != nil {
outputErrorCounter.Add(ctx, int64(1), metric.WithAttributes(labels...))
if outputErrorCounter != nil {
outputErrorCounter.Add(ctx, int64(1), metric.WithAttributes(labels...))
}
return nil, err
}

Expand Down
2 changes: 1 addition & 1 deletion worker/dev/build/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get update \
apt-get install --no-install-recommends -y \
build-essential

RUN go install github.com/air-verse/air@latest
RUN go install github.com/air-verse/air@@v1.52.3

# Copy the Go Modules manifests
COPY go.mod go.sum ./
Expand Down

0 comments on commit de249f9

Please sign in to comment.