Skip to content

Commit

Permalink
PrefixFrom does not return a NotFound, fix this (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 authored Jan 8, 2024
1 parent 44e1550 commit 72b753b
Show file tree
Hide file tree
Showing 19 changed files with 422 additions and 280 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:

- name: Set up Go 1.21
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.21"
cache: false
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
steps:

- name: Set up Go 1.21
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: "1.21"
cache: false
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ WORKDIR /work
COPY . .
RUN make server client

FROM alpine:3.18
FROM alpine:3.19
COPY --from=builder /work/bin/* /
ENTRYPOINT [ "/server" ]
105 changes: 76 additions & 29 deletions api/v1/apiv1connect/ipam.connect.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/v1/ipam.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (e *etcd) ReadPrefix(ctx context.Context, prefix string, namespace string)
}

if get.Count == 0 {
return Prefix{}, fmt.Errorf("unable to read existing prefix:%v, error:%w", prefix, err)
return Prefix{}, fmt.Errorf("%w unable to read existing prefix:%v, error:%w", ErrNotFound, prefix, err)
}

return fromJSON(get.Kvs[0].Value)
Expand Down
Loading

0 comments on commit 72b753b

Please sign in to comment.