kvtools / valkeyrie

Distributed Key/Value Store Abstraction Library written in Go.
https://pkg.go.dev/github.com/kvtools/valkeyrie
Apache License 2.0
278 stars 43 forks source link

EtcdV3: Put the value associated with the lock on the same lease #32

Closed Gaboose closed 5 years ago

Gaboose commented 5 years ago

Fixes https://github.com/abronan/valkeyrie/issues/31

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.05%) to 84.221% when pulling cac8a5ab74cd1c9378c73e4087e9f285ad1fc6f9 on Gaboose:etcd/expire-locked-value into d58035cad832c9b531e8151e933f573106a0e04f on abronan:master.

Gaboose commented 5 years ago

CI is failing, because I added a new test and EtcdV3, Redis and Dynamo are passing it, but not EtcdV2, Consul and Zookeeper.

Gaboose commented 5 years ago

How do I fix this CI error?

--- a/go.mod
+++ b/go.mod
@@ -22,8 +22,6 @@ require (
    github.com/hashicorp/go-msgpack v0.5.5 // indirect
    github.com/hashicorp/memberlist v0.1.4 // indirect
    github.com/jonboulle/clockwork v0.1.0 // indirect
-   github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
-   github.com/modern-go/reflect2 v1.0.1 // indirect
    github.com/onsi/ginkgo v1.8.0 // indirect
    github.com/onsi/gomega v1.5.0 // indirect
    github.com/prometheus/client_golang v1.1.0 // indirect
The command "git diff --exit-code go.mod" failed and exited with 1 during .

If I remove those lines, Go 1.11.x and Go 1.12.x fail, if I add them, Go 1.x fails.

abronan commented 5 years ago

@Gaboose I'm confused, have you attempted to run go mod tidy on this PR and force-push? Could be an issue with the build script or Travis build cache. Or we may be facing some quirks with go modules.

I'm not entirely sure we need that git diff check in the build script, it makes sure someone ran go mod tidy before submitting a PR and ensures go.mod/go.sum are consistent but I'm not sure we can guarantee its output and how it will behave across go versions, especially the ones that predates full go modules support.

@ldez Any input on this?

ldez commented 5 years ago

I will take a look

ldez commented 5 years ago

First as Go1.11 in now unsupported by the Go team, I think you should drop this version in the travis file.

abronan commented 5 years ago

Go 1.11 is also mentioned in go.mod, so we can remove it from there too I think.

ldez commented 5 years ago

I create a small PR on that point.

ldez commented 5 years ago

Take a look to #33

ldez commented 5 years ago

@Gaboose you can rebase now

Gaboose commented 5 years ago

Rebased. CI passing!