Skip to content

Commit 72b753b

Browse files
authored
PrefixFrom does not return a NotFound, fix this (#129)
1 parent 44e1550 commit 72b753b

File tree

19 files changed

+422
-280
lines changed

19 files changed

+422
-280
lines changed

.github/workflows/docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
steps:
2323

2424
- name: Set up Go 1.21
25-
uses: actions/setup-go@v4
25+
uses: actions/setup-go@v5
2626
with:
2727
go-version: "1.21"
2828
cache: false
@@ -90,7 +90,7 @@ jobs:
9090
steps:
9191

9292
- name: Set up Go 1.21
93-
uses: actions/setup-go@v4
93+
uses: actions/setup-go@v5
9494
with:
9595
go-version: "1.21"
9696
cache: false

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ WORKDIR /work
1010
COPY . .
1111
RUN make server client
1212

13-
FROM alpine:3.18
13+
FROM alpine:3.19
1414
COPY --from=builder /work/bin/* /
1515
ENTRYPOINT [ "/server" ]

api/v1/apiv1connect/ipam.connect.go

Lines changed: 76 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1/ipam.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

etcd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func (e *etcd) ReadPrefix(ctx context.Context, prefix string, namespace string)
139139
}
140140

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

145145
return fromJSON(get.Kvs[0].Value)

0 commit comments

Comments
 (0)