Skip to content

Conversation

@nixpanic
Copy link
Member

Certain operations with RBD can return the C errno EEXISTS. Applications using go-ceph benefit from easily detecting this error.

@nixpanic
Copy link
Member Author

CI jobs fail with something completely unrelated:

revive -config .revive.toml $(find . -name '*.go')
Error: ./rbd/snapshot_octopus.go:53:36: redefinition of the built-in function len
Error: ./rados/snapshot.go:88:36: redefinition of the built-in function len
make: *** [Makefile:258: check-revive] Error 1
Error: ./rados/watcher.go:301:45: redefinition of the built-in function len

@anoopcs9
Copy link
Collaborator

CI jobs fail with something completely unrelated:

revive -config .revive.toml $(find . -name '*.go')
Error: ./rbd/snapshot_octopus.go:53:36: redefinition of the built-in function len
Error: ./rados/snapshot.go:88:36: redefinition of the built-in function len
make: *** [Makefile:258: check-revive] Error 1
Error: ./rados/watcher.go:301:45: redefinition of the built-in function len

Recently released revive v1.4.0 checks function related variables for redefines-builtin-id rule. Let me quickly update the function argument names.

@anoopcs9
Copy link
Collaborator

@Mergifyio rebase

@mergify
Copy link

mergify bot commented Sep 24, 2024

rebase

✅ Branch has been successfully rebased

rbd/errors.go Outdated
// Public general error
const (
// ErrExist indicates a non-specific already existing resource.
ErrExist = rbdError(-C.EXISTS)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
ErrExist = rbdError(-C.EXISTS)
ErrExist = rbdError(-C.EEXIST)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, and I thought I tested this 🤦

@anoopcs9
Copy link
Collaborator

@Mergifyio rebase

Certain operations with RBD can return the C errno EEXIST. Applications
using go-ceph benefit from easily detecting this error.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
@mergify
Copy link

mergify bot commented Sep 24, 2024

rebase

✅ Branch has been successfully rebased

Copy link
Collaborator

@phlogistonjohn phlogistonjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@phlogistonjohn phlogistonjohn added the API This PR includes a change to the public API of a go-ceph package label Sep 25, 2024
@mergify mergify bot merged commit 5a7f9c9 into ceph:master Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API This PR includes a change to the public API of a go-ceph package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants