Skip to content

Commit

Permalink
Merge pull request #1660 from authzed/nil-error-crdb-watch
Browse files Browse the repository at this point in the history
crdb: fix watch error: %!s(<nil>)
  • Loading branch information
josephschorr authored Nov 27, 2023
2 parents 57bf05e + 6407160 commit d479967
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ WORKDIR /go/src/app
RUN apk update && apk add --no-cache git
RUN git clone https://github.com/grpc-ecosystem/grpc-health-probe.git
WORKDIR /go/src/app/grpc-health-probe
RUN git checkout 680bc1a
RUN git checkout 46b326771cb9e57af7a495973a180e388b1a516f
RUN CGO_ENABLED=0 go install -a -tags netgo -ldflags=-w

FROM cgr.dev/chainguard/static:latest
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.release
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /go/src/app
RUN apk update && apk add --no-cache git
RUN git clone https://github.com/grpc-ecosystem/grpc-health-probe.git
WORKDIR /go/src/app/grpc-health-probe
RUN git checkout 680bc1a
RUN git checkout 46b326771cb9e57af7a495973a180e388b1a516f
RUN CGO_ENABLED=0 go install -a -tags netgo -ldflags=-w

FROM $BASE
Expand Down
2 changes: 1 addition & 1 deletion internal/datastore/crdb/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func (cds *crdbDatastore) Watch(ctx context.Context, afterRevision datastore.Rev
pending.Changes = append(pending.Changes, oneChange)
}

if changes.Err() != nil {
if err := changes.Err(); err != nil {
if errors.Is(ctx.Err(), context.Canceled) {
closeCtx, closeCancel := context.WithTimeout(context.Background(), 5*time.Second)
defer closeCancel()
Expand Down

0 comments on commit d479967

Please sign in to comment.